/* Generated by Cython 0.29 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "polemarch.api.v2.serializers", 
        "sources": [
            "polemarch/api/v2/serializers.py"
        ]
    }, 
    "module_name": "polemarch.api.v2.serializers"
}
END: Cython Metadata */

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

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

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

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


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

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

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


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

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


static const char *__pyx_f[] = {
  "polemarch/api/v2/serializers.py",
};

/*--- Type declarations ---*/
struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals;
struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults {
  PyObject *__pyx_arg_data;
};

/* "polemarch/api/v2/serializers.py":77
 * 
 * 
 * def with_signals(func):             # <<<<<<<<<<<<<<
 *     '''
 *     Decorator for send api_pre_save and api_post_save signals from serializers.
 */
struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals {
  PyObject_HEAD
  PyObject *__pyx_v_func;
};


/* "polemarch/api/v2/serializers.py":214
 *     class Meta(vst_serializers.OneUserSerializer.Meta):
 *         fields = tuple(
 *             field for field in vst_serializers.OneUserSerializer.Meta.fields             # <<<<<<<<<<<<<<
 *             if field not in ['password']
 *         )
 */
struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  PyObject *__pyx_v_field;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


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

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

/* py_dict_pop.proto */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value);

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

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

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* MergeKeywords.proto */
static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


/* Module declarations from 'polemarch.api.v2.serializers' */
static PyTypeObject *__pyx_ptype_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals = 0;
static PyTypeObject *__pyx_ptype_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr = 0;
#define __Pyx_MODULE_NAME "polemarch.api.v2.serializers"
extern int __pyx_module_is_main_polemarch__api__v2__serializers;
int __pyx_module_is_main_polemarch__api__v2__serializers = 0;

/* Implementation of 'polemarch.api.v2.serializers' */
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_ValueError;
static const char __pyx_k_k[] = "k";
static const char __pyx_k_v[] = "v";
static const char __pyx_k__4[] = "***";
static const char __pyx_k_hv[] = "hv";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_kw[] = "kw";
static const char __pyx_k_no[] = "no";
static const char __pyx_k_ok[] = "ok";
static const char __pyx_k_pk[] = "pk";
static const char __pyx_k_KEY[] = "KEY";
static const char __pyx_k__10[] = "";
static const char __pyx_k__18[] = "-";
static const char __pyx_k__19[] = "_";
static const char __pyx_k_add[] = "add";
static const char __pyx_k_all[] = "all";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_day[] = "day";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_int[] = "int";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_map[] = "map";
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_pop[] = "pop";
static const char __pyx_k_raw[] = "raw/";
static const char __pyx_k_ref[] = "ref";
static const char __pyx_k_rep[] = "rep";
static const char __pyx_k_six[] = "six";
static const char __pyx_k_sum[] = "sum";
static const char __pyx_k_var[] = "var";
static const char __pyx_k_yes[] = "yes";
static const char __pyx_k_HOST[] = "HOST";
static const char __pyx_k_Hook[] = "Hook";
static const char __pyx_k_Host[] = "Host";
static const char __pyx_k_Meta[] = "Meta";
static const char __pyx_k_NONE[] = "NONE";
static const char __pyx_k_Task[] = "Task";
static const char __pyx_k_True[] = "True";
static const char __pyx_k_Type[] = "Type";
static const char __pyx_k_User[] = "User";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_attr[] = "attr";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_fail[] = "fail";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_help[] = "help";
static const char __pyx_k_host[] = "host";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_jobs[] = "jobs";
static const char __pyx_k_json[] = "json";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_kind[] = "kind";
static const char __pyx_k_line[] = "line";
static const char __pyx_k_list[] = "list";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_many[] = "many";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_repo[] = "repo_{}";
static const char __pyx_k_save[] = "save";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_sort[] = "sort";
static const char __pyx_k_sync[] = "sync";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_user[] = "user";
static const char __pyx_k_vars[] = "vars";
static const char __pyx_k_when[] = "when";
static const char __pyx_k_year[] = "year";
static const char __pyx_k_Group[] = "Group";
static const char __pyx_k_RANGE[] = "RANGE";
static const char __pyx_k_Staff[] = "Staff";
static const char __pyx_k_attrs[] = "attrs";
static const char __pyx_k_bases[] = "bases";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_color[] = "color";
static const char __pyx_k_delay[] = "delay";
static const char __pyx_k_email[] = "email";
static const char __pyx_k_empty[] = "empty";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_facts[] = "facts";
static const char __pyx_k_field[] = "field";
static const char __pyx_k_group[] = "group";
static const char __pyx_k_hosts[] = "hosts";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_kinds[] = "kinds";
static const char __pyx_k_label[] = "label";
static const char __pyx_k_loads[] = "loads";
static const char __pyx_k_lower[] = "lower";
static const char __pyx_k_model[] = "model";
static const char __pyx_k_month[] = "month";
static const char __pyx_k_notes[] = "notes";
static const char __pyx_k_owner[] = "owner";
static const char __pyx_k_rdata[] = "rdata";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_teams[] = "teams";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_types[] = "types";
static const char __pyx_k_users[] = "users";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_MANUAL[] = "MANUAL";
static const char __pyx_k_MODULE[] = "MODULE";
static const char __pyx_k_Module[] = "Module";
static const char __pyx_k_active[] = "active";
static const char __pyx_k_atomic[] = "atomic";
static const char __pyx_k_branch[] = "branch";
static const char __pyx_k_create[] = "create";
static const char __pyx_k_detail[] = "detail";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_fields[] = "fields";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_g_subs[] = "g_subs";
static const char __pyx_k_groups[] = "groups";
static const char __pyx_k_hidden[] = "hidden";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_main_2[] = "main";
static const char __pyx_k_method[] = "method";
static const char __pyx_k_models[] = "models";
static const char __pyx_k_module[] = "module";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_obj_id[] = "obj_id";
static const char __pyx_k_option[] = "option";
static const char __pyx_k_parser[] = "parser";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_select[] = "select";
static const char __pyx_k_sender[] = "sender";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_status[] = "status";
static const char __pyx_k_string[] = "string";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_CRONTAB[] = "CRONTAB";
static const char __pyx_k_History[] = "History";
static const char __pyx_k_Project[] = "Project";
static const char __pyx_k_boolean[] = "boolean";
static const char __pyx_k_choices[] = "choices";
static const char __pyx_k_context[] = "context";
static const char __pyx_k_crontab[] = "crontab";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_enabled[] = "enabled";
static const char __pyx_k_execute[] = "execute";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_get_raw[] = "get_raw";
static const char __pyx_k_handler[] = "handler";
static const char __pyx_k_integer[] = "integer";
static const char __pyx_k_objects[] = "objects";
static const char __pyx_k_offline[] = "offline";
static const char __pyx_k_options[] = "options";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_project[] = "project";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_request[] = "request";
static const char __pyx_k_select2[] = "select2";
static const char __pyx_k_signals[] = "signals";
static const char __pyx_k_user_id[] = "user_id";
static const char __pyx_k_verbose[] = "verbose";
static const char __pyx_k_version[] = "version";
static const char __pyx_k_INTERVAL[] = "INTERVAL";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_One_host[] = "One host.";
static const char __pyx_k_PASSWORD[] = "PASSWORD";
static const char __pyx_k_PLAYBOOK[] = "PLAYBOOK";
static const char __pyx_k_Playbook[] = "Playbook";
static const char __pyx_k_Repo_url[] = "Repo url";
static const char __pyx_k_Response[] = "Response";
static const char __pyx_k_STATUSES[] = "STATUSES";
static const char __pyx_k_TEMPLATE[] = "TEMPLATE";
static const char __pyx_k_Template[] = "Template";
static const char __pyx_k_Variable[] = "Variable";
static const char __pyx_k_children[] = "children";
static const char __pyx_k_collapse[] = "collapse";
static const char __pyx_k_disabled[] = "disabled";
static const char __pyx_k_executor[] = "executor";
static const char __pyx_k_get_user[] = "get_user";
static const char __pyx_k_get_vars[] = "get_vars";
static const char __pyx_k_handlers[] = "handlers";
static const char __pyx_k_instance[] = "instance";
static const char __pyx_k_inv_host[] = "inv_host";
static const char __pyx_k_inv_json[] = "inv_json";
static const char __pyx_k_is_staff[] = "is_staff";
static const char __pyx_k_is_valid[] = "is_valid";
static const char __pyx_k_mask_key[] = "mask_key";
static const char __pyx_k_module_2[] = "__module__";
static const char __pyx_k_owned_by[] = "owned_by";
static const char __pyx_k_password[] = "password";
static const char __pyx_k_playbook[] = "playbook";
static const char __pyx_k_projects[] = "projects";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_queryset[] = "queryset";
static const char __pyx_k_raw_args[] = "raw_args";
static const char __pyx_k_raw_data[] = "raw_data";
static const char __pyx_k_raw_dict[] = "raw_dict";
static const char __pyx_k_ref_type[] = "ref_type";
static const char __pyx_k_repo_key[] = "repo_key";
static const char __pyx_k_required[] = "required";
static const char __pyx_k_revision[] = "revision";
static const char __pyx_k_schedule[] = "schedule";
static const char __pyx_k_settings[] = "settings";
static const char __pyx_k_statuses[] = "statuses";
static const char __pyx_k_template[] = "template";
static const char __pyx_k_username[] = "username";
static const char __pyx_k_CharField[] = "CharField";
static const char __pyx_k_DictField[] = "DictField";
static const char __pyx_k_ENCRYPTED[] = "[~~ENCRYPTED~~]";
static const char __pyx_k_HtmlField[] = "HtmlField";
static const char __pyx_k_Inventory[] = "Inventory";
static const char __pyx_k_ListField[] = "ListField";
static const char __pyx_k_New_owner[] = "New owner";
static const char __pyx_k_Repo_type[] = "Repo type";
static const char __pyx_k_Sync_with[] = "Sync with {}.";
static const char __pyx_k_Task_type[] = "Task type";
static const char __pyx_k_UserGroup[] = "UserGroup";
static const char __pyx_k_all_tasks[] = "all_tasks";
static const char __pyx_k_auth_data[] = "auth_data";
static const char __pyx_k_django_db[] = "django.db";
static const char __pyx_k_execution[] = "_execution";
static const char __pyx_k_get_facts[] = "get_facts";
static const char __pyx_k_help_text[] = "help_text";
static const char __pyx_k_init_type[] = "init_type";
static const char __pyx_k_initiator[] = "initiator";
static const char __pyx_k_inv_group[] = "inv_group";
static const char __pyx_k_inventory[] = "inventory";
static const char __pyx_k_max_value[] = "max_value";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_password2[] = "password2";
static const char __pyx_k_perms_msg[] = "perms_msg";
static const char __pyx_k_read_only[] = "read_only";
static const char __pyx_k_repo_auth[] = "repo_auth";
static const char __pyx_k_repo_type[] = "repo_type";
static const char __pyx_k_set_owner[] = "set_owner";
static const char __pyx_k_stop_time[] = "stop_time";
static const char __pyx_k_templates[] = "templates";
static const char __pyx_k_text_type[] = "text_type";
static const char __pyx_k_variables[] = "variables";
static const char __pyx_k_EmailField[] = "EmailField";
static const char __pyx_k_Serializer[] = "Serializer";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_allow_null[] = "allow_null";
static const char __pyx_k_auth_types[] = "auth_types";
static const char __pyx_k_exceptions[] = "exceptions";
static const char __pyx_k_field_name[] = "field_name";
static const char __pyx_k_history_id[] = "history_id";
static const char __pyx_k_items_list[] = "items_list";
static const char __pyx_k_main_utils[] = "main.utils";
static const char __pyx_k_min_length[] = "min_length";
static const char __pyx_k_raw_stdout[] = "raw_stdout";
static const char __pyx_k_recipients[] = "recipients";
static const char __pyx_k_repo_class[] = "repo_class";
static const char __pyx_k_repository[] = "repository";
static const char __pyx_k_secretfile[] = "secretfile";
static const char __pyx_k_serializer[] = "serializer";
static const char __pyx_k_start_time[] = "start_time";
static const char __pyx_k_vst_fields[] = "vst_fields";
static const char __pyx_k_write_only[] = "write_only";
static const char __pyx_k_ChoiceField[] = "ChoiceField";
static const char __pyx_k_HIDDEN_VARS[] = "HIDDEN_VARS";
static const char __pyx_k_HTTP_200_OK[] = "HTTP_200_OK";
static const char __pyx_k_HiddenField[] = "HiddenField";
static const char __pyx_k_Information[] = "Information";
static const char __pyx_k_OrderedDict[] = "OrderedDict";
static const char __pyx_k_UptimeField[] = "UptimeField";
static const char __pyx_k_acl_handler[] = "acl_handler";
static const char __pyx_k_allow_blank[] = "allow_blank";
static const char __pyx_k_class_types[] = "class_types";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_hidden_vars[] = "hidden_vars";
static const char __pyx_k_interrupted[] = "interrupted";
static const char __pyx_k_inventories[] = "inventories";
static const char __pyx_k_line_number[] = "line_number";
static const char __pyx_k_main_models[] = "main.models";
static const char __pyx_k_method_name[] = "method_name";
static const char __pyx_k_repo_branch[] = "repo_branch";
static const char __pyx_k_save_result[] = "save_result";
static const char __pyx_k_serializers[] = "serializers";
static const char __pyx_k_status_code[] = "status_code";
static const char __pyx_k_transaction[] = "transaction";
static const char __pyx_k_viewable_by[] = "viewable_by";
static const char __pyx_k_BOOLEAN_VARS[] = "BOOLEAN_VARS";
static const char __pyx_k_BooleanField[] = "BooleanField";
static const char __pyx_k_HistoryLines[] = "HistoryLines";
static const char __pyx_k_IntegerField[] = "IntegerField";
static const char __pyx_k_New_password[] = "New password";
static const char __pyx_k_PeriodicTask[] = "PeriodicTask";
static const char __pyx_k_Select2Field[] = "Select2Field";
static const char __pyx_k_Unknown_kind[] = "Unknown kind";
static const char __pyx_k_Unknown_type[] = "Unknown type.";
static const char __pyx_k_VSTCharField[] = "VSTCharField";
static const char __pyx_k_ansible_port[] = "ansible_port";
static const char __pyx_k_ansible_type[] = "ansible_type";
static const char __pyx_k_api_pre_save[] = "api_pre_save";
static const char __pyx_k_autocomplete[] = "autocomplete";
static const char __pyx_k_current_user[] = "current_user";
static const char __pyx_k_do_with_vars[] = "_do_with_vars";
static const char __pyx_k_execute_args[] = "execute_args";
static const char __pyx_k_extra_kwargs[] = "extra_kwargs";
static const char __pyx_k_field_object[] = "field_object";
static const char __pyx_k_func_wrapper[] = "func_wrapper";
static const char __pyx_k_inventory_id[] = "inventory_id";
static const char __pyx_k_line_gnumber[] = "line_gnumber";
static const char __pyx_k_old_password[] = "old_password";
static const char __pyx_k_options_list[] = "options_list";
static const char __pyx_k_project_keys[] = "project_keys";
static const char __pyx_k_query_params[] = "query_params";
static const char __pyx_k_repr_options[] = "repr_options";
static const char __pyx_k_set_password[] = "set_password";
static const char __pyx_k_source_attrs[] = "source_attrs";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_string_types[] = "string_types";
static const char __pyx_k_template_opt[] = "template_opt";
static const char __pyx_k_vstutils_api[] = "vstutils.api";
static const char __pyx_k_with_signals[] = "with_signals";
static const char __pyx_k_DateTimeField[] = "DateTimeField";
static const char __pyx_k_Interval_type[] = "Interval type";
static const char __pyx_k_TextareaField[] = "TextareaField";
static const char __pyx_k_VSTSerializer[] = "VSTSerializer";
static const char __pyx_k_add_metaclass[] = "add_metaclass";
static const char __pyx_k_api_post_save[] = "api_post_save";
static const char __pyx_k_created_hosts[] = "created_hosts";
static const char __pyx_k_raw_inventory[] = "raw_inventory";
static const char __pyx_k_repo_handlers[] = "repo_handlers";
static const char __pyx_k_repo_password[] = "repo_password";
static const char __pyx_k_set_opts_vars[] = "set_opts_vars";
static const char __pyx_k_DataSerializer[] = "DataSerializer";
static const char __pyx_k_HookSerializer[] = "HookSerializer";
static const char __pyx_k_HostSerializer[] = "HostSerializer";
static const char __pyx_k_MultiTypeField[] = "MultiTypeField";
static const char __pyx_k_Range_of_hosts[] = "Range of hosts.";
static const char __pyx_k_Repo_auth_data[] = "Repo auth data";
static const char __pyx_k_Repo_auth_type[] = "Repo auth type";
static const char __pyx_k_TeamSerializer[] = "TeamSerializer";
static const char __pyx_k_UserSerializer[] = "UserSerializer";
static const char __pyx_k_ansible_become[] = "ansible_become";
static const char __pyx_k_check_password[] = "check_password";
static const char __pyx_k_content_object[] = "content_object";
static const char __pyx_k_created_groups[] = "created_groups";
static const char __pyx_k_execute_module[] = "execute_module";
static const char __pyx_k_execution_time[] = "execution_time";
static const char __pyx_k_get_raw_stdout[] = "get_raw_stdout";
static const char __pyx_k_initiator_type[] = "initiator_type";
static const char __pyx_k_pmwChartWidget[] = "pmwChartWidget";
static const char __pyx_k_readme_content[] = "readme_content";
static const char __pyx_k_repo_auth_data[] = "repo_auth_data";
static const char __pyx_k_repo_auth_type[] = "repo_auth_type";
static const char __pyx_k_representation[] = "representation";
static const char __pyx_k_rest_framework[] = "rest_framework";
static const char __pyx_k_run_validation[] = "run_validation";
static const char __pyx_k_validated_data[] = "validated_data";
static const char __pyx_k_variables_keys[] = "variables_keys";
static const char __pyx_k_widgetSettings[] = "widgetSettings";
static const char __pyx_k_Contains_groups[] = "Contains groups";
static const char __pyx_k_DependEnumField[] = "DependEnumField";
static const char __pyx_k_EmptySerializer[] = "EmptySerializer";
static const char __pyx_k_GroupSerializer[] = "GroupSerializer";
static const char __pyx_k_ModelSerializer[] = "ModelSerializer";
static const char __pyx_k_Repeat_password[] = "Repeat password";
static const char __pyx_k_ValidationError[] = "ValidationError";
static const char __pyx_k_cached_property[] = "cached_property";
static const char __pyx_k_generate_fileds[] = "generate_fileds";
static const char __pyx_k_list_to_choices[] = "list_to_choices";
static const char __pyx_k_pmwHostsCounter[] = "pmwHostsCounter";
static const char __pyx_k_pmwUsersCounter[] = "pmwUsersCounter";
static const char __pyx_k_raise_exception[] = "raise_exception";
static const char __pyx_k_start_repo_task[] = "start_repo_task";
static const char __pyx_k_template_option[] = "template_option";
static const char __pyx_k_vst_serializers[] = "vst_serializers";
static const char __pyx_k_writable_fields[] = "_writable_fields";
static const char __pyx_k_HTTP_201_CREATED[] = "HTTP_201_CREATED";
static const char __pyx_k_ModuleSerializer[] = "ModuleSerializer";
static const char __pyx_k_PermissionDenied[] = "PermissionDenied";
static const char __pyx_k_SignalSerializer[] = "_SignalSerializer";
static const char __pyx_k_ansible_ssh_pass[] = "ansible_ssh_pass";
static const char __pyx_k_execute_playbook[] = "execute_playbook";
static const char __pyx_k_pmwGroupsCounter[] = "pmwGroupsCounter";
static const char __pyx_k_repo_sync_on_run[] = "repo_sync_on_run";
static const char __pyx_k_when_types_names[] = "when_types_names";
static const char __pyx_k_AnsibleSerializer[] = "_AnsibleSerializer";
static const char __pyx_k_HistorySerializer[] = "HistorySerializer";
static const char __pyx_k_ModelRelatedField[] = "ModelRelatedField";
static const char __pyx_k_OneHostSerializer[] = "OneHostSerializer";
static const char __pyx_k_OneTeamSerializer[] = "OneTeamSerializer";
static const char __pyx_k_OneUserSerializer[] = "OneUserSerializer";
static const char __pyx_k_ProjectSerializer[] = "ProjectSerializer";
static const char __pyx_k_Start_template_id[] = "Start template [id={}].";
static const char __pyx_k_ansible_reference[] = "ansible_reference";
static const char __pyx_k_chartLineSettings[] = "chartLineSettings";
static const char __pyx_k_execute_view_data[] = "execute_view_data";
static const char __pyx_k_to_internal_value[] = "to_internal_value";
static const char __pyx_k_to_representation[] = "to_representation";
static const char __pyx_k_vstutils_api_base[] = "vstutils.api.base";
static const char __pyx_k_writable_fields_2[] = "writable_fields";
static const char __pyx_k_OneGroupSerializer[] = "OneGroupSerializer";
static const char __pyx_k_PlaybookSerializer[] = "PlaybookSerializer";
static const char __pyx_k_SecretFileInString[] = "SecretFileInString";
static const char __pyx_k_SetOwnerSerializer[] = "SetOwnerSerializer";
static const char __pyx_k_TemplateSerializer[] = "TemplateSerializer";
static const char __pyx_k_VariableSerializer[] = "VariableSerializer";
static const char __pyx_k_autoupdateInterval[] = "autoupdateInterval";
static const char __pyx_k_build_absolute_uri[] = "build_absolute_uri";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_get_inventory_data[] = "get_inventory_data";
static const char __pyx_k_pmwProjectsCounter[] = "pmwProjectsCounter";
static const char __pyx_k_AutoCompletionField[] = "AutoCompletionField";
static const char __pyx_k_HookSerializer_Meta[] = "HookSerializer.Meta";
static const char __pyx_k_HostSerializer_Meta[] = "HostSerializer.Meta";
static const char __pyx_k_InventoryOperations[] = "_InventoryOperations";
static const char __pyx_k_InventorySerializer[] = "InventorySerializer";
static const char __pyx_k_OneModuleSerializer[] = "OneModuleSerializer";
static const char __pyx_k_SerializerMetaclass[] = "SerializerMetaclass";
static const char __pyx_k_TeamSerializer_Meta[] = "TeamSerializer.Meta";
static const char __pyx_k_ValidationException[] = "ValidationException";
static const char __pyx_k_ansible_become_pass[] = "ansible_become_pass";
static const char __pyx_k_pmwTemplatesCounter[] = "pmwTemplatesCounter";
static const char __pyx_k_Confirm_new_password[] = "Confirm new password";
static const char __pyx_k_CreateUserSerializer[] = "CreateUserSerializer";
static const char __pyx_k_GroupSerializer_Meta[] = "GroupSerializer.Meta";
static const char __pyx_k_JsonObjectSerializer[] = "JsonObjectSerializer";
static const char __pyx_k_OneHistorySerializer[] = "OneHistorySerializer";
static const char __pyx_k_OneProjectSerializer[] = "OneProjectSerializer";
static const char __pyx_k_RedirectIntegerField[] = "RedirectIntegerField";
static const char __pyx_k_Started_at_inventory[] = "Started at inventory {}.";
static const char __pyx_k_ModuleSerializer_Meta[] = "ModuleSerializer.Meta";
static const char __pyx_k_OnePlaybookSerializer[] = "OnePlaybookSerializer";
static const char __pyx_k_OneTemplateSerializer[] = "OneTemplateSerializer";
static const char __pyx_k_SerializerMethodField[] = "SerializerMethodField";
static const char __pyx_k_UserSerializer_create[] = "UserSerializer.create";
static const char __pyx_k_UserSerializer_update[] = "UserSerializer.update";
static const char __pyx_k_autocomplete_property[] = "autocomplete_property";
static const char __pyx_k_pmwInventoriesCounter[] = "pmwInventoriesCounter";
static const char __pyx_k_AnsibleInventoryParser[] = "AnsibleInventoryParser";
static const char __pyx_k_HistoryLinesSerializer[] = "HistoryLinesSerializer";
static const char __pyx_k_HistorySerializer_Meta[] = "HistorySerializer.Meta";
static const char __pyx_k_OneHostSerializer_Meta[] = "OneHostSerializer.Meta";
static const char __pyx_k_OneInventorySerializer[] = "OneInventorySerializer";
static const char __pyx_k_OneTeamSerializer_Meta[] = "OneTeamSerializer.Meta";
static const char __pyx_k_OneUserSerializer_Meta[] = "OneUserSerializer.Meta";
static const char __pyx_k_Passwords_do_not_match[] = "Passwords do not match.";
static const char __pyx_k_PeriodictaskSerializer[] = "PeriodictaskSerializer";
static const char __pyx_k_PrimaryKeyRelatedField[] = "PrimaryKeyRelatedField";
static const char __pyx_k_ProjectSerializer_Meta[] = "ProjectSerializer.Meta";
static const char __pyx_k_TemplateExecSerializer[] = "TemplateExecSerializer";
static const char __pyx_k_UserSettingsSerializer[] = "UserSettingsSerializer";
static const char __pyx_k_autocomplete_represent[] = "autocomplete_represent";
static const char __pyx_k_AnsibleModuleSerializer[] = "AnsibleModuleSerializer";
static const char __pyx_k_DashboardJobsSerializer[] = "DashboardJobsSerializer";
static const char __pyx_k_OneGroupSerializer_Meta[] = "OneGroupSerializer.Meta";
static const char __pyx_k_Password_is_not_correct[] = "Password is not correct.";
static const char __pyx_k_PlaybookSerializer_Meta[] = "PlaybookSerializer.Meta";
static const char __pyx_k_SignalSerializer_create[] = "_SignalSerializer.create";
static const char __pyx_k_SignalSerializer_update[] = "_SignalSerializer.update";
static const char __pyx_k_TemplateSerializer_Meta[] = "TemplateSerializer.Meta";
static const char __pyx_k_VariableSerializer_Meta[] = "VariableSerializer.Meta";
static const char __pyx_k_WidgetSettingSerializer[] = "WidgetSettingSerializer";
static const char __pyx_k_WithVariablesSerializer[] = "_WithVariablesSerializer";
static const char __pyx_k_django_utils_functional[] = "django.utils.functional";
static const char __pyx_k_get_execution_inventory[] = "_get_execution_inventory";
static const char __pyx_k_ActionResponseSerializer[] = "ActionResponseSerializer";
static const char __pyx_k_ChangePasswordSerializer[] = "ChangePasswordSerializer";
static const char __pyx_k_InventoryDependEnumField[] = "InventoryDependEnumField";
static const char __pyx_k_InventorySerializer_Meta[] = "InventorySerializer.Meta";
static const char __pyx_k_ModelRelatedField___init[] = "ModelRelatedField.__init__";
static const char __pyx_k_OneModuleSerializer_Meta[] = "OneModuleSerializer.Meta";
static const char __pyx_k_ProjectHistorySerializer[] = "ProjectHistorySerializer";
static const char __pyx_k_Started_in_the_inventory[] = "Started in the inventory {}.";
static const char __pyx_k_WidgetSettingsSerializer[] = "WidgetSettingsSerializer";
static const char __pyx_k_vstutils_api_serializers[] = "vstutils.api.serializers";
static const char __pyx_k_AnsibleArgumentsReference[] = "AnsibleArgumentsReference";
static const char __pyx_k_AnsiblePlaybookSerializer[] = "AnsiblePlaybookSerializer";
static const char __pyx_k_CreateUserSerializer_Meta[] = "CreateUserSerializer.Meta";
static const char __pyx_k_DayDashboardJobSerializer[] = "DayDashboardJobSerializer";
static const char __pyx_k_ExecuteResponseSerializer[] = "ExecuteResponseSerializer";
static const char __pyx_k_InventoryImportSerializer[] = "InventoryImportSerializer";
static const char __pyx_k_OneHistorySerializer_Meta[] = "OneHistorySerializer.Meta";
static const char __pyx_k_OnePeriodictaskSerializer[] = "OnePeriodictaskSerializer";
static const char __pyx_k_OneProjectSerializer_Meta[] = "OneProjectSerializer.Meta";
static const char __pyx_k_OneProjectSerializer_sync[] = "OneProjectSerializer.sync";
static const char __pyx_k_ProjectVariableSerializer[] = "ProjectVariableSerializer";
static const char __pyx_k_SetOwnerSerializer_update[] = "SetOwnerSerializer.update";
static const char __pyx_k_WithPermissionsSerializer[] = "_WithPermissionsSerializer";
static const char __pyx_k_rest_framework_exceptions[] = "rest_framework.exceptions";
static const char __pyx_k_AnsibleSerializerMetaclass[] = "AnsibleSerializerMetaclass";
static const char __pyx_k_BaseDashboardJobSerializer[] = "BaseDashboardJobSerializer";
static const char __pyx_k_ChartLineSettingSerializer[] = "ChartLineSettingSerializer";
static const char __pyx_k_OnePlaybookSerializer_Meta[] = "OnePlaybookSerializer.Meta";
static const char __pyx_k_OneTemplateSerializer_Meta[] = "OneTemplateSerializer.Meta";
static const char __pyx_k_YearDashboardJobSerializer[] = "YearDashboardJobSerializer";
static const char __pyx_k_django_contrib_auth_models[] = "django.contrib.auth.models";
static const char __pyx_k_ChartLineSettingsSerializer[] = "ChartLineSettingsSerializer";
static const char __pyx_k_DictField_to_internal_value[] = "DictField.to_internal_value";
static const char __pyx_k_DictField_to_representation[] = "DictField.to_representation";
static const char __pyx_k_GroupCreateMasterSerializer[] = "GroupCreateMasterSerializer";
static const char __pyx_k_HistoryLinesSerializer_Meta[] = "HistoryLinesSerializer.Meta";
static const char __pyx_k_InventoryVariableSerializer[] = "InventoryVariableSerializer";
static const char __pyx_k_MonthDashboardJobSerializer[] = "MonthDashboardJobSerializer";
static const char __pyx_k_OneInventorySerializer_Meta[] = "OneInventorySerializer.Meta";
static const char __pyx_k_PeriodictaskSerializer_Meta[] = "PeriodictaskSerializer.Meta";
static const char __pyx_k_SetOwnerSerializer_get_user[] = "SetOwnerSerializer.get_user";
static const char __pyx_k_TemplateSerializer_get_vars[] = "TemplateSerializer.get_vars";
static const char __pyx_k_DashboardStatisticSerializer[] = "DashboardStatisticSerializer";
static const char __pyx_k_OneHistorySerializer_get_raw[] = "OneHistorySerializer.get_raw";
static const char __pyx_k_Types_of_repo_Default_MANUAL[] = "Types of repo. Default=\"MANUAL\".";
static const char __pyx_k_ansible_ssh_private_key_file[] = "ansible_ssh_private_key_file";
static const char __pyx_k_polemarch_api_v2_serializers[] = "polemarch.api.v2.serializers";
static const char __pyx_k_OneTemplateSerializer_execute[] = "OneTemplateSerializer.execute";
static const char __pyx_k_ProjectCreateMasterSerializer[] = "ProjectCreateMasterSerializer";
static const char __pyx_k_ProjectHistorySerializer_Meta[] = "ProjectHistorySerializer.Meta";
static const char __pyx_k_CounterWidgetSettingSerializer[] = "CounterWidgetSettingSerializer";
static const char __pyx_k_OneHistorySerializer_get_facts[] = "OneHistorySerializer.get_facts";
static const char __pyx_k_OnePeriodictaskSerializer_Meta[] = "OnePeriodictaskSerializer.Meta";
static const char __pyx_k_OneUserSerializer_Meta_genexpr[] = "OneUserSerializer.Meta.genexpr";
static const char __pyx_k_Only_for_GIT_repos_Password_to[] = "[Only for GIT repos] Password to fetch access.";
static const char __pyx_k_PeriodicTaskVariableSerializer[] = "PeriodicTaskVariableSerializer";
static const char __pyx_k_WithVariablesSerializer_create[] = "_WithVariablesSerializer.create";
static const char __pyx_k_WithVariablesSerializer_update[] = "_WithVariablesSerializer.update";
static const char __pyx_k_list_to_choices_locals_handler[] = "list_to_choices.<locals>.handler";
static const char __pyx_k_ChangePasswordSerializer_update[] = "ChangePasswordSerializer.update";
static const char __pyx_k_OneProjectSerializer__execution[] = "OneProjectSerializer._execution";
static const char __pyx_k_Only_for_GIT_repos_Checkout_bra[] = "[Only for GIT repos] Checkout branch on sync.";
static const char __pyx_k_Only_for_GIT_repos_Key_to_fetch[] = "[Only for GIT repos] Key to fetch access.";
static const char __pyx_k_PeriodictaskSerializer__do_with[] = "PeriodictaskSerializer._do_with_vars";
static const char __pyx_k_ProjectSerializer__do_with_vars[] = "ProjectSerializer._do_with_vars";
static const char __pyx_k_SetOwnerSerializer_current_user[] = "SetOwnerSerializer.current_user";
static const char __pyx_k_SignalSerializer__writable_fiel[] = "_SignalSerializer._writable_fields";
static const char __pyx_k_Sync_project_by_every_execution[] = "Sync project by every execution.";
static const char __pyx_k_TemplateSerializer_repr_options[] = "TemplateSerializer.repr_options";
static const char __pyx_k_WithPermissionsSerializer_curre[] = "_WithPermissionsSerializer.current_user";
static const char __pyx_k_WithPermissionsSerializer_is_va[] = "_WithPermissionsSerializer.is_valid";
static const char __pyx_k_WithVariablesSerializer__do_wit[] = "_WithVariablesSerializer._do_with_vars";
static const char __pyx_k_WithVariablesSerializer_get_var[] = "_WithVariablesSerializer.get_vars";
static const char __pyx_k_WithVariablesSerializer_to_repr[] = "_WithVariablesSerializer.to_representation";
static const char __pyx_k_polemarch_api_v2_serializers_py[] = "polemarch/api/v2/serializers.py";
static const char __pyx_k_AnsibleSerializerMetaclass___new[] = "AnsibleSerializerMetaclass.__new__";
static const char __pyx_k_ChangePasswordSerializer_to_repr[] = "ChangePasswordSerializer.to_representation";
static const char __pyx_k_CreateUserSerializer_run_validat[] = "CreateUserSerializer.run_validation";
static const char __pyx_k_InventoryDependEnumField_to_repr[] = "InventoryDependEnumField.to_representation";
static const char __pyx_k_InventoryImportSerializer_create[] = "InventoryImportSerializer.create";
static const char __pyx_k_MultiTypeField_to_internal_value[] = "MultiTypeField.to_internal_value";
static const char __pyx_k_MultiTypeField_to_representation[] = "MultiTypeField.to_representation";
static const char __pyx_k_New_passwords_values_are_not_equ[] = "New passwords' values are not equal.";
static const char __pyx_k_OneGroupSerializer_ValidationExc[] = "OneGroupSerializer.ValidationException";
static const char __pyx_k_OneHistorySerializer_get_raw_std[] = "OneHistorySerializer.get_raw_stdout";
static const char __pyx_k_OnePeriodictaskSerializer_execut[] = "OnePeriodictaskSerializer.execute";
static const char __pyx_k_OneProjectSerializer__get_execut[] = "OneProjectSerializer._get_execution_inventory";
static const char __pyx_k_OneProjectSerializer_execute_mod[] = "OneProjectSerializer.execute_module";
static const char __pyx_k_OneProjectSerializer_execute_pla[] = "OneProjectSerializer.execute_playbook";
static const char __pyx_k_Option_name_from_template_option[] = "Option name from template options.";
static const char __pyx_k_ProjectCreateMasterSerializer_Me[] = "ProjectCreateMasterSerializer.Meta";
static const char __pyx_k_ProjectCreateMasterSerializer_cr[] = "ProjectCreateMasterSerializer.create";
static const char __pyx_k_Relational_fields_should_not_pro[] = "Relational fields should not provide a `queryset` or `model` argument, when setting read_only=`True`.";
static const char __pyx_k_SetOwnerSerializer_to_internal_v[] = "SetOwnerSerializer.to_internal_value";
static const char __pyx_k_SetOwnerSerializer_to_representa[] = "SetOwnerSerializer.to_representation";
static const char __pyx_k_TemplateSerializer_set_opts_vars[] = "TemplateSerializer.set_opts_vars";
static const char __pyx_k_TemplateSerializer_to_representa[] = "TemplateSerializer.to_representation";
static const char __pyx_k_VariableSerializer_to_representa[] = "VariableSerializer.to_representation";
static const char __pyx_k_You_do_not_have_permission_to_pe[] = "You do not have permission to perform this action.";
static const char __pyx_k_You_don_t_have_permission_to_inv[] = "You don't have permission to inventory.";
static const char __pyx_k_specified_in_the_project_configu[] = "specified in the project configuration.";
static const char __pyx_k_with_signals_locals_func_wrapper[] = "with_signals.<locals>.func_wrapper";
static PyObject *__pyx_n_s_ActionResponseSerializer;
static PyObject *__pyx_n_s_AnsibleArgumentsReference;
static PyObject *__pyx_n_s_AnsibleInventoryParser;
static PyObject *__pyx_n_s_AnsibleModuleSerializer;
static PyObject *__pyx_n_s_AnsiblePlaybookSerializer;
static PyObject *__pyx_n_s_AnsibleSerializer;
static PyObject *__pyx_n_s_AnsibleSerializerMetaclass;
static PyObject *__pyx_n_s_AnsibleSerializerMetaclass___new;
static PyObject *__pyx_n_s_AutoCompletionField;
static PyObject *__pyx_n_u_BOOLEAN_VARS;
static PyObject *__pyx_n_s_BaseDashboardJobSerializer;
static PyObject *__pyx_n_s_BooleanField;
static PyObject *__pyx_n_u_CRONTAB;
static PyObject *__pyx_n_s_ChangePasswordSerializer;
static PyObject *__pyx_n_s_ChangePasswordSerializer_to_repr;
static PyObject *__pyx_n_s_ChangePasswordSerializer_update;
static PyObject *__pyx_n_s_CharField;
static PyObject *__pyx_n_s_ChartLineSettingSerializer;
static PyObject *__pyx_n_s_ChartLineSettingsSerializer;
static PyObject *__pyx_n_s_ChoiceField;
static PyObject *__pyx_kp_u_Confirm_new_password;
static PyObject *__pyx_kp_u_Contains_groups;
static PyObject *__pyx_n_s_CounterWidgetSettingSerializer;
static PyObject *__pyx_n_s_CreateUserSerializer;
static PyObject *__pyx_n_s_CreateUserSerializer_Meta;
static PyObject *__pyx_n_s_CreateUserSerializer_run_validat;
static PyObject *__pyx_n_s_DashboardJobsSerializer;
static PyObject *__pyx_n_s_DashboardStatisticSerializer;
static PyObject *__pyx_n_s_DataSerializer;
static PyObject *__pyx_n_s_DateTimeField;
static PyObject *__pyx_n_s_DayDashboardJobSerializer;
static PyObject *__pyx_n_s_DependEnumField;
static PyObject *__pyx_n_s_DictField;
static PyObject *__pyx_n_s_DictField_to_internal_value;
static PyObject *__pyx_n_s_DictField_to_representation;
static PyObject *__pyx_kp_u_ENCRYPTED;
static PyObject *__pyx_n_s_EmailField;
static PyObject *__pyx_n_s_EmptySerializer;
static PyObject *__pyx_n_s_ExecuteResponseSerializer;
static PyObject *__pyx_n_s_Group;
static PyObject *__pyx_n_s_GroupCreateMasterSerializer;
static PyObject *__pyx_n_s_GroupSerializer;
static PyObject *__pyx_n_s_GroupSerializer_Meta;
static PyObject *__pyx_n_s_HIDDEN_VARS;
static PyObject *__pyx_n_u_HIDDEN_VARS;
static PyObject *__pyx_n_s_HOST;
static PyObject *__pyx_n_u_HOST;
static PyObject *__pyx_n_s_HTTP_200_OK;
static PyObject *__pyx_n_s_HTTP_201_CREATED;
static PyObject *__pyx_n_s_HiddenField;
static PyObject *__pyx_n_s_History;
static PyObject *__pyx_n_s_HistoryLines;
static PyObject *__pyx_n_s_HistoryLinesSerializer;
static PyObject *__pyx_n_s_HistoryLinesSerializer_Meta;
static PyObject *__pyx_n_s_HistorySerializer;
static PyObject *__pyx_n_s_HistorySerializer_Meta;
static PyObject *__pyx_n_s_Hook;
static PyObject *__pyx_n_s_HookSerializer;
static PyObject *__pyx_n_s_HookSerializer_Meta;
static PyObject *__pyx_n_s_Host;
static PyObject *__pyx_n_s_HostSerializer;
static PyObject *__pyx_n_s_HostSerializer_Meta;
static PyObject *__pyx_n_s_HtmlField;
static PyObject *__pyx_n_u_INTERVAL;
static PyObject *__pyx_n_u_Information;
static PyObject *__pyx_n_s_IntegerField;
static PyObject *__pyx_kp_u_Interval_type;
static PyObject *__pyx_n_s_Inventory;
static PyObject *__pyx_n_u_Inventory;
static PyObject *__pyx_n_s_InventoryDependEnumField;
static PyObject *__pyx_n_s_InventoryDependEnumField_to_repr;
static PyObject *__pyx_n_s_InventoryImportSerializer;
static PyObject *__pyx_n_s_InventoryImportSerializer_create;
static PyObject *__pyx_n_s_InventoryOperations;
static PyObject *__pyx_n_s_InventorySerializer;
static PyObject *__pyx_n_s_InventorySerializer_Meta;
static PyObject *__pyx_n_s_InventoryVariableSerializer;
static PyObject *__pyx_n_s_JsonObjectSerializer;
static PyObject *__pyx_n_u_KEY;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_ListField;
static PyObject *__pyx_n_u_MANUAL;
static PyObject *__pyx_n_u_MODULE;
static PyObject *__pyx_n_s_Meta;
static PyObject *__pyx_n_s_ModelRelatedField;
static PyObject *__pyx_n_s_ModelRelatedField___init;
static PyObject *__pyx_n_s_ModelSerializer;
static PyObject *__pyx_n_s_Module;
static PyObject *__pyx_n_u_Module;
static PyObject *__pyx_n_s_ModuleSerializer;
static PyObject *__pyx_n_s_ModuleSerializer_Meta;
static PyObject *__pyx_n_s_MonthDashboardJobSerializer;
static PyObject *__pyx_n_s_MultiTypeField;
static PyObject *__pyx_n_s_MultiTypeField_to_internal_value;
static PyObject *__pyx_n_s_MultiTypeField_to_representation;
static PyObject *__pyx_n_u_NONE;
static PyObject *__pyx_kp_u_New_owner;
static PyObject *__pyx_kp_u_New_password;
static PyObject *__pyx_kp_u_New_passwords_values_are_not_equ;
static PyObject *__pyx_n_s_OneGroupSerializer;
static PyObject *__pyx_n_s_OneGroupSerializer_Meta;
static PyObject *__pyx_n_s_OneGroupSerializer_ValidationExc;
static PyObject *__pyx_n_s_OneHistorySerializer;
static PyObject *__pyx_n_s_OneHistorySerializer_Meta;
static PyObject *__pyx_n_s_OneHistorySerializer_get_facts;
static PyObject *__pyx_n_s_OneHistorySerializer_get_raw;
static PyObject *__pyx_n_s_OneHistorySerializer_get_raw_std;
static PyObject *__pyx_n_s_OneHostSerializer;
static PyObject *__pyx_n_s_OneHostSerializer_Meta;
static PyObject *__pyx_n_s_OneInventorySerializer;
static PyObject *__pyx_n_s_OneInventorySerializer_Meta;
static PyObject *__pyx_n_s_OneModuleSerializer;
static PyObject *__pyx_n_s_OneModuleSerializer_Meta;
static PyObject *__pyx_n_s_OnePeriodictaskSerializer;
static PyObject *__pyx_n_s_OnePeriodictaskSerializer_Meta;
static PyObject *__pyx_n_s_OnePeriodictaskSerializer_execut;
static PyObject *__pyx_n_s_OnePlaybookSerializer;
static PyObject *__pyx_n_s_OnePlaybookSerializer_Meta;
static PyObject *__pyx_n_s_OneProjectSerializer;
static PyObject *__pyx_n_s_OneProjectSerializer_Meta;
static PyObject *__pyx_n_s_OneProjectSerializer__execution;
static PyObject *__pyx_n_s_OneProjectSerializer__get_execut;
static PyObject *__pyx_n_s_OneProjectSerializer_execute_mod;
static PyObject *__pyx_n_s_OneProjectSerializer_execute_pla;
static PyObject *__pyx_n_s_OneProjectSerializer_sync;
static PyObject *__pyx_n_s_OneTeamSerializer;
static PyObject *__pyx_n_s_OneTeamSerializer_Meta;
static PyObject *__pyx_n_s_OneTemplateSerializer;
static PyObject *__pyx_n_s_OneTemplateSerializer_Meta;
static PyObject *__pyx_n_s_OneTemplateSerializer_execute;
static PyObject *__pyx_n_s_OneUserSerializer;
static PyObject *__pyx_n_s_OneUserSerializer_Meta;
static PyObject *__pyx_n_s_OneUserSerializer_Meta_genexpr;
static PyObject *__pyx_kp_u_One_host;
static PyObject *__pyx_kp_u_Only_for_GIT_repos_Checkout_bra;
static PyObject *__pyx_kp_u_Only_for_GIT_repos_Key_to_fetch;
static PyObject *__pyx_kp_u_Only_for_GIT_repos_Password_to;
static PyObject *__pyx_kp_u_Option_name_from_template_option;
static PyObject *__pyx_n_s_OrderedDict;
static PyObject *__pyx_n_u_PASSWORD;
static PyObject *__pyx_n_u_PLAYBOOK;
static PyObject *__pyx_kp_u_Password_is_not_correct;
static PyObject *__pyx_kp_u_Passwords_do_not_match;
static PyObject *__pyx_n_s_PeriodicTask;
static PyObject *__pyx_n_s_PeriodicTaskVariableSerializer;
static PyObject *__pyx_n_s_PeriodictaskSerializer;
static PyObject *__pyx_n_s_PeriodictaskSerializer_Meta;
static PyObject *__pyx_n_s_PeriodictaskSerializer__do_with;
static PyObject *__pyx_n_s_PermissionDenied;
static PyObject *__pyx_n_u_Playbook;
static PyObject *__pyx_n_s_PlaybookSerializer;
static PyObject *__pyx_n_s_PlaybookSerializer_Meta;
static PyObject *__pyx_n_s_PrimaryKeyRelatedField;
static PyObject *__pyx_n_s_Project;
static PyObject *__pyx_n_s_ProjectCreateMasterSerializer;
static PyObject *__pyx_n_s_ProjectCreateMasterSerializer_Me;
static PyObject *__pyx_n_s_ProjectCreateMasterSerializer_cr;
static PyObject *__pyx_n_s_ProjectHistorySerializer;
static PyObject *__pyx_n_s_ProjectHistorySerializer_Meta;
static PyObject *__pyx_n_s_ProjectSerializer;
static PyObject *__pyx_n_s_ProjectSerializer_Meta;
static PyObject *__pyx_n_s_ProjectSerializer__do_with_vars;
static PyObject *__pyx_n_s_ProjectVariableSerializer;
static PyObject *__pyx_n_s_RANGE;
static PyObject *__pyx_kp_u_Range_of_hosts;
static PyObject *__pyx_n_s_RedirectIntegerField;
static PyObject *__pyx_kp_u_Relational_fields_should_not_pro;
static PyObject *__pyx_kp_u_Repeat_password;
static PyObject *__pyx_kp_u_Repo_auth_data;
static PyObject *__pyx_kp_u_Repo_auth_type;
static PyObject *__pyx_kp_u_Repo_type;
static PyObject *__pyx_kp_u_Repo_url;
static PyObject *__pyx_n_s_Response;
static PyObject *__pyx_n_s_STATUSES;
static PyObject *__pyx_n_s_SecretFileInString;
static PyObject *__pyx_n_s_Select2Field;
static PyObject *__pyx_n_s_Serializer;
static PyObject *__pyx_n_s_SerializerMetaclass;
static PyObject *__pyx_n_s_SerializerMethodField;
static PyObject *__pyx_n_s_SetOwnerSerializer;
static PyObject *__pyx_n_s_SetOwnerSerializer_current_user;
static PyObject *__pyx_n_s_SetOwnerSerializer_get_user;
static PyObject *__pyx_n_s_SetOwnerSerializer_to_internal_v;
static PyObject *__pyx_n_s_SetOwnerSerializer_to_representa;
static PyObject *__pyx_n_s_SetOwnerSerializer_update;
static PyObject *__pyx_n_s_SignalSerializer;
static PyObject *__pyx_n_s_SignalSerializer__writable_fiel;
static PyObject *__pyx_n_s_SignalSerializer_create;
static PyObject *__pyx_n_s_SignalSerializer_update;
static PyObject *__pyx_n_u_Staff;
static PyObject *__pyx_kp_u_Start_template_id;
static PyObject *__pyx_kp_u_Started_at_inventory;
static PyObject *__pyx_kp_u_Started_in_the_inventory;
static PyObject *__pyx_kp_u_Sync_project_by_every_execution;
static PyObject *__pyx_kp_u_Sync_with;
static PyObject *__pyx_n_u_TEMPLATE;
static PyObject *__pyx_n_s_Task;
static PyObject *__pyx_n_u_Task;
static PyObject *__pyx_kp_u_Task_type;
static PyObject *__pyx_n_s_TeamSerializer;
static PyObject *__pyx_n_s_TeamSerializer_Meta;
static PyObject *__pyx_n_s_Template;
static PyObject *__pyx_n_s_TemplateExecSerializer;
static PyObject *__pyx_n_s_TemplateSerializer;
static PyObject *__pyx_n_s_TemplateSerializer_Meta;
static PyObject *__pyx_n_s_TemplateSerializer_get_vars;
static PyObject *__pyx_n_s_TemplateSerializer_repr_options;
static PyObject *__pyx_n_s_TemplateSerializer_set_opts_vars;
static PyObject *__pyx_n_s_TemplateSerializer_to_representa;
static PyObject *__pyx_n_s_TextareaField;
static PyObject *__pyx_n_u_True;
static PyObject *__pyx_n_u_Type;
static PyObject *__pyx_kp_u_Types_of_repo_Default_MANUAL;
static PyObject *__pyx_kp_u_Unknown_kind;
static PyObject *__pyx_kp_u_Unknown_type;
static PyObject *__pyx_n_s_UptimeField;
static PyObject *__pyx_n_s_User;
static PyObject *__pyx_n_u_User;
static PyObject *__pyx_n_s_UserGroup;
static PyObject *__pyx_n_s_UserSerializer;
static PyObject *__pyx_n_s_UserSerializer_create;
static PyObject *__pyx_n_s_UserSerializer_update;
static PyObject *__pyx_n_s_UserSettingsSerializer;
static PyObject *__pyx_n_s_VSTCharField;
static PyObject *__pyx_n_s_VSTSerializer;
static PyObject *__pyx_n_s_ValidationError;
static PyObject *__pyx_n_s_ValidationException;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_Variable;
static PyObject *__pyx_n_s_VariableSerializer;
static PyObject *__pyx_n_s_VariableSerializer_Meta;
static PyObject *__pyx_n_s_VariableSerializer_to_representa;
static PyObject *__pyx_n_s_WidgetSettingSerializer;
static PyObject *__pyx_n_s_WidgetSettingsSerializer;
static PyObject *__pyx_n_s_WithPermissionsSerializer;
static PyObject *__pyx_n_s_WithPermissionsSerializer_curre;
static PyObject *__pyx_n_s_WithPermissionsSerializer_is_va;
static PyObject *__pyx_n_s_WithVariablesSerializer;
static PyObject *__pyx_n_s_WithVariablesSerializer__do_wit;
static PyObject *__pyx_n_s_WithVariablesSerializer_create;
static PyObject *__pyx_n_s_WithVariablesSerializer_get_var;
static PyObject *__pyx_n_s_WithVariablesSerializer_to_repr;
static PyObject *__pyx_n_s_WithVariablesSerializer_update;
static PyObject *__pyx_n_s_YearDashboardJobSerializer;
static PyObject *__pyx_kp_u_You_do_not_have_permission_to_pe;
static PyObject *__pyx_kp_u_You_don_t_have_permission_to_inv;
static PyObject *__pyx_kp_u__10;
static PyObject *__pyx_kp_u__18;
static PyObject *__pyx_n_u__19;
static PyObject *__pyx_kp_u__4;
static PyObject *__pyx_n_s_acl_handler;
static PyObject *__pyx_n_s_active;
static PyObject *__pyx_n_s_add;
static PyObject *__pyx_n_s_add_metaclass;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_n_u_all;
static PyObject *__pyx_n_s_all_tasks;
static PyObject *__pyx_n_s_allow_blank;
static PyObject *__pyx_n_u_allow_blank;
static PyObject *__pyx_n_s_allow_null;
static PyObject *__pyx_n_u_ansible_become;
static PyObject *__pyx_n_u_ansible_become_pass;
static PyObject *__pyx_n_u_ansible_port;
static PyObject *__pyx_n_s_ansible_reference;
static PyObject *__pyx_n_u_ansible_ssh_pass;
static PyObject *__pyx_n_u_ansible_ssh_private_key_file;
static PyObject *__pyx_n_s_ansible_type;
static PyObject *__pyx_n_s_api_post_save;
static PyObject *__pyx_n_s_api_pre_save;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_atomic;
static PyObject *__pyx_n_s_attr;
static PyObject *__pyx_n_s_attrs;
static PyObject *__pyx_n_s_auth_data;
static PyObject *__pyx_n_u_auth_data;
static PyObject *__pyx_n_s_auth_types;
static PyObject *__pyx_n_s_autocomplete;
static PyObject *__pyx_n_u_autocomplete;
static PyObject *__pyx_n_s_autocomplete_property;
static PyObject *__pyx_n_s_autocomplete_represent;
static PyObject *__pyx_n_s_autoupdateInterval;
static PyObject *__pyx_n_s_bases;
static PyObject *__pyx_n_u_boolean;
static PyObject *__pyx_n_u_branch;
static PyObject *__pyx_n_s_build_absolute_uri;
static PyObject *__pyx_n_s_cached_property;
static PyObject *__pyx_n_s_chartLineSettings;
static PyObject *__pyx_n_s_check_password;
static PyObject *__pyx_n_s_children;
static PyObject *__pyx_n_u_children;
static PyObject *__pyx_n_s_choices;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_class_types;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_collapse;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_u_color;
static PyObject *__pyx_n_s_content_object;
static PyObject *__pyx_n_s_context;
static PyObject *__pyx_n_s_create;
static PyObject *__pyx_n_u_create;
static PyObject *__pyx_n_s_created_groups;
static PyObject *__pyx_n_s_created_hosts;
static PyObject *__pyx_n_u_crontab;
static PyObject *__pyx_n_s_current_user;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_u_data;
static PyObject *__pyx_n_s_day;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_u_default;
static PyObject *__pyx_n_s_delay;
static PyObject *__pyx_n_s_detail;
static PyObject *__pyx_n_u_disabled;
static PyObject *__pyx_n_s_django_contrib_auth_models;
static PyObject *__pyx_n_s_django_db;
static PyObject *__pyx_n_s_django_utils_functional;
static PyObject *__pyx_n_s_do_with_vars;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_email;
static PyObject *__pyx_n_s_empty;
static PyObject *__pyx_n_u_enable;
static PyObject *__pyx_n_u_enabled;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_n_s_exceptions;
static PyObject *__pyx_n_s_execute;
static PyObject *__pyx_n_u_execute_args;
static PyObject *__pyx_n_s_execute_module;
static PyObject *__pyx_n_s_execute_playbook;
static PyObject *__pyx_n_s_execute_view_data;
static PyObject *__pyx_n_u_execute_view_data;
static PyObject *__pyx_n_s_execution;
static PyObject *__pyx_n_s_execution_time;
static PyObject *__pyx_n_u_execution_time;
static PyObject *__pyx_n_s_executor;
static PyObject *__pyx_n_u_executor;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_extra_kwargs;
static PyObject *__pyx_n_s_facts;
static PyObject *__pyx_n_s_fail;
static PyObject *__pyx_n_s_field;
static PyObject *__pyx_n_s_field_name;
static PyObject *__pyx_n_u_field_name;
static PyObject *__pyx_n_s_field_object;
static PyObject *__pyx_n_s_fields;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_func;
static PyObject *__pyx_n_s_func_wrapper;
static PyObject *__pyx_n_s_g_subs;
static PyObject *__pyx_n_s_generate_fileds;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_execution_inventory;
static PyObject *__pyx_n_s_get_facts;
static PyObject *__pyx_n_s_get_inventory_data;
static PyObject *__pyx_n_s_get_raw;
static PyObject *__pyx_n_s_get_raw_stdout;
static PyObject *__pyx_n_s_get_user;
static PyObject *__pyx_n_s_get_vars;
static PyObject *__pyx_n_s_group;
static PyObject *__pyx_n_u_group;
static PyObject *__pyx_n_s_groups;
static PyObject *__pyx_n_u_groups;
static PyObject *__pyx_n_s_handler;
static PyObject *__pyx_n_s_handlers;
static PyObject *__pyx_n_u_help;
static PyObject *__pyx_n_s_help_text;
static PyObject *__pyx_n_u_hidden;
static PyObject *__pyx_n_s_hidden_vars;
static PyObject *__pyx_n_s_history_id;
static PyObject *__pyx_n_s_host;
static PyObject *__pyx_n_s_hosts;
static PyObject *__pyx_n_u_hosts;
static PyObject *__pyx_n_s_hv;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_u_id;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_init_type;
static PyObject *__pyx_n_s_initiator;
static PyObject *__pyx_n_u_initiator;
static PyObject *__pyx_n_s_initiator_type;
static PyObject *__pyx_n_u_initiator_type;
static PyObject *__pyx_n_s_instance;
static PyObject *__pyx_n_u_instance;
static PyObject *__pyx_n_u_int;
static PyObject *__pyx_n_u_integer;
static PyObject *__pyx_n_s_interrupted;
static PyObject *__pyx_n_s_inv_group;
static PyObject *__pyx_n_s_inv_host;
static PyObject *__pyx_n_s_inv_json;
static PyObject *__pyx_n_s_inventories;
static PyObject *__pyx_n_s_inventory;
static PyObject *__pyx_n_u_inventory;
static PyObject *__pyx_n_s_inventory_id;
static PyObject *__pyx_n_s_is_staff;
static PyObject *__pyx_n_s_is_valid;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_items_list;
static PyObject *__pyx_n_s_jobs;
static PyObject *__pyx_n_s_json;
static PyObject *__pyx_n_s_k;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_u_key;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_kind;
static PyObject *__pyx_n_u_kind;
static PyObject *__pyx_n_s_kinds;
static PyObject *__pyx_n_s_kw;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_label;
static PyObject *__pyx_n_u_line;
static PyObject *__pyx_n_u_line_gnumber;
static PyObject *__pyx_n_u_line_number;
static PyObject *__pyx_n_s_list;
static PyObject *__pyx_n_s_list_to_choices;
static PyObject *__pyx_n_s_list_to_choices_locals_handler;
static PyObject *__pyx_n_s_loads;
static PyObject *__pyx_n_s_lower;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_main_2;
static PyObject *__pyx_n_s_main_models;
static PyObject *__pyx_n_s_main_utils;
static PyObject *__pyx_n_s_many;
static PyObject *__pyx_n_s_map;
static PyObject *__pyx_n_s_mask_key;
static PyObject *__pyx_n_s_max_value;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_method;
static PyObject *__pyx_n_s_method_name;
static PyObject *__pyx_n_s_min_length;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_u_mode;
static PyObject *__pyx_n_s_model;
static PyObject *__pyx_n_u_model;
static PyObject *__pyx_n_s_models;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_u_module;
static PyObject *__pyx_n_s_module_2;
static PyObject *__pyx_n_s_month;
static PyObject *__pyx_n_s_msg;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_u_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_u_no;
static PyObject *__pyx_n_s_notes;
static PyObject *__pyx_n_u_notes;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_obj_id;
static PyObject *__pyx_n_s_objects;
static PyObject *__pyx_n_s_offline;
static PyObject *__pyx_n_s_ok;
static PyObject *__pyx_n_s_old_password;
static PyObject *__pyx_n_u_old_password;
static PyObject *__pyx_n_s_option;
static PyObject *__pyx_n_u_option;
static PyObject *__pyx_n_s_options;
static PyObject *__pyx_n_u_options;
static PyObject *__pyx_n_s_options_list;
static PyObject *__pyx_n_u_options_list;
static PyObject *__pyx_n_s_owned_by;
static PyObject *__pyx_n_s_owner;
static PyObject *__pyx_n_u_owner;
static PyObject *__pyx_n_s_parser;
static PyObject *__pyx_n_s_password;
static PyObject *__pyx_n_u_password;
static PyObject *__pyx_n_s_password2;
static PyObject *__pyx_n_u_password2;
static PyObject *__pyx_n_u_path;
static PyObject *__pyx_n_s_perms_msg;
static PyObject *__pyx_n_s_pk;
static PyObject *__pyx_n_s_playbook;
static PyObject *__pyx_n_u_playbook;
static PyObject *__pyx_n_s_pmwChartWidget;
static PyObject *__pyx_n_s_pmwGroupsCounter;
static PyObject *__pyx_n_s_pmwHostsCounter;
static PyObject *__pyx_n_s_pmwInventoriesCounter;
static PyObject *__pyx_n_s_pmwProjectsCounter;
static PyObject *__pyx_n_s_pmwTemplatesCounter;
static PyObject *__pyx_n_s_pmwUsersCounter;
static PyObject *__pyx_n_s_polemarch_api_v2_serializers;
static PyObject *__pyx_kp_s_polemarch_api_v2_serializers_py;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_project;
static PyObject *__pyx_n_u_project;
static PyObject *__pyx_n_s_project_keys;
static PyObject *__pyx_n_s_projects;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_query_params;
static PyObject *__pyx_n_s_queryset;
static PyObject *__pyx_n_u_queryset;
static PyObject *__pyx_n_s_raise_exception;
static PyObject *__pyx_kp_u_raw;
static PyObject *__pyx_n_u_raw_args;
static PyObject *__pyx_n_s_raw_data;
static PyObject *__pyx_n_u_raw_data;
static PyObject *__pyx_n_s_raw_dict;
static PyObject *__pyx_n_u_raw_inventory;
static PyObject *__pyx_n_s_raw_stdout;
static PyObject *__pyx_n_u_raw_stdout;
static PyObject *__pyx_n_s_rdata;
static PyObject *__pyx_n_s_read_only;
static PyObject *__pyx_n_u_read_only;
static PyObject *__pyx_n_s_readme_content;
static PyObject *__pyx_n_u_readme_content;
static PyObject *__pyx_n_u_recipients;
static PyObject *__pyx_n_s_ref;
static PyObject *__pyx_n_s_ref_type;
static PyObject *__pyx_n_s_rep;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_kp_u_repo;
static PyObject *__pyx_n_s_repo_auth;
static PyObject *__pyx_n_u_repo_auth;
static PyObject *__pyx_n_s_repo_auth_data;
static PyObject *__pyx_n_s_repo_auth_type;
static PyObject *__pyx_n_u_repo_branch;
static PyObject *__pyx_n_s_repo_class;
static PyObject *__pyx_n_s_repo_handlers;
static PyObject *__pyx_n_u_repo_key;
static PyObject *__pyx_n_u_repo_password;
static PyObject *__pyx_n_u_repo_sync_on_run;
static PyObject *__pyx_n_s_repo_type;
static PyObject *__pyx_n_u_repo_type;
static PyObject *__pyx_n_s_repository;
static PyObject *__pyx_n_u_repository;
static PyObject *__pyx_n_s_repr_options;
static PyObject *__pyx_n_s_representation;
static PyObject *__pyx_n_s_request;
static PyObject *__pyx_n_u_request;
static PyObject *__pyx_n_s_required;
static PyObject *__pyx_n_u_required;
static PyObject *__pyx_n_s_rest_framework;
static PyObject *__pyx_n_s_rest_framework_exceptions;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_u_revision;
static PyObject *__pyx_n_s_run_validation;
static PyObject *__pyx_n_s_save;
static PyObject *__pyx_n_u_save_result;
static PyObject *__pyx_n_s_schedule;
static PyObject *__pyx_n_u_schedule;
static PyObject *__pyx_n_u_secretfile;
static PyObject *__pyx_n_s_select;
static PyObject *__pyx_n_u_select2;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_sender;
static PyObject *__pyx_n_s_serializer;
static PyObject *__pyx_n_s_serializers;
static PyObject *__pyx_n_s_set_opts_vars;
static PyObject *__pyx_n_s_set_owner;
static PyObject *__pyx_n_s_set_password;
static PyObject *__pyx_n_s_settings;
static PyObject *__pyx_n_s_signals;
static PyObject *__pyx_n_s_six;
static PyObject *__pyx_n_s_sort;
static PyObject *__pyx_n_u_source;
static PyObject *__pyx_n_u_source_attrs;
static PyObject *__pyx_kp_u_specified_in_the_project_configu;
static PyObject *__pyx_n_s_start_repo_task;
static PyObject *__pyx_n_u_start_time;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_status;
static PyObject *__pyx_n_u_status;
static PyObject *__pyx_n_s_status_code;
static PyObject *__pyx_n_s_statuses;
static PyObject *__pyx_n_u_stop_time;
static PyObject *__pyx_n_u_string;
static PyObject *__pyx_n_s_string_types;
static PyObject *__pyx_n_s_sum;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_sync;
static PyObject *__pyx_n_u_sync;
static PyObject *__pyx_n_s_teams;
static PyObject *__pyx_n_s_template;
static PyObject *__pyx_n_u_template;
static PyObject *__pyx_n_s_template_opt;
static PyObject *__pyx_n_u_template_opt;
static PyObject *__pyx_n_u_template_option;
static PyObject *__pyx_n_s_templates;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_text_type;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_to_internal_value;
static PyObject *__pyx_n_s_to_representation;
static PyObject *__pyx_n_s_transaction;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_u_type;
static PyObject *__pyx_n_s_types;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_u_update;
static PyObject *__pyx_n_s_user;
static PyObject *__pyx_n_s_user_id;
static PyObject *__pyx_n_u_user_id;
static PyObject *__pyx_n_u_username;
static PyObject *__pyx_n_s_users;
static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_validated_data;
static PyObject *__pyx_n_u_validated_data;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_u_value;
static PyObject *__pyx_n_s_var;
static PyObject *__pyx_n_s_variables;
static PyObject *__pyx_n_s_variables_keys;
static PyObject *__pyx_n_s_vars;
static PyObject *__pyx_n_u_vars;
static PyObject *__pyx_n_u_verbose;
static PyObject *__pyx_n_u_version;
static PyObject *__pyx_n_s_viewable_by;
static PyObject *__pyx_n_s_vst_fields;
static PyObject *__pyx_n_s_vst_serializers;
static PyObject *__pyx_n_s_vstutils_api;
static PyObject *__pyx_n_s_vstutils_api_base;
static PyObject *__pyx_n_s_vstutils_api_serializers;
static PyObject *__pyx_n_s_when;
static PyObject *__pyx_n_u_when;
static PyObject *__pyx_n_s_when_types_names;
static PyObject *__pyx_n_s_widgetSettings;
static PyObject *__pyx_n_s_with_signals;
static PyObject *__pyx_n_s_with_signals_locals_func_wrapper;
static PyObject *__pyx_n_s_writable_fields;
static PyObject *__pyx_n_s_writable_fields_2;
static PyObject *__pyx_n_s_write_only;
static PyObject *__pyx_n_u_write_only;
static PyObject *__pyx_n_s_year;
static PyObject *__pyx_n_u_yes;
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_17ModelRelatedField___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_9DictField_to_internal_value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_9DictField_2to_representation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_14MultiTypeField_to_internal_value(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_14MultiTypeField_2to_representation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24InventoryDependEnumField_to_representation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_12with_signals_func_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_with_signals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_instance, PyObject *__pyx_v_validated_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_2get_user(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_validated_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_4current_user(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_6to_representation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_8to_internal_value(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_update(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_validated_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_2to_representation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_17_SignalSerializer__writable_fields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_17_SignalSerializer_2create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_validated_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_17_SignalSerializer_4update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_validated_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_is_valid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_2current_user(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_14UserSerializer_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_14UserSerializer_2update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_validated_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_4Meta_genexpr(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20CreateUserSerializer_run_validation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_get_raw(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_request); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_2get_raw_stdout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_4get_facts(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_request); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18VariableSerializer_to_representation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer__do_with_vars(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_method_name, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_2create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_validated_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_4update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_validated_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_6get_vars(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_representation); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_8to_representation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_hidden_vars); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_22PeriodictaskSerializer__do_with_vars(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_25OnePeriodictaskSerializer_execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_get_vars(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_representation); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_2set_opts_vars(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_rep, PyObject *__pyx_v_hidden_vars); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_4repr_options(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_data, PyObject *__pyx_v_hidden_vars); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_6to_representation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_21OneTemplateSerializer_execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_request); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_15list_to_choices_handler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_item); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_2list_to_choices(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_items_list); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_29ProjectCreateMasterSerializer_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_validated_data); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_17ProjectSerializer__do_with_vars(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_sync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_2_get_execution_inventory(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_template, PyObject *__pyx_v_inventory, PyObject *__pyx_v_user); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_4_execution(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_data, PyObject *__pyx_v_user, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_6execute_playbook(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_request); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_8execute_module(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_request); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_4generate_fileds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ansible_type); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_26AnsibleSerializerMetaclass___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_name, PyObject *__pyx_v_bases, PyObject *__pyx_v_attrs); /* proto */
static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_25InventoryImportSerializer_create(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_validated_data); /* proto */
static PyObject *__pyx_tp_new_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop = {0, &__pyx_n_s_pop, 0, 0, 0};
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_4;
static PyObject *__pyx_int_409;
static PyObject *__pyx_int_15000;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
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__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_codeobj__3;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__140;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__144;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_codeobj__13;
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__73;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__92;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__143;
static PyObject *__pyx_codeobj__145;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__149;
/* Late includes */

/* "polemarch/api/v2/serializers.py":27
 * # Serializers field for usability
 * class ModelRelatedField(serializers.PrimaryKeyRelatedField):
 *     def __init__(self, **kwargs):  # nocv             # <<<<<<<<<<<<<<
 *         model = kwargs.pop("model", None)
 *         assert not ((model is not None or self.queryset is not None) and
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_17ModelRelatedField_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_17ModelRelatedField_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_17ModelRelatedField_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_17ModelRelatedField_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 27, __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_self = 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, 27, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.ModelRelatedField.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_17ModelRelatedField___init__(__pyx_self, __pyx_v_self, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_17ModelRelatedField___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_model = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "polemarch/api/v2/serializers.py":28
 * class ModelRelatedField(serializers.PrimaryKeyRelatedField):
 *     def __init__(self, **kwargs):  # nocv
 *         model = kwargs.pop("model", None)             # <<<<<<<<<<<<<<
 *         assert not ((model is not None or self.queryset is not None) and
 *                     kwargs.get('read_only', None)), (
 */
  __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_kwargs, __pyx_n_u_model, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_model = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":29
 *     def __init__(self, **kwargs):  # nocv
 *         model = kwargs.pop("model", None)
 *         assert not ((model is not None or self.queryset is not None) and             # <<<<<<<<<<<<<<
 *                     kwargs.get('read_only', None)), (
 *             'Relational fields should not provide a `queryset` or `model`'
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_3 = (__pyx_v_model != Py_None);
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (!__pyx_t_4) {
    } else {
      goto __pyx_L4_next_and;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queryset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = (__pyx_t_1 != Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_L4_next_and:;

    /* "polemarch/api/v2/serializers.py":30
 *         model = kwargs.pop("model", None)
 *         assert not ((model is not None or self.queryset is not None) and
 *                     kwargs.get('read_only', None)), (             # <<<<<<<<<<<<<<
 *             'Relational fields should not provide a `queryset` or `model`'
 *             ' argument, when setting read_only=`True`.'
 */
    __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_u_read_only, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 30, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_3;
    __pyx_L3_bool_binop_done:;

    /* "polemarch/api/v2/serializers.py":29
 *     def __init__(self, **kwargs):  # nocv
 *         model = kwargs.pop("model", None)
 *         assert not ((model is not None or self.queryset is not None) and             # <<<<<<<<<<<<<<
 *                     kwargs.get('read_only', None)), (
 *             'Relational fields should not provide a `queryset` or `model`'
 */
    if (unlikely(!((!__pyx_t_2) != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Relational_fields_should_not_pro);
      __PYX_ERR(0, 29, __pyx_L1_error)
    }
  }
  #endif

  /* "polemarch/api/v2/serializers.py":34
 *             ' argument, when setting read_only=`True`.'
 *         )
 *         if model is not None:             # <<<<<<<<<<<<<<
 *             kwargs["queryset"] = model.objects.all()
 *         super(ModelRelatedField, self).__init__(**kwargs)
 */
  __pyx_t_2 = (__pyx_v_model != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "polemarch/api/v2/serializers.py":35
 *         )
 *         if model is not None:
 *             kwargs["queryset"] = model.objects.all()             # <<<<<<<<<<<<<<
 *         super(ModelRelatedField, self).__init__(**kwargs)
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_model, __pyx_n_s_objects); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_all); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_queryset, __pyx_t_1) < 0)) __PYX_ERR(0, 35, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":34
 *             ' argument, when setting read_only=`True`.'
 *         )
 *         if model is not None:             # <<<<<<<<<<<<<<
 *             kwargs["queryset"] = model.objects.all()
 *         super(ModelRelatedField, self).__init__(**kwargs)
 */
  }

  /* "polemarch/api/v2/serializers.py":36
 *         if model is not None:
 *             kwargs["queryset"] = model.objects.all()
 *         super(ModelRelatedField, self).__init__(**kwargs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ModelRelatedField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":27
 * # Serializers field for usability
 * class ModelRelatedField(serializers.PrimaryKeyRelatedField):
 *     def __init__(self, **kwargs):  # nocv             # <<<<<<<<<<<<<<
 *         model = kwargs.pop("model", None)
 *         assert not ((model is not None or self.queryset is not None) and
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.ModelRelatedField.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_model);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":41
 * class DictField(serializers.CharField):
 * 
 *     def to_internal_value(self, data):  # nocv             # <<<<<<<<<<<<<<
 *         return (
 *             data
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_9DictField_1to_internal_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_9DictField_1to_internal_value = {"to_internal_value", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_9DictField_1to_internal_value, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_9DictField_1to_internal_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_internal_value (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_internal_value", 1, 2, 2, 1); __PYX_ERR(0, 41, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_internal_value") < 0)) __PYX_ERR(0, 41, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_internal_value", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 41, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.DictField.to_internal_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_9DictField_to_internal_value(__pyx_self, __pyx_v_self, __pyx_v_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_9DictField_to_internal_value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("to_internal_value", 0);

  /* "polemarch/api/v2/serializers.py":42
 * 
 *     def to_internal_value(self, data):  # nocv
 *         return (             # <<<<<<<<<<<<<<
 *             data
 *             if (
 */
  __Pyx_XDECREF(__pyx_r);

  /* "polemarch/api/v2/serializers.py":45
 *             data
 *             if (
 *                     isinstance(data, (six.string_types, six.text_type)) or             # <<<<<<<<<<<<<<
 *                     isinstance(data, (dict, list))
 *             )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_six); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_string_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_six); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_text_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = PyObject_IsInstance(__pyx_v_data, __pyx_t_4); 
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (!__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = PyObject_IsInstance(__pyx_v_data, __pyx_t_5); 
  __pyx_t_7 = (__pyx_t_8 != 0);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L3_bool_binop_done;
  }

  /* "polemarch/api/v2/serializers.py":46
 *             if (
 *                     isinstance(data, (six.string_types, six.text_type)) or
 *                     isinstance(data, (dict, list))             # <<<<<<<<<<<<<<
 *             )
 *             else self.fail("Unknown type.")
 */
  __pyx_t_6 = PyDict_Check(__pyx_v_data); 
  __pyx_t_8 = (__pyx_t_6 != 0);
  if (!__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_8 = PyList_Check(__pyx_v_data); 
  __pyx_t_6 = (__pyx_t_8 != 0);
  __pyx_t_7 = __pyx_t_6;
  __pyx_L7_bool_binop_done:;
  __pyx_t_6 = (__pyx_t_7 != 0);
  __pyx_t_2 = __pyx_t_6;
  __pyx_L3_bool_binop_done:;
  if (__pyx_t_2) {

    /* "polemarch/api/v2/serializers.py":43
 *     def to_internal_value(self, data):  # nocv
 *         return (
 *             data             # <<<<<<<<<<<<<<
 *             if (
 *                     isinstance(data, (six.string_types, six.text_type)) or
 */
    __Pyx_INCREF(__pyx_v_data);
    __pyx_t_1 = __pyx_v_data;
  } else {

    /* "polemarch/api/v2/serializers.py":48
 *                     isinstance(data, (dict, list))
 *             )
 *             else self.fail("Unknown type.")             # <<<<<<<<<<<<<<
 *         )
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fail); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_u_Unknown_type) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u_Unknown_type);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":41
 * class DictField(serializers.CharField):
 * 
 *     def to_internal_value(self, data):  # nocv             # <<<<<<<<<<<<<<
 *         return (
 *             data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.DictField.to_internal_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":51
 *         )
 * 
 *     def to_representation(self, value):  # nocv             # <<<<<<<<<<<<<<
 *         return (
 *             json.loads(value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_9DictField_3to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_9DictField_3to_representation = {"to_representation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_9DictField_3to_representation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_9DictField_3to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_representation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, 1); __PYX_ERR(0, 51, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_representation") < 0)) __PYX_ERR(0, 51, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 51, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.DictField.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_9DictField_2to_representation(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_9DictField_2to_representation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("to_representation", 0);

  /* "polemarch/api/v2/serializers.py":52
 * 
 *     def to_representation(self, value):  # nocv
 *         return (             # <<<<<<<<<<<<<<
 *             json.loads(value)
 *             if not isinstance(value, (dict, list))
 */
  __Pyx_XDECREF(__pyx_r);

  /* "polemarch/api/v2/serializers.py":54
 *         return (
 *             json.loads(value)
 *             if not isinstance(value, (dict, list))             # <<<<<<<<<<<<<<
 *             else value
 *         )
 */
  __pyx_t_3 = PyDict_Check(__pyx_v_value); 
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_4 = PyList_Check(__pyx_v_value); 
  __pyx_t_3 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  if (((!(__pyx_t_2 != 0)) != 0)) {

    /* "polemarch/api/v2/serializers.py":53
 *     def to_representation(self, value):  # nocv
 *         return (
 *             json.loads(value)             # <<<<<<<<<<<<<<
 *             if not isinstance(value, (dict, list))
 *             else value
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_json); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loads); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_1 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {

    /* "polemarch/api/v2/serializers.py":55
 *             json.loads(value)
 *             if not isinstance(value, (dict, list))
 *             else value             # <<<<<<<<<<<<<<
 *         )
 * 
 */
    __Pyx_INCREF(__pyx_v_value);
    __pyx_t_1 = __pyx_v_value;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":51
 *         )
 * 
 *     def to_representation(self, value):  # nocv             # <<<<<<<<<<<<<<
 *         return (
 *             json.loads(value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.DictField.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":60
 * 
 * class MultiTypeField(serializers.CharField):
 *     def to_internal_value(self, data):             # <<<<<<<<<<<<<<
 *         return data
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_14MultiTypeField_1to_internal_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_14MultiTypeField_1to_internal_value = {"to_internal_value", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_14MultiTypeField_1to_internal_value, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_14MultiTypeField_1to_internal_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_internal_value (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_internal_value", 1, 2, 2, 1); __PYX_ERR(0, 60, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_internal_value") < 0)) __PYX_ERR(0, 60, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_internal_value", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 60, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.MultiTypeField.to_internal_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_14MultiTypeField_to_internal_value(__pyx_self, __pyx_v_self, __pyx_v_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_14MultiTypeField_to_internal_value(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_internal_value", 0);

  /* "polemarch/api/v2/serializers.py":61
 * class MultiTypeField(serializers.CharField):
 *     def to_internal_value(self, data):
 *         return data             # <<<<<<<<<<<<<<
 * 
 *     def to_representation(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":60
 * 
 * class MultiTypeField(serializers.CharField):
 *     def to_internal_value(self, data):             # <<<<<<<<<<<<<<
 *         return data
 * 
 */

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

/* "polemarch/api/v2/serializers.py":63
 *         return data
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return (
 *             value if not isinstance(value, six.class_types)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_14MultiTypeField_3to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_14MultiTypeField_3to_representation = {"to_representation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_14MultiTypeField_3to_representation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_14MultiTypeField_3to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_representation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, 1); __PYX_ERR(0, 63, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_representation") < 0)) __PYX_ERR(0, 63, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 63, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.MultiTypeField.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_14MultiTypeField_2to_representation(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_14MultiTypeField_2to_representation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("to_representation", 0);

  /* "polemarch/api/v2/serializers.py":64
 * 
 *     def to_representation(self, value):
 *         return (             # <<<<<<<<<<<<<<
 *             value if not isinstance(value, six.class_types)
 *             else str(value)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "polemarch/api/v2/serializers.py":65
 *     def to_representation(self, value):
 *         return (
 *             value if not isinstance(value, six.class_types)             # <<<<<<<<<<<<<<
 *             else str(value)
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((!(__pyx_t_4 != 0)) != 0)) {
    __Pyx_INCREF(__pyx_v_value);
    __pyx_t_1 = __pyx_v_value;
  } else {

    /* "polemarch/api/v2/serializers.py":66
 *         return (
 *             value if not isinstance(value, six.class_types)
 *             else str(value)             # <<<<<<<<<<<<<<
 *         )
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":63
 *         return data
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return (
 *             value if not isinstance(value, six.class_types)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.MultiTypeField.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":71
 * 
 * class InventoryDependEnumField(vst_fields.DependEnumField):
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         if isinstance(value, models.Inventory):
 *             value = value.id  # nocv
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24InventoryDependEnumField_1to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_24InventoryDependEnumField_1to_representation = {"to_representation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_24InventoryDependEnumField_1to_representation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24InventoryDependEnumField_1to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_representation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, 1); __PYX_ERR(0, 71, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_representation") < 0)) __PYX_ERR(0, 71, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 71, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.InventoryDependEnumField.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_24InventoryDependEnumField_to_representation(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24InventoryDependEnumField_to_representation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("to_representation", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "polemarch/api/v2/serializers.py":72
 * class InventoryDependEnumField(vst_fields.DependEnumField):
 *     def to_representation(self, value):
 *         if isinstance(value, models.Inventory):             # <<<<<<<<<<<<<<
 *             value = value.id  # nocv
 *         return super(InventoryDependEnumField, self).to_representation(value)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_models); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Inventory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "polemarch/api/v2/serializers.py":73
 *     def to_representation(self, value):
 *         if isinstance(value, models.Inventory):
 *             value = value.id  # nocv             # <<<<<<<<<<<<<<
 *         return super(InventoryDependEnumField, self).to_representation(value)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "polemarch/api/v2/serializers.py":72
 * class InventoryDependEnumField(vst_fields.DependEnumField):
 *     def to_representation(self, value):
 *         if isinstance(value, models.Inventory):             # <<<<<<<<<<<<<<
 *             value = value.id  # nocv
 *         return super(InventoryDependEnumField, self).to_representation(value)
 */
  }

  /* "polemarch/api/v2/serializers.py":74
 *         if isinstance(value, models.Inventory):
 *             value = value.id  # nocv
 *         return super(InventoryDependEnumField, self).to_representation(value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_InventoryDependEnumField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_to_representation); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":71
 * 
 * class InventoryDependEnumField(vst_fields.DependEnumField):
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         if isinstance(value, models.Inventory):
 *             value = value.id  # nocv
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.InventoryDependEnumField.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":77
 * 
 * 
 * def with_signals(func):             # <<<<<<<<<<<<<<
 *     '''
 *     Decorator for send api_pre_save and api_post_save signals from serializers.
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_1with_signals(PyObject *__pyx_self, PyObject *__pyx_v_func); /*proto*/
static char __pyx_doc_9polemarch_3api_2v2_11serializers_with_signals[] = "\n    Decorator for send api_pre_save and api_post_save signals from serializers.\n    ";
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_1with_signals = {"with_signals", (PyCFunction)__pyx_pw_9polemarch_3api_2v2_11serializers_1with_signals, METH_O, __pyx_doc_9polemarch_3api_2v2_11serializers_with_signals};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_1with_signals(PyObject *__pyx_self, PyObject *__pyx_v_func) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("with_signals (wrapper)", 0);
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_with_signals(__pyx_self, ((PyObject *)__pyx_v_func));

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

/* "polemarch/api/v2/serializers.py":81
 *     Decorator for send api_pre_save and api_post_save signals from serializers.
 *     '''
 *     def func_wrapper(*args, **kwargs):             # <<<<<<<<<<<<<<
 *         user = args[0].context['request'].user
 *         with transaction.atomic():
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_12with_signals_1func_wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_12with_signals_1func_wrapper = {"func_wrapper", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_12with_signals_1func_wrapper, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_12with_signals_1func_wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func_wrapper (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "func_wrapper", 1))) return NULL;
  if (unlikely(__pyx_kwds)) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_12with_signals_func_wrapper(__pyx_self, __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_12with_signals_func_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *__pyx_cur_scope;
  struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *__pyx_outer_scope;
  PyObject *__pyx_v_user = NULL;
  PyObject *__pyx_v_instance = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("func_wrapper", 0);
  __pyx_outer_scope = (struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "polemarch/api/v2/serializers.py":82
 *     '''
 *     def func_wrapper(*args, **kwargs):
 *         user = args[0].context['request'].user             # <<<<<<<<<<<<<<
 *         with transaction.atomic():
 *             instance = func(*args, **kwargs)
 */
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_request); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_user); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_user = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":83
 *     def func_wrapper(*args, **kwargs):
 *         user = args[0].context['request'].user
 *         with transaction.atomic():             # <<<<<<<<<<<<<<
 *             instance = func(*args, **kwargs)
 *             api_pre_save.send(
 */
  /*with:*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_transaction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_atomic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    /*try:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "polemarch/api/v2/serializers.py":84
 *         user = args[0].context['request'].user
 *         with transaction.atomic():
 *             instance = func(*args, **kwargs)             # <<<<<<<<<<<<<<
 *             api_pre_save.send(
 *                 sender=instance.__class__, instance=instance, user=user
 */
          if (unlikely(!__pyx_cur_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 84, __pyx_L7_error) }
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_func, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_instance = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "polemarch/api/v2/serializers.py":85
 *         with transaction.atomic():
 *             instance = func(*args, **kwargs)
 *             api_pre_save.send(             # <<<<<<<<<<<<<<
 *                 sender=instance.__class__, instance=instance, user=user
 *             )
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_api_pre_save); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_send); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "polemarch/api/v2/serializers.py":86
 *             instance = func(*args, **kwargs)
 *             api_pre_save.send(
 *                 sender=instance.__class__, instance=instance, user=user             # <<<<<<<<<<<<<<
 *             )
 *         with transaction.atomic():
 */
          __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_sender, __pyx_t_1) < 0) __PYX_ERR(0, 86, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(0, 86, __pyx_L7_error)
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_user, __pyx_v_user) < 0) __PYX_ERR(0, 86, __pyx_L7_error)

          /* "polemarch/api/v2/serializers.py":85
 *         with transaction.atomic():
 *             instance = func(*args, **kwargs)
 *             api_pre_save.send(             # <<<<<<<<<<<<<<
 *                 sender=instance.__class__, instance=instance, user=user
 *             )
 */
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "polemarch/api/v2/serializers.py":83
 *     def func_wrapper(*args, **kwargs):
 *         user = args[0].context['request'].user
 *         with transaction.atomic():             # <<<<<<<<<<<<<<
 *             instance = func(*args, **kwargs)
 *             api_pre_save.send(
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("polemarch.api.v2.serializers.with_signals.func_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 83, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 83, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__pyx_t_10 < 0) __PYX_ERR(0, 83, __pyx_L9_except_error)
          __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_XGIVEREF(__pyx_t_3);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);
            __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; 
            __PYX_ERR(0, 83, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_4) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple_, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "polemarch/api/v2/serializers.py":88
 *                 sender=instance.__class__, instance=instance, user=user
 *             )
 *         with transaction.atomic():             # <<<<<<<<<<<<<<
 *             api_post_save.send(
 *                 sender=instance.__class__, instance=instance, user=user
 */
  /*with:*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_transaction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_atomic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L17_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L17_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    /*try:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_6);
        /*try:*/ {

          /* "polemarch/api/v2/serializers.py":89
 *             )
 *         with transaction.atomic():
 *             api_post_save.send(             # <<<<<<<<<<<<<<
 *                 sender=instance.__class__, instance=instance, user=user
 *             )
 */
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_api_post_save); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_send); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "polemarch/api/v2/serializers.py":90
 *         with transaction.atomic():
 *             api_post_save.send(
 *                 sender=instance.__class__, instance=instance, user=user             # <<<<<<<<<<<<<<
 *             )
 *         return instance
 */
          __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (unlikely(!__pyx_v_instance)) { __Pyx_RaiseUnboundLocalError("instance"); __PYX_ERR(0, 90, __pyx_L21_error) }
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_sender, __pyx_t_2) < 0) __PYX_ERR(0, 90, __pyx_L21_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_v_instance)) { __Pyx_RaiseUnboundLocalError("instance"); __PYX_ERR(0, 90, __pyx_L21_error) }
          if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_instance, __pyx_v_instance) < 0) __PYX_ERR(0, 90, __pyx_L21_error)
          if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_user, __pyx_v_user) < 0) __PYX_ERR(0, 90, __pyx_L21_error)

          /* "polemarch/api/v2/serializers.py":89
 *             )
 *         with transaction.atomic():
 *             api_post_save.send(             # <<<<<<<<<<<<<<
 *                 sender=instance.__class__, instance=instance, user=user
 *             )
 */
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "polemarch/api/v2/serializers.py":88
 *                 sender=instance.__class__, instance=instance, user=user
 *             )
 *         with transaction.atomic():             # <<<<<<<<<<<<<<
 *             api_post_save.send(
 *                 sender=instance.__class__, instance=instance, user=user
 */
        }
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L26_try_end;
        __pyx_L21_error:;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("polemarch.api.v2.serializers.with_signals.func_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 88, __pyx_L23_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L23_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 88, __pyx_L23_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__pyx_t_11 < 0) __PYX_ERR(0, 88, __pyx_L23_except_error)
          __pyx_t_10 = ((!(__pyx_t_11 != 0)) != 0);
          if (__pyx_t_10) {
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_XGIVEREF(__pyx_t_1);
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_1);
            __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; 
            __PYX_ERR(0, 88, __pyx_L23_except_error)
          }
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L22_exception_handled;
        }
        __pyx_L23_except_error:;
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
        goto __pyx_L1_error;
        __pyx_L22_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
        __pyx_L26_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_4) {
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple_, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        goto __pyx_L20;
      }
      __pyx_L20:;
    }
    goto __pyx_L30;
    __pyx_L17_error:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L1_error;
    __pyx_L30:;
  }

  /* "polemarch/api/v2/serializers.py":92
 *                 sender=instance.__class__, instance=instance, user=user
 *             )
 *         return instance             # <<<<<<<<<<<<<<
 * 
 *     return func_wrapper
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_instance)) { __Pyx_RaiseUnboundLocalError("instance"); __PYX_ERR(0, 92, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_v_instance);
  __pyx_r = __pyx_v_instance;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":81
 *     Decorator for send api_pre_save and api_post_save signals from serializers.
 *     '''
 *     def func_wrapper(*args, **kwargs):             # <<<<<<<<<<<<<<
 *         user = args[0].context['request'].user
 *         with transaction.atomic():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.with_signals.func_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_user);
  __Pyx_XDECREF(__pyx_v_instance);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":77
 * 
 * 
 * def with_signals(func):             # <<<<<<<<<<<<<<
 *     '''
 *     Decorator for send api_pre_save and api_post_save signals from serializers.
 */

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_with_signals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func) {
  struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *__pyx_cur_scope;
  PyObject *__pyx_v_func_wrapper = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("with_signals", 0);
  __pyx_cur_scope = (struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *)__pyx_tp_new_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals(__pyx_ptype_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 77, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_func = __pyx_v_func;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_func);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_func);

  /* "polemarch/api/v2/serializers.py":81
 *     Decorator for send api_pre_save and api_post_save signals from serializers.
 *     '''
 *     def func_wrapper(*args, **kwargs):             # <<<<<<<<<<<<<<
 *         user = args[0].context['request'].user
 *         with transaction.atomic():
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_12with_signals_1func_wrapper, 0, __pyx_n_s_with_signals_locals_func_wrapper, ((PyObject*)__pyx_cur_scope), __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_func_wrapper = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":94
 *         return instance
 * 
 *     return func_wrapper             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_func_wrapper);
  __pyx_r = __pyx_v_func_wrapper;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":77
 * 
 * 
 * def with_signals(func):             # <<<<<<<<<<<<<<
 *     '''
 *     Decorator for send api_pre_save and api_post_save signals from serializers.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.with_signals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_func_wrapper);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":112
 *                                       autocomplete_represent='username')
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         if not self.instance.acl_handler.owned_by(self.current_user()):  # noce
 *             raise PermissionDenied(self.perms_msg)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_1update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_1update = {"update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_1update, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_1update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_instance = 0;
  PyObject *__pyx_v_validated_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_instance,&__pyx_n_s_validated_data,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, 1); __PYX_ERR(0, 112, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validated_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, 2); __PYX_ERR(0, 112, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update") < 0)) __PYX_ERR(0, 112, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_instance = values[1];
    __pyx_v_validated_data = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 112, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.SetOwnerSerializer.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_update(__pyx_self, __pyx_v_self, __pyx_v_instance, __pyx_v_validated_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_instance, PyObject *__pyx_v_validated_data) {
  PyObject *__pyx_v_user = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("update", 0);

  /* "polemarch/api/v2/serializers.py":113
 * 
 *     def update(self, instance, validated_data):
 *         if not self.instance.acl_handler.owned_by(self.current_user()):  # noce             # <<<<<<<<<<<<<<
 *             raise PermissionDenied(self.perms_msg)
 *         user = self.get_user(validated_data)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_acl_handler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_owned_by); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_user); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = ((!__pyx_t_6) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "polemarch/api/v2/serializers.py":114
 *     def update(self, instance, validated_data):
 *         if not self.instance.acl_handler.owned_by(self.current_user()):  # noce
 *             raise PermissionDenied(self.perms_msg)             # <<<<<<<<<<<<<<
 *         user = self.get_user(validated_data)
 *         self.instance.acl_handler.set_owner(user)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PermissionDenied); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_perms_msg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 114, __pyx_L1_error)

    /* "polemarch/api/v2/serializers.py":113
 * 
 *     def update(self, instance, validated_data):
 *         if not self.instance.acl_handler.owned_by(self.current_user()):  # noce             # <<<<<<<<<<<<<<
 *             raise PermissionDenied(self.perms_msg)
 *         user = self.get_user(validated_data)
 */
  }

  /* "polemarch/api/v2/serializers.py":115
 *         if not self.instance.acl_handler.owned_by(self.current_user()):  # noce
 *             raise PermissionDenied(self.perms_msg)
 *         user = self.get_user(validated_data)             # <<<<<<<<<<<<<<
 *         self.instance.acl_handler.set_owner(user)
 *         return user
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_user); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_validated_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_validated_data);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_user = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":116
 *             raise PermissionDenied(self.perms_msg)
 *         user = self.get_user(validated_data)
 *         self.instance.acl_handler.set_owner(user)             # <<<<<<<<<<<<<<
 *         return user
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_acl_handler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_set_owner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_user) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_user);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":117
 *         user = self.get_user(validated_data)
 *         self.instance.acl_handler.set_owner(user)
 *         return user             # <<<<<<<<<<<<<<
 * 
 *     def get_user(self, validated_data):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_user);
  __pyx_r = __pyx_v_user;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":112
 *                                       autocomplete_represent='username')
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         if not self.instance.acl_handler.owned_by(self.current_user()):  # noce
 *             raise PermissionDenied(self.perms_msg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.SetOwnerSerializer.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_user);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":119
 *         return user
 * 
 *     def get_user(self, validated_data):             # <<<<<<<<<<<<<<
 *         return User.objects.get(**validated_data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_3get_user(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_3get_user = {"get_user", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_3get_user, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_3get_user(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_validated_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_user (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_validated_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validated_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_user", 1, 2, 2, 1); __PYX_ERR(0, 119, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_user") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_validated_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_user", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.SetOwnerSerializer.get_user", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_2get_user(__pyx_self, __pyx_v_self, __pyx_v_validated_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_2get_user(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_validated_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("get_user", 0);

  /* "polemarch/api/v2/serializers.py":120
 * 
 *     def get_user(self, validated_data):
 *         return User.objects.get(**validated_data)             # <<<<<<<<<<<<<<
 * 
 *     def current_user(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_User); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_objects); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_v_validated_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 120, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_v_validated_data))) {
    __pyx_t_2 = PyDict_Copy(__pyx_v_validated_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_validated_data, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __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;

  /* "polemarch/api/v2/serializers.py":119
 *         return user
 * 
 *     def get_user(self, validated_data):             # <<<<<<<<<<<<<<
 *         return User.objects.get(**validated_data)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.SetOwnerSerializer.get_user", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":122
 *         return User.objects.get(**validated_data)
 * 
 *     def current_user(self):             # <<<<<<<<<<<<<<
 *         return self.context['request'].user
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_5current_user(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_5current_user = {"current_user", (PyCFunction)__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_5current_user, METH_O, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_5current_user(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("current_user (wrapper)", 0);
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_4current_user(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_4current_user(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("current_user", 0);

  /* "polemarch/api/v2/serializers.py":123
 * 
 *     def current_user(self):
 *         return self.context['request'].user             # <<<<<<<<<<<<<<
 * 
 *     def to_representation(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_request); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_user); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __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;

  /* "polemarch/api/v2/serializers.py":122
 *         return User.objects.get(**validated_data)
 * 
 *     def current_user(self):             # <<<<<<<<<<<<<<
 *         return self.context['request'].user
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.SetOwnerSerializer.current_user", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":125
 *         return self.context['request'].user
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return dict(user_id=value.id)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_7to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_7to_representation = {"to_representation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_7to_representation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_7to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_representation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, 1); __PYX_ERR(0, 125, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_representation") < 0)) __PYX_ERR(0, 125, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 125, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.SetOwnerSerializer.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_6to_representation(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_6to_representation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("to_representation", 0);

  /* "polemarch/api/v2/serializers.py":126
 * 
 *     def to_representation(self, value):
 *         return dict(user_id=value.id)             # <<<<<<<<<<<<<<
 * 
 *     def to_internal_value(self, data):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_user_id, __pyx_t_2) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":125
 *         return self.context['request'].user
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return dict(user_id=value.id)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.SetOwnerSerializer.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":128
 *         return dict(user_id=value.id)
 * 
 *     def to_internal_value(self, data):             # <<<<<<<<<<<<<<
 *         return dict(pk=data['user_id'])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_9to_internal_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_9to_internal_value = {"to_internal_value", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_9to_internal_value, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_9to_internal_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_internal_value (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_internal_value", 1, 2, 2, 1); __PYX_ERR(0, 128, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_internal_value") < 0)) __PYX_ERR(0, 128, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_internal_value", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 128, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.SetOwnerSerializer.to_internal_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_8to_internal_value(__pyx_self, __pyx_v_self, __pyx_v_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_8to_internal_value(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("to_internal_value", 0);

  /* "polemarch/api/v2/serializers.py":129
 * 
 *     def to_internal_value(self, data):
 *         return dict(pk=data['user_id'])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_user_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pk, __pyx_t_2) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":128
 *         return dict(user_id=value.id)
 * 
 *     def to_internal_value(self, data):             # <<<<<<<<<<<<<<
 *         return dict(pk=data['user_id'])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.SetOwnerSerializer.to_internal_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":137
 *     password2 = serializers.CharField(required=True, label='Confirm new password')
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         if not instance.check_password(validated_data['old_password']):
 *             raise exceptions.PermissionDenied('Password is not correct.')
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_1update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_1update = {"update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_1update, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_1update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_instance = 0;
  PyObject *__pyx_v_validated_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_instance,&__pyx_n_s_validated_data,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, 1); __PYX_ERR(0, 137, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validated_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, 2); __PYX_ERR(0, 137, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update") < 0)) __PYX_ERR(0, 137, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_instance = values[1];
    __pyx_v_validated_data = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 137, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.ChangePasswordSerializer.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_update(__pyx_self, __pyx_v_self, __pyx_v_instance, __pyx_v_validated_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_update(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_validated_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("update", 0);

  /* "polemarch/api/v2/serializers.py":138
 * 
 *     def update(self, instance, validated_data):
 *         if not instance.check_password(validated_data['old_password']):             # <<<<<<<<<<<<<<
 *             raise exceptions.PermissionDenied('Password is not correct.')
 *         if validated_data['password'] != validated_data['password2']:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_check_password); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_validated_data, __pyx_n_u_old_password); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "polemarch/api/v2/serializers.py":139
 *     def update(self, instance, validated_data):
 *         if not instance.check_password(validated_data['old_password']):
 *             raise exceptions.PermissionDenied('Password is not correct.')             # <<<<<<<<<<<<<<
 *         if validated_data['password'] != validated_data['password2']:
 *             raise exceptions.ValidationError("New passwords' values are not equal.")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_exceptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PermissionDenied); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u_Password_is_not_correct) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Password_is_not_correct);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 139, __pyx_L1_error)

    /* "polemarch/api/v2/serializers.py":138
 * 
 *     def update(self, instance, validated_data):
 *         if not instance.check_password(validated_data['old_password']):             # <<<<<<<<<<<<<<
 *             raise exceptions.PermissionDenied('Password is not correct.')
 *         if validated_data['password'] != validated_data['password2']:
 */
  }

  /* "polemarch/api/v2/serializers.py":140
 *         if not instance.check_password(validated_data['old_password']):
 *             raise exceptions.PermissionDenied('Password is not correct.')
 *         if validated_data['password'] != validated_data['password2']:             # <<<<<<<<<<<<<<
 *             raise exceptions.ValidationError("New passwords' values are not equal.")
 *         instance.set_password(validated_data['password'])
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_validated_data, __pyx_n_u_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_validated_data, __pyx_n_u_password2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_6)) {

    /* "polemarch/api/v2/serializers.py":141
 *             raise exceptions.PermissionDenied('Password is not correct.')
 *         if validated_data['password'] != validated_data['password2']:
 *             raise exceptions.ValidationError("New passwords' values are not equal.")             # <<<<<<<<<<<<<<
 *         instance.set_password(validated_data['password'])
 *         instance.save()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_exceptions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ValidationError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_kp_u_New_passwords_values_are_not_equ) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u_New_passwords_values_are_not_equ);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 141, __pyx_L1_error)

    /* "polemarch/api/v2/serializers.py":140
 *         if not instance.check_password(validated_data['old_password']):
 *             raise exceptions.PermissionDenied('Password is not correct.')
 *         if validated_data['password'] != validated_data['password2']:             # <<<<<<<<<<<<<<
 *             raise exceptions.ValidationError("New passwords' values are not equal.")
 *         instance.set_password(validated_data['password'])
 */
  }

  /* "polemarch/api/v2/serializers.py":142
 *         if validated_data['password'] != validated_data['password2']:
 *             raise exceptions.ValidationError("New passwords' values are not equal.")
 *         instance.set_password(validated_data['password'])             # <<<<<<<<<<<<<<
 *         instance.save()
 *         return instance
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_set_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_validated_data, __pyx_n_u_password); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":143
 *             raise exceptions.ValidationError("New passwords' values are not equal.")
 *         instance.set_password(validated_data['password'])
 *         instance.save()             # <<<<<<<<<<<<<<
 *         return instance
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_save); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":144
 *         instance.set_password(validated_data['password'])
 *         instance.save()
 *         return instance             # <<<<<<<<<<<<<<
 * 
 *     def to_representation(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_instance);
  __pyx_r = __pyx_v_instance;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":137
 *     password2 = serializers.CharField(required=True, label='Confirm new password')
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         if not instance.check_password(validated_data['old_password']):
 *             raise exceptions.PermissionDenied('Password is not correct.')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.ChangePasswordSerializer.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":146
 *         return instance
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return dict(
 *             old_password='***',
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_3to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_3to_representation = {"to_representation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_3to_representation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_3to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_representation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, 1); __PYX_ERR(0, 146, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_representation") < 0)) __PYX_ERR(0, 146, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 146, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.ChangePasswordSerializer.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_2to_representation(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_2to_representation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("to_representation", 0);

  /* "polemarch/api/v2/serializers.py":147
 * 
 *     def to_representation(self, value):
 *         return dict(             # <<<<<<<<<<<<<<
 *             old_password='***',
 *             password='***',
 */
  __Pyx_XDECREF(__pyx_r);

  /* "polemarch/api/v2/serializers.py":148
 *     def to_representation(self, value):
 *         return dict(
 *             old_password='***',             # <<<<<<<<<<<<<<
 *             password='***',
 *             password2='***',
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_old_password, __pyx_kp_u__4) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_password, __pyx_kp_u__4) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_password2, __pyx_kp_u__4) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":146
 *         return instance
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return dict(
 *             old_password='***',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.ChangePasswordSerializer.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":156
 * class _SignalSerializer(serializers.ModelSerializer):
 *     @cached_property
 *     def _writable_fields(self):             # <<<<<<<<<<<<<<
 *         writable_fields = super(_SignalSerializer, self)._writable_fields
 *         fields = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_17_SignalSerializer_1_writable_fields(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_17_SignalSerializer_1_writable_fields = {"_writable_fields", (PyCFunction)__pyx_pw_9polemarch_3api_2v2_11serializers_17_SignalSerializer_1_writable_fields, METH_O, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_17_SignalSerializer_1_writable_fields(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_writable_fields (wrapper)", 0);
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_17_SignalSerializer__writable_fields(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_17_SignalSerializer__writable_fields(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_writable_fields = NULL;
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_attrs = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_v_field_object = NULL;
  PyObject *__pyx_v_attr = 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 *);
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  __Pyx_RefNannySetupContext("_writable_fields", 0);

  /* "polemarch/api/v2/serializers.py":157
 *     @cached_property
 *     def _writable_fields(self):
 *         writable_fields = super(_SignalSerializer, self)._writable_fields             # <<<<<<<<<<<<<<
 *         fields = []
 *         attrs = [
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SignalSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __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_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_writable_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_writable_fields = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":158
 *     def _writable_fields(self):
 *         writable_fields = super(_SignalSerializer, self)._writable_fields
 *         fields = []             # <<<<<<<<<<<<<<
 *         attrs = [
 *             'field_name', 'source_attrs', 'source',
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_fields = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":159
 *         writable_fields = super(_SignalSerializer, self)._writable_fields
 *         fields = []
 *         attrs = [             # <<<<<<<<<<<<<<
 *             'field_name', 'source_attrs', 'source',
 *             'read_only', 'required', 'write_only', 'default'
 */
  __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_field_name);
  __Pyx_GIVEREF(__pyx_n_u_field_name);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_field_name);
  __Pyx_INCREF(__pyx_n_u_source_attrs);
  __Pyx_GIVEREF(__pyx_n_u_source_attrs);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_source_attrs);
  __Pyx_INCREF(__pyx_n_u_source);
  __Pyx_GIVEREF(__pyx_n_u_source);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_source);
  __Pyx_INCREF(__pyx_n_u_read_only);
  __Pyx_GIVEREF(__pyx_n_u_read_only);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_read_only);
  __Pyx_INCREF(__pyx_n_u_required);
  __Pyx_GIVEREF(__pyx_n_u_required);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_u_required);
  __Pyx_INCREF(__pyx_n_u_write_only);
  __Pyx_GIVEREF(__pyx_n_u_write_only);
  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_u_write_only);
  __Pyx_INCREF(__pyx_n_u_default);
  __Pyx_GIVEREF(__pyx_n_u_default);
  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_u_default);
  __pyx_v_attrs = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":163
 *             'read_only', 'required', 'write_only', 'default'
 *         ]
 *         for field in writable_fields:             # <<<<<<<<<<<<<<
 *             if not isinstance(field, DataSerializer):
 *                 fields.append(field)
 */
  if (likely(PyList_CheckExact(__pyx_v_writable_fields)) || PyTuple_CheckExact(__pyx_v_writable_fields)) {
    __pyx_t_2 = __pyx_v_writable_fields; __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_writable_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __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, 163, __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_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 163, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":164
 *         ]
 *         for field in writable_fields:
 *             if not isinstance(field, DataSerializer):             # <<<<<<<<<<<<<<
 *                 fields.append(field)
 *                 continue
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_field, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {

      /* "polemarch/api/v2/serializers.py":165
 *         for field in writable_fields:
 *             if not isinstance(field, DataSerializer):
 *                 fields.append(field)             # <<<<<<<<<<<<<<
 *                 continue
 *             field_object = serializers.DictField()
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_fields, __pyx_v_field); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 165, __pyx_L1_error)

      /* "polemarch/api/v2/serializers.py":166
 *             if not isinstance(field, DataSerializer):
 *                 fields.append(field)
 *                 continue             # <<<<<<<<<<<<<<
 *             field_object = serializers.DictField()
 *             for attr in attrs:
 */
      goto __pyx_L3_continue;

      /* "polemarch/api/v2/serializers.py":164
 *         ]
 *         for field in writable_fields:
 *             if not isinstance(field, DataSerializer):             # <<<<<<<<<<<<<<
 *                 fields.append(field)
 *                 continue
 */
    }

    /* "polemarch/api/v2/serializers.py":167
 *                 fields.append(field)
 *                 continue
 *             field_object = serializers.DictField()             # <<<<<<<<<<<<<<
 *             for attr in attrs:
 *                 setattr(field_object, attr, getattr(field, attr, None))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_serializers); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DictField); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_field_object, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":168
 *                 continue
 *             field_object = serializers.DictField()
 *             for attr in attrs:             # <<<<<<<<<<<<<<
 *                 setattr(field_object, attr, getattr(field, attr, None))
 *             fields.append(field_object)
 */
    __pyx_t_1 = __pyx_v_attrs; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 168, __pyx_L1_error)
      #else
      __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "polemarch/api/v2/serializers.py":169
 *             field_object = serializers.DictField()
 *             for attr in attrs:
 *                 setattr(field_object, attr, getattr(field, attr, None))             # <<<<<<<<<<<<<<
 *             fields.append(field_object)
 *         return fields
 */
      __pyx_t_9 = __Pyx_GetAttr3(__pyx_v_field, __pyx_v_attr, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = PyObject_SetAttr(__pyx_v_field_object, __pyx_v_attr, __pyx_t_9); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "polemarch/api/v2/serializers.py":168
 *                 continue
 *             field_object = serializers.DictField()
 *             for attr in attrs:             # <<<<<<<<<<<<<<
 *                 setattr(field_object, attr, getattr(field, attr, None))
 *             fields.append(field_object)
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":170
 *             for attr in attrs:
 *                 setattr(field_object, attr, getattr(field, attr, None))
 *             fields.append(field_object)             # <<<<<<<<<<<<<<
 *         return fields
 * 
 */
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_fields, __pyx_v_field_object); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 170, __pyx_L1_error)

    /* "polemarch/api/v2/serializers.py":163
 *             'read_only', 'required', 'write_only', 'default'
 *         ]
 *         for field in writable_fields:             # <<<<<<<<<<<<<<
 *             if not isinstance(field, DataSerializer):
 *                 fields.append(field)
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":171
 *                 setattr(field_object, attr, getattr(field, attr, None))
 *             fields.append(field_object)
 *         return fields             # <<<<<<<<<<<<<<
 * 
 *     @with_signals
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_fields);
  __pyx_r = __pyx_v_fields;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":156
 * class _SignalSerializer(serializers.ModelSerializer):
 *     @cached_property
 *     def _writable_fields(self):             # <<<<<<<<<<<<<<
 *         writable_fields = super(_SignalSerializer, self)._writable_fields
 *         fields = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("polemarch.api.v2.serializers._SignalSerializer._writable_fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_writable_fields);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_attrs);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XDECREF(__pyx_v_field_object);
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":174
 * 
 *     @with_signals
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         return super(_SignalSerializer, self).create(validated_data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_17_SignalSerializer_3create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_17_SignalSerializer_3create = {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_17_SignalSerializer_3create, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_17_SignalSerializer_3create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_validated_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_validated_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validated_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, 1); __PYX_ERR(0, 174, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 174, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_validated_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 174, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers._SignalSerializer.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_17_SignalSerializer_2create(__pyx_self, __pyx_v_self, __pyx_v_validated_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_17_SignalSerializer_2create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_validated_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("create", 0);

  /* "polemarch/api/v2/serializers.py":175
 *     @with_signals
 *     def create(self, validated_data):
 *         return super(_SignalSerializer, self).create(validated_data)             # <<<<<<<<<<<<<<
 * 
 *     @with_signals
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SignalSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_validated_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_validated_data);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":174
 * 
 *     @with_signals
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         return super(_SignalSerializer, self).create(validated_data)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("polemarch.api.v2.serializers._SignalSerializer.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":178
 * 
 *     @with_signals
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return super(_SignalSerializer, self).update(instance, validated_data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_17_SignalSerializer_5update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_17_SignalSerializer_5update = {"update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_17_SignalSerializer_5update, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_17_SignalSerializer_5update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_instance = 0;
  PyObject *__pyx_v_validated_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_instance,&__pyx_n_s_validated_data,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, 1); __PYX_ERR(0, 178, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validated_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, 2); __PYX_ERR(0, 178, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update") < 0)) __PYX_ERR(0, 178, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_instance = values[1];
    __pyx_v_validated_data = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 178, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers._SignalSerializer.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_17_SignalSerializer_4update(__pyx_self, __pyx_v_self, __pyx_v_instance, __pyx_v_validated_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_17_SignalSerializer_4update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_validated_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("update", 0);

  /* "polemarch/api/v2/serializers.py":179
 *     @with_signals
 *     def update(self, instance, validated_data):
 *         return super(_SignalSerializer, self).update(instance, validated_data)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SignalSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_instance, __pyx_v_validated_data};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_instance, __pyx_v_validated_data};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_instance);
    __Pyx_GIVEREF(__pyx_v_instance);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_instance);
    __Pyx_INCREF(__pyx_v_validated_data);
    __Pyx_GIVEREF(__pyx_v_validated_data);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_validated_data);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":178
 * 
 *     @with_signals
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return super(_SignalSerializer, self).update(instance, validated_data)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("polemarch.api.v2.serializers._SignalSerializer.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":185
 *     perms_msg = "You do not have permission to perform this action."
 * 
 *     def is_valid(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         result = super(_WithPermissionsSerializer, self).is_valid(*args, **kwargs)
 *         if not hasattr(self, 'instance'):  # nocv
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_1is_valid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_1is_valid = {"is_valid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_1is_valid, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_1is_valid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_valid (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "is_valid") < 0)) __PYX_ERR(0, 185, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_valid", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 185, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithPermissionsSerializer.is_valid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_is_valid(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_is_valid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_result = NULL;
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("is_valid", 0);

  /* "polemarch/api/v2/serializers.py":186
 * 
 *     def is_valid(self, *args, **kwargs):
 *         result = super(_WithPermissionsSerializer, self).is_valid(*args, **kwargs)             # <<<<<<<<<<<<<<
 *         if not hasattr(self, 'instance'):  # nocv
 *             self.validated_data['owner'] = self.validated_data.get(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WithPermissionsSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __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_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_valid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":187
 *     def is_valid(self, *args, **kwargs):
 *         result = super(_WithPermissionsSerializer, self).is_valid(*args, **kwargs)
 *         if not hasattr(self, 'instance'):  # nocv             # <<<<<<<<<<<<<<
 *             self.validated_data['owner'] = self.validated_data.get(
 *                 'owner', self.current_user()
 */
  __pyx_t_3 = __Pyx_HasAttr(__pyx_v_self, __pyx_n_u_instance); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 187, __pyx_L1_error)
  __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
  if (__pyx_t_4) {

    /* "polemarch/api/v2/serializers.py":188
 *         result = super(_WithPermissionsSerializer, self).is_valid(*args, **kwargs)
 *         if not hasattr(self, 'instance'):  # nocv
 *             self.validated_data['owner'] = self.validated_data.get(             # <<<<<<<<<<<<<<
 *                 'owner', self.current_user()
 *             )
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_validated_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "polemarch/api/v2/serializers.py":189
 *         if not hasattr(self, 'instance'):  # nocv
 *             self.validated_data['owner'] = self.validated_data.get(
 *                 'owner', self.current_user()             # <<<<<<<<<<<<<<
 *             )
 *         return result
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_current_user); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_owner, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_owner, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_n_u_owner);
      __Pyx_GIVEREF(__pyx_n_u_owner);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_n_u_owner);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "polemarch/api/v2/serializers.py":188
 *         result = super(_WithPermissionsSerializer, self).is_valid(*args, **kwargs)
 *         if not hasattr(self, 'instance'):  # nocv
 *             self.validated_data['owner'] = self.validated_data.get(             # <<<<<<<<<<<<<<
 *                 'owner', self.current_user()
 *             )
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_validated_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_n_u_owner, __pyx_t_1) < 0)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":187
 *     def is_valid(self, *args, **kwargs):
 *         result = super(_WithPermissionsSerializer, self).is_valid(*args, **kwargs)
 *         if not hasattr(self, 'instance'):  # nocv             # <<<<<<<<<<<<<<
 *             self.validated_data['owner'] = self.validated_data.get(
 *                 'owner', self.current_user()
 */
  }

  /* "polemarch/api/v2/serializers.py":191
 *                 'owner', self.current_user()
 *             )
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def current_user(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":185
 *     perms_msg = "You do not have permission to perform this action."
 * 
 *     def is_valid(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         result = super(_WithPermissionsSerializer, self).is_valid(*args, **kwargs)
 *         if not hasattr(self, 'instance'):  # nocv
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithPermissionsSerializer.is_valid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":193
 *         return result
 * 
 *     def current_user(self):             # <<<<<<<<<<<<<<
 *         return self.context['request'].user  # nocv
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_3current_user(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_3current_user = {"current_user", (PyCFunction)__pyx_pw_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_3current_user, METH_O, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_3current_user(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("current_user (wrapper)", 0);
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_2current_user(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_2current_user(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("current_user", 0);

  /* "polemarch/api/v2/serializers.py":194
 * 
 *     def current_user(self):
 *         return self.context['request'].user  # nocv             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_request); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_user); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __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;

  /* "polemarch/api/v2/serializers.py":193
 *         return result
 * 
 *     def current_user(self):             # <<<<<<<<<<<<<<
 *         return self.context['request'].user  # nocv
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithPermissionsSerializer.current_user", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":201
 * 
 *     @with_signals
 *     def create(self, data):             # <<<<<<<<<<<<<<
 *         return super(UserSerializer, self).create(data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_14UserSerializer_1create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_14UserSerializer_1create = {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_14UserSerializer_1create, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_14UserSerializer_1create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, 1); __PYX_ERR(0, 201, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 201, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 201, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.UserSerializer.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_14UserSerializer_create(__pyx_self, __pyx_v_self, __pyx_v_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_14UserSerializer_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("create", 0);

  /* "polemarch/api/v2/serializers.py":202
 *     @with_signals
 *     def create(self, data):
 *         return super(UserSerializer, self).create(data)             # <<<<<<<<<<<<<<
 * 
 *     @with_signals
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UserSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":201
 * 
 *     @with_signals
 *     def create(self, data):             # <<<<<<<<<<<<<<
 *         return super(UserSerializer, self).create(data)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.UserSerializer.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":205
 * 
 *     @with_signals
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return super(UserSerializer, self).update(instance, validated_data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_14UserSerializer_3update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_14UserSerializer_3update = {"update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_14UserSerializer_3update, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_14UserSerializer_3update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_instance = 0;
  PyObject *__pyx_v_validated_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_instance,&__pyx_n_s_validated_data,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, 1); __PYX_ERR(0, 205, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validated_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, 2); __PYX_ERR(0, 205, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update") < 0)) __PYX_ERR(0, 205, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_instance = values[1];
    __pyx_v_validated_data = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 205, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.UserSerializer.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_14UserSerializer_2update(__pyx_self, __pyx_v_self, __pyx_v_instance, __pyx_v_validated_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_14UserSerializer_2update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_validated_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("update", 0);

  /* "polemarch/api/v2/serializers.py":206
 *     @with_signals
 *     def update(self, instance, validated_data):
 *         return super(UserSerializer, self).update(instance, validated_data)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UserSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_instance, __pyx_v_validated_data};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_instance, __pyx_v_validated_data};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_instance);
    __Pyx_GIVEREF(__pyx_v_instance);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_instance);
    __Pyx_INCREF(__pyx_v_validated_data);
    __Pyx_GIVEREF(__pyx_v_validated_data);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_validated_data);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":205
 * 
 *     @with_signals
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return super(UserSerializer, self).update(instance, validated_data)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.UserSerializer.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_9polemarch_3api_2v2_11serializers_4Meta_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "polemarch/api/v2/serializers.py":214
 *     class Meta(vst_serializers.OneUserSerializer.Meta):
 *         fields = tuple(
 *             field for field in vst_serializers.OneUserSerializer.Meta.fields             # <<<<<<<<<<<<<<
 *             if field not in ['password']
 *         )
 */

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_4Meta_genexpr(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *)__pyx_tp_new_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr(__pyx_ptype_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 214, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9polemarch_3api_2v2_11serializers_4Meta_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_OneUserSerializer_Meta_genexpr, __pyx_n_s_polemarch_api_v2_serializers); if (unlikely(!gen)) __PYX_ERR(0, 214, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.Meta.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_9polemarch_3api_2v2_11serializers_4Meta_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L7_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OneUserSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Meta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 214, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 214, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 214, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_field);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_field, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "polemarch/api/v2/serializers.py":215
 *         fields = tuple(
 *             field for field in vst_serializers.OneUserSerializer.Meta.fields
 *             if field not in ['password']             # <<<<<<<<<<<<<<
 *         )
 * 
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_field);
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_field;
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_password, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "polemarch/api/v2/serializers.py":214
 *     class Meta(vst_serializers.OneUserSerializer.Meta):
 *         fields = tuple(
 *             field for field in vst_serializers.OneUserSerializer.Meta.fields             # <<<<<<<<<<<<<<
 *             if field not in ['password']
 *         )
 */
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_field);
      __pyx_r = __pyx_cur_scope->__pyx_v_field;
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L7_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
      __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 214, __pyx_L1_error)

      /* "polemarch/api/v2/serializers.py":215
 *         fields = tuple(
 *             field for field in vst_serializers.OneUserSerializer.Meta.fields
 *             if field not in ['password']             # <<<<<<<<<<<<<<
 *         )
 * 
 */
    }

    /* "polemarch/api/v2/serializers.py":214
 *     class Meta(vst_serializers.OneUserSerializer.Meta):
 *         fields = tuple(
 *             field for field in vst_serializers.OneUserSerializer.Meta.fields             # <<<<<<<<<<<<<<
 *             if field not in ['password']
 *         )
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

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

/* "polemarch/api/v2/serializers.py":226
 *         fields = list(OneUserSerializer.Meta.fields) + ['password', 'password2']
 * 
 *     def run_validation(self, data=serializers.empty):             # <<<<<<<<<<<<<<
 *         validated_data = super(CreateUserSerializer, self).run_validation(data)
 *         if validated_data['password'] != validated_data.pop('password2', None):
 */

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_data);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_data);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_data);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __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(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20CreateUserSerializer_1run_validation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_20CreateUserSerializer_1run_validation = {"run_validation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_20CreateUserSerializer_1run_validation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20CreateUserSerializer_1run_validation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run_validation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
    PyObject* values[2] = {0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[1] = __pyx_dynamic_args->__pyx_arg_data;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "run_validation") < 0)) __PYX_ERR(0, 226, __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_self = values[0];
    __pyx_v_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("run_validation", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 226, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.CreateUserSerializer.run_validation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_20CreateUserSerializer_run_validation(__pyx_self, __pyx_v_self, __pyx_v_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20CreateUserSerializer_run_validation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_v_validated_data = 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;
  __Pyx_RefNannySetupContext("run_validation", 0);

  /* "polemarch/api/v2/serializers.py":227
 * 
 *     def run_validation(self, data=serializers.empty):
 *         validated_data = super(CreateUserSerializer, self).run_validation(data)             # <<<<<<<<<<<<<<
 *         if validated_data['password'] != validated_data.pop('password2', None):
 *             raise exceptions.ValidationError('Passwords do not match.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CreateUserSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_run_validation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_validated_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":228
 *     def run_validation(self, data=serializers.empty):
 *         validated_data = super(CreateUserSerializer, self).run_validation(data)
 *         if validated_data['password'] != validated_data.pop('password2', None):             # <<<<<<<<<<<<<<
 *             raise exceptions.ValidationError('Passwords do not match.')
 *         return validated_data
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_validated_data, __pyx_n_u_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_validated_data, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "polemarch/api/v2/serializers.py":229
 *         validated_data = super(CreateUserSerializer, self).run_validation(data)
 *         if validated_data['password'] != validated_data.pop('password2', None):
 *             raise exceptions.ValidationError('Passwords do not match.')             # <<<<<<<<<<<<<<
 *         return validated_data
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_exceptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ValidationError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_kp_u_Passwords_do_not_match) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u_Passwords_do_not_match);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 229, __pyx_L1_error)

    /* "polemarch/api/v2/serializers.py":228
 *     def run_validation(self, data=serializers.empty):
 *         validated_data = super(CreateUserSerializer, self).run_validation(data)
 *         if validated_data['password'] != validated_data.pop('password2', None):             # <<<<<<<<<<<<<<
 *             raise exceptions.ValidationError('Passwords do not match.')
 *         return validated_data
 */
  }

  /* "polemarch/api/v2/serializers.py":230
 *         if validated_data['password'] != validated_data.pop('password2', None):
 *             raise exceptions.ValidationError('Passwords do not match.')
 *         return validated_data             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_validated_data);
  __pyx_r = __pyx_v_validated_data;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":226
 *         fields = list(OneUserSerializer.Meta.fields) + ['password', 'password2']
 * 
 *     def run_validation(self, data=serializers.empty):             # <<<<<<<<<<<<<<
 *         validated_data = super(CreateUserSerializer, self).run_validation(data)
 *         if validated_data['password'] != validated_data.pop('password2', None):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.CreateUserSerializer.run_validation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_validated_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":362
 *                   "raw_inventory",)
 * 
 *     def get_raw(self, request):             # <<<<<<<<<<<<<<
 *         return self.instance.get_raw(request.query_params.get("color", "no") == "yes")
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_1get_raw(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_1get_raw = {"get_raw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_1get_raw, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_1get_raw(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_request = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_raw (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_request,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_request)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_raw", 1, 2, 2, 1); __PYX_ERR(0, 362, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_raw") < 0)) __PYX_ERR(0, 362, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_request = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_raw", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 362, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneHistorySerializer.get_raw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_get_raw(__pyx_self, __pyx_v_self, __pyx_v_request);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_get_raw(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_request) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("get_raw", 0);

  /* "polemarch/api/v2/serializers.py":363
 * 
 *     def get_raw(self, request):
 *         return self.instance.get_raw(request.query_params.get("color", "no") == "yes")             # <<<<<<<<<<<<<<
 * 
 *     def get_raw_stdout(self, obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_raw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_request, __pyx_n_s_query_params); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_n_u_yes, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":362
 *                   "raw_inventory",)
 * 
 *     def get_raw(self, request):             # <<<<<<<<<<<<<<
 *         return self.instance.get_raw(request.query_params.get("color", "no") == "yes")
 * 
 */

  /* function exit code */
  __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("polemarch.api.v2.serializers.OneHistorySerializer.get_raw", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":365
 *         return self.instance.get_raw(request.query_params.get("color", "no") == "yes")
 * 
 *     def get_raw_stdout(self, obj):             # <<<<<<<<<<<<<<
 *         return self.context.get('request').build_absolute_uri("raw/")
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_3get_raw_stdout(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_3get_raw_stdout = {"get_raw_stdout", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_3get_raw_stdout, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_3get_raw_stdout(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_raw_stdout (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_obj,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_raw_stdout", 1, 2, 2, 1); __PYX_ERR(0, 365, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_raw_stdout") < 0)) __PYX_ERR(0, 365, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_raw_stdout", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 365, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneHistorySerializer.get_raw_stdout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_2get_raw_stdout(__pyx_self, __pyx_v_self, __pyx_v_obj);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_2get_raw_stdout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("get_raw_stdout", 0);

  /* "polemarch/api/v2/serializers.py":366
 * 
 *     def get_raw_stdout(self, obj):
 *         return self.context.get('request').build_absolute_uri("raw/")             # <<<<<<<<<<<<<<
 * 
 *     def get_facts(self, request):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_context); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_n_u_request) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_u_request);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_build_absolute_uri); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_kp_u_raw) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_raw);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":365
 *         return self.instance.get_raw(request.query_params.get("color", "no") == "yes")
 * 
 *     def get_raw_stdout(self, obj):             # <<<<<<<<<<<<<<
 *         return self.context.get('request').build_absolute_uri("raw/")
 * 
 */

  /* function exit code */
  __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("polemarch.api.v2.serializers.OneHistorySerializer.get_raw_stdout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":368
 *         return self.context.get('request').build_absolute_uri("raw/")
 * 
 *     def get_facts(self, request):             # <<<<<<<<<<<<<<
 *         return self.instance.facts
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_5get_facts(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_5get_facts = {"get_facts", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_5get_facts, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_5get_facts(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_request = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_facts (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_request,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_request)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_facts", 1, 2, 2, 1); __PYX_ERR(0, 368, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_facts") < 0)) __PYX_ERR(0, 368, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_request = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_facts", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 368, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneHistorySerializer.get_facts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_4get_facts(__pyx_self, __pyx_v_self, __pyx_v_request);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_4get_facts(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_request) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("get_facts", 0);

  /* "polemarch/api/v2/serializers.py":369
 * 
 *     def get_facts(self, request):
 *         return self.instance.facts             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_facts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __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;

  /* "polemarch/api/v2/serializers.py":368
 *         return self.context.get('request').build_absolute_uri("raw/")
 * 
 *     def get_facts(self, request):             # <<<<<<<<<<<<<<
 *         return self.instance.facts
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneHistorySerializer.get_facts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":412
 *         )
 * 
 *     def to_representation(self, instance):             # <<<<<<<<<<<<<<
 *         result = super(VariableSerializer, self).to_representation(instance)
 *         if instance.key in getattr(instance.content_object, 'HIDDEN_VARS', []):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18VariableSerializer_1to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_18VariableSerializer_1to_representation = {"to_representation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_18VariableSerializer_1to_representation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18VariableSerializer_1to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_instance = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_representation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_instance,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_representation") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_instance = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.VariableSerializer.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_18VariableSerializer_to_representation(__pyx_self, __pyx_v_self, __pyx_v_instance);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18VariableSerializer_to_representation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("to_representation", 0);

  /* "polemarch/api/v2/serializers.py":413
 * 
 *     def to_representation(self, instance):
 *         result = super(VariableSerializer, self).to_representation(instance)             # <<<<<<<<<<<<<<
 *         if instance.key in getattr(instance.content_object, 'HIDDEN_VARS', []):
 *             result['value'] = "[~~ENCRYPTED~~]"
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_VariableSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_representation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_instance);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":414
 *     def to_representation(self, instance):
 *         result = super(VariableSerializer, self).to_representation(instance)
 *         if instance.key in getattr(instance.content_object, 'HIDDEN_VARS', []):             # <<<<<<<<<<<<<<
 *             result['value'] = "[~~ENCRYPTED~~]"
 *         elif instance.key in getattr(instance.content_object, 'BOOLEAN_VARS', []):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_content_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetAttr3(__pyx_t_3, __pyx_n_u_HIDDEN_VARS, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "polemarch/api/v2/serializers.py":415
 *         result = super(VariableSerializer, self).to_representation(instance)
 *         if instance.key in getattr(instance.content_object, 'HIDDEN_VARS', []):
 *             result['value'] = "[~~ENCRYPTED~~]"             # <<<<<<<<<<<<<<
 *         elif instance.key in getattr(instance.content_object, 'BOOLEAN_VARS', []):
 *             result['value'] = True if instance.value == 'True' else False
 */
    if (unlikely(PyObject_SetItem(__pyx_v_result, __pyx_n_u_value, __pyx_kp_u_ENCRYPTED) < 0)) __PYX_ERR(0, 415, __pyx_L1_error)

    /* "polemarch/api/v2/serializers.py":414
 *     def to_representation(self, instance):
 *         result = super(VariableSerializer, self).to_representation(instance)
 *         if instance.key in getattr(instance.content_object, 'HIDDEN_VARS', []):             # <<<<<<<<<<<<<<
 *             result['value'] = "[~~ENCRYPTED~~]"
 *         elif instance.key in getattr(instance.content_object, 'BOOLEAN_VARS', []):
 */
    goto __pyx_L3;
  }

  /* "polemarch/api/v2/serializers.py":416
 *         if instance.key in getattr(instance.content_object, 'HIDDEN_VARS', []):
 *             result['value'] = "[~~ENCRYPTED~~]"
 *         elif instance.key in getattr(instance.content_object, 'BOOLEAN_VARS', []):             # <<<<<<<<<<<<<<
 *             result['value'] = True if instance.value == 'True' else False
 *         return result
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_content_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_u_BOOLEAN_VARS, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "polemarch/api/v2/serializers.py":417
 *             result['value'] = "[~~ENCRYPTED~~]"
 *         elif instance.key in getattr(instance.content_object, 'BOOLEAN_VARS', []):
 *             result['value'] = True if instance.value == 'True' else False             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_True, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {
      __Pyx_INCREF(Py_True);
      __pyx_t_3 = Py_True;
    } else {
      __Pyx_INCREF(Py_False);
      __pyx_t_3 = Py_False;
    }
    if (unlikely(PyObject_SetItem(__pyx_v_result, __pyx_n_u_value, __pyx_t_3) < 0)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "polemarch/api/v2/serializers.py":416
 *         if instance.key in getattr(instance.content_object, 'HIDDEN_VARS', []):
 *             result['value'] = "[~~ENCRYPTED~~]"
 *         elif instance.key in getattr(instance.content_object, 'BOOLEAN_VARS', []):             # <<<<<<<<<<<<<<
 *             result['value'] = True if instance.value == 'True' else False
 *         return result
 */
  }
  __pyx_L3:;

  /* "polemarch/api/v2/serializers.py":418
 *         elif instance.key in getattr(instance.content_object, 'BOOLEAN_VARS', []):
 *             result['value'] = True if instance.value == 'True' else False
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":412
 *         )
 * 
 *     def to_representation(self, instance):             # <<<<<<<<<<<<<<
 *         result = super(VariableSerializer, self).to_representation(instance)
 *         if instance.key in getattr(instance.content_object, 'HIDDEN_VARS', []):
 */

  /* function exit code */
  __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("polemarch.api.v2.serializers.VariableSerializer.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":459
 * class _WithVariablesSerializer(_WithPermissionsSerializer):
 *     @transaction.atomic
 *     def _do_with_vars(self, method_name, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         method = getattr(super(_WithVariablesSerializer, self), method_name)
 *         instance = method(*args, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_1_do_with_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_1_do_with_vars = {"_do_with_vars", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_1_do_with_vars, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_1_do_with_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_method_name = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_do_with_vars (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 2) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_method_name,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) {
        default:
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_do_with_vars", 0, 2, 2, 1); __PYX_ERR(0, 459, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "_do_with_vars") < 0)) __PYX_ERR(0, 459, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_method_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_do_with_vars", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 459, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithVariablesSerializer._do_with_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer__do_with_vars(__pyx_self, __pyx_v_self, __pyx_v_method_name, __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer__do_with_vars(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_method_name, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_method = NULL;
  PyObject *__pyx_v_instance = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("_do_with_vars", 0);

  /* "polemarch/api/v2/serializers.py":460
 *     @transaction.atomic
 *     def _do_with_vars(self, method_name, *args, **kwargs):
 *         method = getattr(super(_WithVariablesSerializer, self), method_name)             # <<<<<<<<<<<<<<
 *         instance = method(*args, **kwargs)
 *         return instance
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WithVariablesSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __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_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_method_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_method = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":461
 *     def _do_with_vars(self, method_name, *args, **kwargs):
 *         method = getattr(super(_WithVariablesSerializer, self), method_name)
 *         instance = method(*args, **kwargs)             # <<<<<<<<<<<<<<
 *         return instance
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_method, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_instance = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":462
 *         method = getattr(super(_WithVariablesSerializer, self), method_name)
 *         instance = method(*args, **kwargs)
 *         return instance             # <<<<<<<<<<<<<<
 * 
 *     def create(self, validated_data):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_instance);
  __pyx_r = __pyx_v_instance;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":459
 * class _WithVariablesSerializer(_WithPermissionsSerializer):
 *     @transaction.atomic
 *     def _do_with_vars(self, method_name, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         method = getattr(super(_WithVariablesSerializer, self), method_name)
 *         instance = method(*args, **kwargs)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithVariablesSerializer._do_with_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_method);
  __Pyx_XDECREF(__pyx_v_instance);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":464
 *         return instance
 * 
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         return self._do_with_vars("create", validated_data=validated_data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_3create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_3create = {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_3create, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_3create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_validated_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_validated_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validated_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, 1); __PYX_ERR(0, 464, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 464, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_validated_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 464, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithVariablesSerializer.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_2create(__pyx_self, __pyx_v_self, __pyx_v_validated_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_2create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_validated_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("create", 0);

  /* "polemarch/api/v2/serializers.py":465
 * 
 *     def create(self, validated_data):
 *         return self._do_with_vars("create", validated_data=validated_data)             # <<<<<<<<<<<<<<
 * 
 *     def update(self, instance, validated_data):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_with_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_validated_data, __pyx_v_validated_data) < 0) __PYX_ERR(0, 465, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __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;

  /* "polemarch/api/v2/serializers.py":464
 *         return instance
 * 
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         return self._do_with_vars("create", validated_data=validated_data)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithVariablesSerializer.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":467
 *         return self._do_with_vars("create", validated_data=validated_data)
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return self._do_with_vars("update", instance, validated_data=validated_data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_5update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_5update = {"update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_5update, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_5update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_instance = 0;
  PyObject *__pyx_v_validated_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_instance,&__pyx_n_s_validated_data,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, 1); __PYX_ERR(0, 467, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validated_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, 2); __PYX_ERR(0, 467, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update") < 0)) __PYX_ERR(0, 467, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_instance = values[1];
    __pyx_v_validated_data = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 467, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithVariablesSerializer.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_4update(__pyx_self, __pyx_v_self, __pyx_v_instance, __pyx_v_validated_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_4update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_validated_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("update", 0);

  /* "polemarch/api/v2/serializers.py":468
 * 
 *     def update(self, instance, validated_data):
 *         return self._do_with_vars("update", instance, validated_data=validated_data)             # <<<<<<<<<<<<<<
 * 
 *     def get_vars(self, representation):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_with_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_update);
  __Pyx_GIVEREF(__pyx_n_u_update);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_update);
  __Pyx_INCREF(__pyx_v_instance);
  __Pyx_GIVEREF(__pyx_v_instance);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_instance);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_validated_data, __pyx_v_validated_data) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":467
 *         return self._do_with_vars("create", validated_data=validated_data)
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return self._do_with_vars("update", instance, validated_data=validated_data)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithVariablesSerializer.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":470
 *         return self._do_with_vars("update", instance, validated_data=validated_data)
 * 
 *     def get_vars(self, representation):             # <<<<<<<<<<<<<<
 *         return representation.get('vars', None)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_7get_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_7get_vars = {"get_vars", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_7get_vars, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_7get_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_representation = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_vars (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_representation,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_representation)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_vars", 1, 2, 2, 1); __PYX_ERR(0, 470, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_vars") < 0)) __PYX_ERR(0, 470, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_representation = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_vars", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 470, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithVariablesSerializer.get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_6get_vars(__pyx_self, __pyx_v_self, __pyx_v_representation);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_6get_vars(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_representation) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("get_vars", 0);

  /* "polemarch/api/v2/serializers.py":471
 * 
 *     def get_vars(self, representation):
 *         return representation.get('vars', None)             # <<<<<<<<<<<<<<
 * 
 *     def to_representation(self, instance, hidden_vars=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_representation, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __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;

  /* "polemarch/api/v2/serializers.py":470
 *         return self._do_with_vars("update", instance, validated_data=validated_data)
 * 
 *     def get_vars(self, representation):             # <<<<<<<<<<<<<<
 *         return representation.get('vars', None)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithVariablesSerializer.get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":473
 *         return representation.get('vars', None)
 * 
 *     def to_representation(self, instance, hidden_vars=None):             # <<<<<<<<<<<<<<
 *         rep = super(_WithVariablesSerializer, self).to_representation(instance)
 *         hv = hidden_vars
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_9to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_9to_representation = {"to_representation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_9to_representation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_9to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_instance = 0;
  PyObject *__pyx_v_hidden_vars = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_representation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_instance,&__pyx_n_s_hidden_vars,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_representation", 0, 2, 3, 1); __PYX_ERR(0, 473, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden_vars);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_representation") < 0)) __PYX_ERR(0, 473, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_instance = values[1];
    __pyx_v_hidden_vars = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_representation", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 473, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithVariablesSerializer.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_8to_representation(__pyx_self, __pyx_v_self, __pyx_v_instance, __pyx_v_hidden_vars);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_8to_representation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_hidden_vars) {
  PyObject *__pyx_v_rep = NULL;
  PyObject *__pyx_v_hv = NULL;
  PyObject *__pyx_v_vars = NULL;
  PyObject *__pyx_v_mask_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("to_representation", 0);

  /* "polemarch/api/v2/serializers.py":474
 * 
 *     def to_representation(self, instance, hidden_vars=None):
 *         rep = super(_WithVariablesSerializer, self).to_representation(instance)             # <<<<<<<<<<<<<<
 *         hv = hidden_vars
 *         hv = getattr(instance, 'HIDDEN_VARS', []) if hv is None else hv
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WithVariablesSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_representation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_instance) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_instance);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_rep = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":475
 *     def to_representation(self, instance, hidden_vars=None):
 *         rep = super(_WithVariablesSerializer, self).to_representation(instance)
 *         hv = hidden_vars             # <<<<<<<<<<<<<<
 *         hv = getattr(instance, 'HIDDEN_VARS', []) if hv is None else hv
 *         vars = self.get_vars(rep)
 */
  __Pyx_INCREF(__pyx_v_hidden_vars);
  __pyx_v_hv = __pyx_v_hidden_vars;

  /* "polemarch/api/v2/serializers.py":476
 *         rep = super(_WithVariablesSerializer, self).to_representation(instance)
 *         hv = hidden_vars
 *         hv = getattr(instance, 'HIDDEN_VARS', []) if hv is None else hv             # <<<<<<<<<<<<<<
 *         vars = self.get_vars(rep)
 *         if vars is not None:
 */
  __pyx_t_4 = (__pyx_v_hv == Py_None);
  if ((__pyx_t_4 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_instance, __pyx_n_u_HIDDEN_VARS, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_hv);
    __pyx_t_1 = __pyx_v_hv;
  }
  __Pyx_DECREF_SET(__pyx_v_hv, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":477
 *         hv = hidden_vars
 *         hv = getattr(instance, 'HIDDEN_VARS', []) if hv is None else hv
 *         vars = self.get_vars(rep)             # <<<<<<<<<<<<<<
 *         if vars is not None:
 *             for mask_key in hv:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_rep) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_rep);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_vars = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":478
 *         hv = getattr(instance, 'HIDDEN_VARS', []) if hv is None else hv
 *         vars = self.get_vars(rep)
 *         if vars is not None:             # <<<<<<<<<<<<<<
 *             for mask_key in hv:
 *                 if mask_key in vars.keys():
 */
  __pyx_t_4 = (__pyx_v_vars != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "polemarch/api/v2/serializers.py":479
 *         vars = self.get_vars(rep)
 *         if vars is not None:
 *             for mask_key in hv:             # <<<<<<<<<<<<<<
 *                 if mask_key in vars.keys():
 *                     vars[mask_key] = "[~~ENCRYPTED~~]"
 */
    if (likely(PyList_CheckExact(__pyx_v_hv)) || PyTuple_CheckExact(__pyx_v_hv)) {
      __pyx_t_1 = __pyx_v_hv; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_hv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 479, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 479, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 479, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_7(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 479, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_mask_key, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "polemarch/api/v2/serializers.py":480
 *         if vars is not None:
 *             for mask_key in hv:
 *                 if mask_key in vars.keys():             # <<<<<<<<<<<<<<
 *                     vars[mask_key] = "[~~ENCRYPTED~~]"
 *         return rep
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vars, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_mask_key, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = (__pyx_t_5 != 0);
      if (__pyx_t_4) {

        /* "polemarch/api/v2/serializers.py":481
 *             for mask_key in hv:
 *                 if mask_key in vars.keys():
 *                     vars[mask_key] = "[~~ENCRYPTED~~]"             # <<<<<<<<<<<<<<
 *         return rep
 * 
 */
        if (unlikely(PyObject_SetItem(__pyx_v_vars, __pyx_v_mask_key, __pyx_kp_u_ENCRYPTED) < 0)) __PYX_ERR(0, 481, __pyx_L1_error)

        /* "polemarch/api/v2/serializers.py":480
 *         if vars is not None:
 *             for mask_key in hv:
 *                 if mask_key in vars.keys():             # <<<<<<<<<<<<<<
 *                     vars[mask_key] = "[~~ENCRYPTED~~]"
 *         return rep
 */
      }

      /* "polemarch/api/v2/serializers.py":479
 *         vars = self.get_vars(rep)
 *         if vars is not None:
 *             for mask_key in hv:             # <<<<<<<<<<<<<<
 *                 if mask_key in vars.keys():
 *                     vars[mask_key] = "[~~ENCRYPTED~~]"
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":478
 *         hv = getattr(instance, 'HIDDEN_VARS', []) if hv is None else hv
 *         vars = self.get_vars(rep)
 *         if vars is not None:             # <<<<<<<<<<<<<<
 *             for mask_key in hv:
 *                 if mask_key in vars.keys():
 */
  }

  /* "polemarch/api/v2/serializers.py":482
 *                 if mask_key in vars.keys():
 *                     vars[mask_key] = "[~~ENCRYPTED~~]"
 *         return rep             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rep);
  __pyx_r = __pyx_v_rep;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":473
 *         return representation.get('vars', None)
 * 
 *     def to_representation(self, instance, hidden_vars=None):             # <<<<<<<<<<<<<<
 *         rep = super(_WithVariablesSerializer, self).to_representation(instance)
 *         hv = hidden_vars
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("polemarch.api.v2.serializers._WithVariablesSerializer.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rep);
  __Pyx_XDECREF(__pyx_v_hv);
  __Pyx_XDECREF(__pyx_v_vars);
  __Pyx_XDECREF(__pyx_v_mask_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":613
 * 
 *     @transaction.atomic
 *     def _do_with_vars(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         kw = kwargs['validated_data']
 *         if kw.get('kind', None) == 'TEMPLATE':
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_22PeriodictaskSerializer_1_do_with_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_22PeriodictaskSerializer_1_do_with_vars = {"_do_with_vars", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_22PeriodictaskSerializer_1_do_with_vars, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_22PeriodictaskSerializer_1_do_with_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_do_with_vars (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "_do_with_vars") < 0)) __PYX_ERR(0, 613, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_do_with_vars", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 613, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.PeriodictaskSerializer._do_with_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_22PeriodictaskSerializer__do_with_vars(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_22PeriodictaskSerializer__do_with_vars(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_kw = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("_do_with_vars", 0);

  /* "polemarch/api/v2/serializers.py":614
 *     @transaction.atomic
 *     def _do_with_vars(self, *args, **kwargs):
 *         kw = kwargs['validated_data']             # <<<<<<<<<<<<<<
 *         if kw.get('kind', None) == 'TEMPLATE':
 *             kw['inventory'] = ''
 */
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_validated_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_kw = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":615
 *     def _do_with_vars(self, *args, **kwargs):
 *         kw = kwargs['validated_data']
 *         if kw.get('kind', None) == 'TEMPLATE':             # <<<<<<<<<<<<<<
 *             kw['inventory'] = ''
 *             kw['mode'] = ''
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kw, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_TEMPLATE, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "polemarch/api/v2/serializers.py":616
 *         kw = kwargs['validated_data']
 *         if kw.get('kind', None) == 'TEMPLATE':
 *             kw['inventory'] = ''             # <<<<<<<<<<<<<<
 *             kw['mode'] = ''
 *             kwargs['validated_data'] = kw
 */
    if (unlikely(PyObject_SetItem(__pyx_v_kw, __pyx_n_u_inventory, __pyx_kp_u__10) < 0)) __PYX_ERR(0, 616, __pyx_L1_error)

    /* "polemarch/api/v2/serializers.py":617
 *         if kw.get('kind', None) == 'TEMPLATE':
 *             kw['inventory'] = ''
 *             kw['mode'] = ''             # <<<<<<<<<<<<<<
 *             kwargs['validated_data'] = kw
 *         return super(PeriodictaskSerializer, self)._do_with_vars(*args, **kwargs)
 */
    if (unlikely(PyObject_SetItem(__pyx_v_kw, __pyx_n_u_mode, __pyx_kp_u__10) < 0)) __PYX_ERR(0, 617, __pyx_L1_error)

    /* "polemarch/api/v2/serializers.py":618
 *             kw['inventory'] = ''
 *             kw['mode'] = ''
 *             kwargs['validated_data'] = kw             # <<<<<<<<<<<<<<
 *         return super(PeriodictaskSerializer, self)._do_with_vars(*args, **kwargs)
 * 
 */
    if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_validated_data, __pyx_v_kw) < 0)) __PYX_ERR(0, 618, __pyx_L1_error)

    /* "polemarch/api/v2/serializers.py":615
 *     def _do_with_vars(self, *args, **kwargs):
 *         kw = kwargs['validated_data']
 *         if kw.get('kind', None) == 'TEMPLATE':             # <<<<<<<<<<<<<<
 *             kw['inventory'] = ''
 *             kw['mode'] = ''
 */
  }

  /* "polemarch/api/v2/serializers.py":619
 *             kw['mode'] = ''
 *             kwargs['validated_data'] = kw
 *         return super(PeriodictaskSerializer, self)._do_with_vars(*args, **kwargs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PeriodictaskSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_do_with_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __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;

  /* "polemarch/api/v2/serializers.py":613
 * 
 *     @transaction.atomic
 *     def _do_with_vars(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         kw = kwargs['validated_data']
 *         if kw.get('kind', None) == 'TEMPLATE':
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.PeriodictaskSerializer._do_with_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kw);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":640
 *                   'notes',)
 * 
 *     def execute(self):             # <<<<<<<<<<<<<<
 *         inventory = self.instance.inventory
 *         rdata = ExecuteResponseSerializer(data=dict(
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_25OnePeriodictaskSerializer_1execute(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_25OnePeriodictaskSerializer_1execute = {"execute", (PyCFunction)__pyx_pw_9polemarch_3api_2v2_11serializers_25OnePeriodictaskSerializer_1execute, METH_O, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_25OnePeriodictaskSerializer_1execute(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execute (wrapper)", 0);
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_25OnePeriodictaskSerializer_execute(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_25OnePeriodictaskSerializer_execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_inventory = NULL;
  PyObject *__pyx_v_rdata = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("execute", 0);

  /* "polemarch/api/v2/serializers.py":641
 * 
 *     def execute(self):
 *         inventory = self.instance.inventory             # <<<<<<<<<<<<<<
 *         rdata = ExecuteResponseSerializer(data=dict(
 *             detail="Started at inventory {}.".format(inventory),
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_inventory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_inventory = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":642
 *     def execute(self):
 *         inventory = self.instance.inventory
 *         rdata = ExecuteResponseSerializer(data=dict(             # <<<<<<<<<<<<<<
 *             detail="Started at inventory {}.".format(inventory),
 *             history_id=self.instance.execute(sync=False)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ExecuteResponseSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":643
 *         inventory = self.instance.inventory
 *         rdata = ExecuteResponseSerializer(data=dict(
 *             detail="Started at inventory {}.".format(inventory),             # <<<<<<<<<<<<<<
 *             history_id=self.instance.execute(sync=False)
 *         ))
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Started_at_inventory, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_inventory) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_inventory);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_detail, __pyx_t_4) < 0) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":644
 *         rdata = ExecuteResponseSerializer(data=dict(
 *             detail="Started at inventory {}.".format(inventory),
 *             history_id=self.instance.execute(sync=False)             # <<<<<<<<<<<<<<
 *         ))
 *         rdata.is_valid(True)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_execute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_sync, Py_False) < 0) __PYX_ERR(0, 644, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_history_id, __pyx_t_6) < 0) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_data, __pyx_t_3) < 0) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":642
 *     def execute(self):
 *         inventory = self.instance.inventory
 *         rdata = ExecuteResponseSerializer(data=dict(             # <<<<<<<<<<<<<<
 *             detail="Started at inventory {}.".format(inventory),
 *             history_id=self.instance.execute(sync=False)
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_rdata = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":646
 *             history_id=self.instance.execute(sync=False)
 *         ))
 *         rdata.is_valid(True)             # <<<<<<<<<<<<<<
 *         return Response(rdata.data, status.HTTP_201_CREATED)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rdata, __pyx_n_s_is_valid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_1, Py_True);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":647
 *         ))
 *         rdata.is_valid(True)
 *         return Response(rdata.data, status.HTTP_201_CREATED)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Response); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rdata, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_status); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_HTTP_201_CREATED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":640
 *                   'notes',)
 * 
 *     def execute(self):             # <<<<<<<<<<<<<<
 *         inventory = self.instance.inventory
 *         rdata = ExecuteResponseSerializer(data=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_AddTraceback("polemarch.api.v2.serializers.OnePeriodictaskSerializer.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_inventory);
  __Pyx_XDECREF(__pyx_v_rdata);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":672
 *         )
 * 
 *     def get_vars(self, representation):             # <<<<<<<<<<<<<<
 *         try:
 *             return representation['data']['vars']
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_1get_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_18TemplateSerializer_1get_vars = {"get_vars", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_1get_vars, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_1get_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_representation = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_vars (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_representation,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_representation)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_vars", 1, 2, 2, 1); __PYX_ERR(0, 672, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_vars") < 0)) __PYX_ERR(0, 672, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_representation = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_vars", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 672, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.TemplateSerializer.get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_get_vars(__pyx_self, __pyx_v_self, __pyx_v_representation);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_get_vars(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_representation) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("get_vars", 0);

  /* "polemarch/api/v2/serializers.py":673
 * 
 *     def get_vars(self, representation):
 *         try:             # <<<<<<<<<<<<<<
 *             return representation['data']['vars']
 *         except KeyError:  # nocv
 */
  {
    __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:*/ {

      /* "polemarch/api/v2/serializers.py":674
 *     def get_vars(self, representation):
 *         try:
 *             return representation['data']['vars']             # <<<<<<<<<<<<<<
 *         except KeyError:  # nocv
 *             return None
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_representation, __pyx_n_u_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 674, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_vars); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 674, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L7_try_return;

      /* "polemarch/api/v2/serializers.py":673
 * 
 *     def get_vars(self, representation):
 *         try:             # <<<<<<<<<<<<<<
 *             return representation['data']['vars']
 *         except KeyError:  # nocv
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "polemarch/api/v2/serializers.py":675
 *         try:
 *             return representation['data']['vars']
 *         except KeyError:  # nocv             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("polemarch.api.v2.serializers.TemplateSerializer.get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 675, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);

      /* "polemarch/api/v2/serializers.py":676
 *             return representation['data']['vars']
 *         except KeyError:  # nocv
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     def set_opts_vars(self, rep, hidden_vars):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __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:;

    /* "polemarch/api/v2/serializers.py":673
 * 
 *     def get_vars(self, representation):
 *         try:             # <<<<<<<<<<<<<<
 *             return representation['data']['vars']
 *         except KeyError:  # nocv
 */
    __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_L7_try_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_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;
  }

  /* "polemarch/api/v2/serializers.py":672
 *         )
 * 
 *     def get_vars(self, representation):             # <<<<<<<<<<<<<<
 *         try:
 *             return representation['data']['vars']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.TemplateSerializer.get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":678
 *             return None
 * 
 *     def set_opts_vars(self, rep, hidden_vars):             # <<<<<<<<<<<<<<
 *         if not rep.get('vars', None):
 *             return rep
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_3set_opts_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_18TemplateSerializer_3set_opts_vars = {"set_opts_vars", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_3set_opts_vars, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_3set_opts_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_rep = 0;
  PyObject *__pyx_v_hidden_vars = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_opts_vars (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_rep,&__pyx_n_s_hidden_vars,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rep)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_opts_vars", 1, 3, 3, 1); __PYX_ERR(0, 678, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden_vars)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_opts_vars", 1, 3, 3, 2); __PYX_ERR(0, 678, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_opts_vars") < 0)) __PYX_ERR(0, 678, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_rep = values[1];
    __pyx_v_hidden_vars = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_opts_vars", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 678, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.TemplateSerializer.set_opts_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_2set_opts_vars(__pyx_self, __pyx_v_self, __pyx_v_rep, __pyx_v_hidden_vars);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_2set_opts_vars(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_rep, PyObject *__pyx_v_hidden_vars) {
  PyObject *__pyx_v_var = NULL;
  PyObject *__pyx_v_mask_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("set_opts_vars", 0);

  /* "polemarch/api/v2/serializers.py":679
 * 
 *     def set_opts_vars(self, rep, hidden_vars):
 *         if not rep.get('vars', None):             # <<<<<<<<<<<<<<
 *             return rep
 *         var = rep['vars']
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rep, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "polemarch/api/v2/serializers.py":680
 *     def set_opts_vars(self, rep, hidden_vars):
 *         if not rep.get('vars', None):
 *             return rep             # <<<<<<<<<<<<<<
 *         var = rep['vars']
 *         for mask_key in hidden_vars:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_rep);
    __pyx_r = __pyx_v_rep;
    goto __pyx_L0;

    /* "polemarch/api/v2/serializers.py":679
 * 
 *     def set_opts_vars(self, rep, hidden_vars):
 *         if not rep.get('vars', None):             # <<<<<<<<<<<<<<
 *             return rep
 *         var = rep['vars']
 */
  }

  /* "polemarch/api/v2/serializers.py":681
 *         if not rep.get('vars', None):
 *             return rep
 *         var = rep['vars']             # <<<<<<<<<<<<<<
 *         for mask_key in hidden_vars:
 *             if mask_key in var.keys():
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rep, __pyx_n_u_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_var = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":682
 *             return rep
 *         var = rep['vars']
 *         for mask_key in hidden_vars:             # <<<<<<<<<<<<<<
 *             if mask_key in var.keys():
 *                 var[mask_key] = "[~~ENCRYPTED~~]"
 */
  if (likely(PyList_CheckExact(__pyx_v_hidden_vars)) || PyTuple_CheckExact(__pyx_v_hidden_vars)) {
    __pyx_t_2 = __pyx_v_hidden_vars; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_hidden_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 682, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 682, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 682, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_mask_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":683
 *         var = rep['vars']
 *         for mask_key in hidden_vars:
 *             if mask_key in var.keys():             # <<<<<<<<<<<<<<
 *                 var[mask_key] = "[~~ENCRYPTED~~]"
 *         return rep
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_keys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_mask_key, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (__pyx_t_3) {

      /* "polemarch/api/v2/serializers.py":684
 *         for mask_key in hidden_vars:
 *             if mask_key in var.keys():
 *                 var[mask_key] = "[~~ENCRYPTED~~]"             # <<<<<<<<<<<<<<
 *         return rep
 * 
 */
      if (unlikely(PyObject_SetItem(__pyx_v_var, __pyx_v_mask_key, __pyx_kp_u_ENCRYPTED) < 0)) __PYX_ERR(0, 684, __pyx_L1_error)

      /* "polemarch/api/v2/serializers.py":683
 *         var = rep['vars']
 *         for mask_key in hidden_vars:
 *             if mask_key in var.keys():             # <<<<<<<<<<<<<<
 *                 var[mask_key] = "[~~ENCRYPTED~~]"
 *         return rep
 */
    }

    /* "polemarch/api/v2/serializers.py":682
 *             return rep
 *         var = rep['vars']
 *         for mask_key in hidden_vars:             # <<<<<<<<<<<<<<
 *             if mask_key in var.keys():
 *                 var[mask_key] = "[~~ENCRYPTED~~]"
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":685
 *             if mask_key in var.keys():
 *                 var[mask_key] = "[~~ENCRYPTED~~]"
 *         return rep             # <<<<<<<<<<<<<<
 * 
 *     def repr_options(self, instance, data, hidden_vars):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rep);
  __pyx_r = __pyx_v_rep;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":678
 *             return None
 * 
 *     def set_opts_vars(self, rep, hidden_vars):             # <<<<<<<<<<<<<<
 *         if not rep.get('vars', None):
 *             return rep
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.TemplateSerializer.set_opts_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_var);
  __Pyx_XDECREF(__pyx_v_mask_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":687
 *         return rep
 * 
 *     def repr_options(self, instance, data, hidden_vars):             # <<<<<<<<<<<<<<
 *         hv = hidden_vars
 *         hv = instance.HIDDEN_VARS if hv is None else hv
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_5repr_options(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_18TemplateSerializer_5repr_options = {"repr_options", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_5repr_options, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_5repr_options(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_instance = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_hidden_vars = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("repr_options (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_instance,&__pyx_n_s_data,&__pyx_n_s_hidden_vars,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("repr_options", 1, 4, 4, 1); __PYX_ERR(0, 687, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("repr_options", 1, 4, 4, 2); __PYX_ERR(0, 687, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hidden_vars)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("repr_options", 1, 4, 4, 3); __PYX_ERR(0, 687, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "repr_options") < 0)) __PYX_ERR(0, 687, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_instance = values[1];
    __pyx_v_data = values[2];
    __pyx_v_hidden_vars = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("repr_options", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 687, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.TemplateSerializer.repr_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_4repr_options(__pyx_self, __pyx_v_self, __pyx_v_instance, __pyx_v_data, __pyx_v_hidden_vars);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_4repr_options(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance, PyObject *__pyx_v_data, PyObject *__pyx_v_hidden_vars) {
  PyObject *__pyx_v_hv = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_rep = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *(*__pyx_t_11)(PyObject *);
  __Pyx_RefNannySetupContext("repr_options", 0);

  /* "polemarch/api/v2/serializers.py":688
 * 
 *     def repr_options(self, instance, data, hidden_vars):
 *         hv = hidden_vars             # <<<<<<<<<<<<<<
 *         hv = instance.HIDDEN_VARS if hv is None else hv
 *         for name, rep in data.get('options', {}).items():
 */
  __Pyx_INCREF(__pyx_v_hidden_vars);
  __pyx_v_hv = __pyx_v_hidden_vars;

  /* "polemarch/api/v2/serializers.py":689
 *     def repr_options(self, instance, data, hidden_vars):
 *         hv = hidden_vars
 *         hv = instance.HIDDEN_VARS if hv is None else hv             # <<<<<<<<<<<<<<
 *         for name, rep in data.get('options', {}).items():
 *             data['options'][name] = self.set_opts_vars(rep, hv)
 */
  __pyx_t_2 = (__pyx_v_hv == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_HIDDEN_VARS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_hv);
    __pyx_t_1 = __pyx_v_hv;
  }
  __Pyx_DECREF_SET(__pyx_v_hv, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":690
 *         hv = hidden_vars
 *         hv = instance.HIDDEN_VARS if hv is None else hv
 *         for name, rep in data.get('options', {}).items():             # <<<<<<<<<<<<<<
 *             data['options'][name] = self.set_opts_vars(rep, hv)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_options, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_options, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 690, __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_n_u_options);
    __Pyx_GIVEREF(__pyx_n_u_options);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_n_u_options);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 690, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 690, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 690, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_10(__pyx_t_4);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 690, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 690, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_5), 2) < 0) __PYX_ERR(0, 690, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 690, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_rep, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "polemarch/api/v2/serializers.py":691
 *         hv = instance.HIDDEN_VARS if hv is None else hv
 *         for name, rep in data.get('options', {}).items():
 *             data['options'][name] = self.set_opts_vars(rep, hv)             # <<<<<<<<<<<<<<
 * 
 *     def to_representation(self, instance):
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_opts_vars); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_rep, __pyx_v_hv};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_rep, __pyx_v_hv};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_rep);
      __Pyx_GIVEREF(__pyx_v_rep);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_rep);
      __Pyx_INCREF(__pyx_v_hv);
      __Pyx_GIVEREF(__pyx_v_hv);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_hv);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_u_options); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_name, __pyx_t_1) < 0)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":690
 *         hv = hidden_vars
 *         hv = instance.HIDDEN_VARS if hv is None else hv
 *         for name, rep in data.get('options', {}).items():             # <<<<<<<<<<<<<<
 *             data['options'][name] = self.set_opts_vars(rep, hv)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":687
 *         return rep
 * 
 *     def repr_options(self, instance, data, hidden_vars):             # <<<<<<<<<<<<<<
 *         hv = hidden_vars
 *         hv = instance.HIDDEN_VARS if hv is None else hv
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.TemplateSerializer.repr_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_hv);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_rep);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":693
 *             data['options'][name] = self.set_opts_vars(rep, hv)
 * 
 *     def to_representation(self, instance):             # <<<<<<<<<<<<<<
 *         data = OrderedDict()
 *         if instance.kind in ["Task", "Module"]:
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_7to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_18TemplateSerializer_7to_representation = {"to_representation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_7to_representation, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_18TemplateSerializer_7to_representation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_instance = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_representation (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_instance,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_instance)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, 1); __PYX_ERR(0, 693, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_representation") < 0)) __PYX_ERR(0, 693, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_instance = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_representation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 693, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.TemplateSerializer.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_6to_representation(__pyx_self, __pyx_v_self, __pyx_v_instance);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_18TemplateSerializer_6to_representation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance) {
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_hidden_vars = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("to_representation", 0);

  /* "polemarch/api/v2/serializers.py":694
 * 
 *     def to_representation(self, instance):
 *         data = OrderedDict()             # <<<<<<<<<<<<<<
 *         if instance.kind in ["Task", "Module"]:
 *             hidden_vars = models.PeriodicTask.HIDDEN_VARS
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":695
 *     def to_representation(self, instance):
 *         data = OrderedDict()
 *         if instance.kind in ["Task", "Module"]:             # <<<<<<<<<<<<<<
 *             hidden_vars = models.PeriodicTask.HIDDEN_VARS
 *             data = super(TemplateSerializer, self).to_representation(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_Task, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 695, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_Module, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 695, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "polemarch/api/v2/serializers.py":696
 *         data = OrderedDict()
 *         if instance.kind in ["Task", "Module"]:
 *             hidden_vars = models.PeriodicTask.HIDDEN_VARS             # <<<<<<<<<<<<<<
 *             data = super(TemplateSerializer, self).to_representation(
 *                 instance, hidden_vars=hidden_vars
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_models); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PeriodicTask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_HIDDEN_VARS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_hidden_vars = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":697
 *         if instance.kind in ["Task", "Module"]:
 *             hidden_vars = models.PeriodicTask.HIDDEN_VARS
 *             data = super(TemplateSerializer, self).to_representation(             # <<<<<<<<<<<<<<
 *                 instance, hidden_vars=hidden_vars
 *             )
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_TemplateSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __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_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_to_representation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":698
 *             hidden_vars = models.PeriodicTask.HIDDEN_VARS
 *             data = super(TemplateSerializer, self).to_representation(
 *                 instance, hidden_vars=hidden_vars             # <<<<<<<<<<<<<<
 *             )
 *             self.repr_options(instance, data, hidden_vars)
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_instance);
    __Pyx_GIVEREF(__pyx_v_instance);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_instance);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_hidden_vars, __pyx_v_hidden_vars) < 0) __PYX_ERR(0, 698, __pyx_L1_error)

    /* "polemarch/api/v2/serializers.py":697
 *         if instance.kind in ["Task", "Module"]:
 *             hidden_vars = models.PeriodicTask.HIDDEN_VARS
 *             data = super(TemplateSerializer, self).to_representation(             # <<<<<<<<<<<<<<
 *                 instance, hidden_vars=hidden_vars
 *             )
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "polemarch/api/v2/serializers.py":700
 *                 instance, hidden_vars=hidden_vars
 *             )
 *             self.repr_options(instance, data, hidden_vars)             # <<<<<<<<<<<<<<
 *         return data
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_repr_options); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_instance, __pyx_v_data, __pyx_v_hidden_vars};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_instance, __pyx_v_data, __pyx_v_hidden_vars};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_INCREF(__pyx_v_instance);
      __Pyx_GIVEREF(__pyx_v_instance);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_instance);
      __Pyx_INCREF(__pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_v_data);
      __Pyx_INCREF(__pyx_v_hidden_vars);
      __Pyx_GIVEREF(__pyx_v_hidden_vars);
      PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_7, __pyx_v_hidden_vars);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "polemarch/api/v2/serializers.py":695
 *     def to_representation(self, instance):
 *         data = OrderedDict()
 *         if instance.kind in ["Task", "Module"]:             # <<<<<<<<<<<<<<
 *             hidden_vars = models.PeriodicTask.HIDDEN_VARS
 *             data = super(TemplateSerializer, self).to_representation(
 */
  }

  /* "polemarch/api/v2/serializers.py":701
 *             )
 *             self.repr_options(instance, data, hidden_vars)
 *         return data             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":693
 *             data['options'][name] = self.set_opts_vars(rep, hv)
 * 
 *     def to_representation(self, instance):             # <<<<<<<<<<<<<<
 *         data = OrderedDict()
 *         if instance.kind in ["Task", "Module"]:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.TemplateSerializer.to_representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_hidden_vars);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":722
 *         )
 * 
 *     def execute(self, request):             # <<<<<<<<<<<<<<
 *         serializer = OneProjectSerializer(self.instance.project)
 *         return self.instance.execute(
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_21OneTemplateSerializer_1execute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_21OneTemplateSerializer_1execute = {"execute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_21OneTemplateSerializer_1execute, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_21OneTemplateSerializer_1execute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_request = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_request,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_request)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("execute", 1, 2, 2, 1); __PYX_ERR(0, 722, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "execute") < 0)) __PYX_ERR(0, 722, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_request = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("execute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 722, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneTemplateSerializer.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_21OneTemplateSerializer_execute(__pyx_self, __pyx_v_self, __pyx_v_request);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_21OneTemplateSerializer_execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_request) {
  PyObject *__pyx_v_serializer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("execute", 0);

  /* "polemarch/api/v2/serializers.py":723
 * 
 *     def execute(self, request):
 *         serializer = OneProjectSerializer(self.instance.project)             # <<<<<<<<<<<<<<
 *         return self.instance.execute(
 *             serializer, request.user, request.data.get('option', None)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OneProjectSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_project); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_serializer = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":724
 *     def execute(self, request):
 *         serializer = OneProjectSerializer(self.instance.project)
 *         return self.instance.execute(             # <<<<<<<<<<<<<<
 *             serializer, request.user, request.data.get('option', None)
 *         )
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_execute); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":725
 *         serializer = OneProjectSerializer(self.instance.project)
 *         return self.instance.execute(
 *             serializer, request.user, request.data.get('option', None)             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_request, __pyx_n_s_user); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_request, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_serializer, __pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_serializer, __pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_serializer);
    __Pyx_GIVEREF(__pyx_v_serializer);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_serializer);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":722
 *         )
 * 
 *     def execute(self, request):             # <<<<<<<<<<<<<<
 *         serializer = OneProjectSerializer(self.instance.project)
 *         return self.instance.execute(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneTemplateSerializer.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_serializer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":798
 * 
 * 
 * def list_to_choices(items_list):             # <<<<<<<<<<<<<<
 *     def handler(item):
 *         return (item, item)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_3list_to_choices(PyObject *__pyx_self, PyObject *__pyx_v_items_list); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_3list_to_choices = {"list_to_choices", (PyCFunction)__pyx_pw_9polemarch_3api_2v2_11serializers_3list_to_choices, METH_O, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_3list_to_choices(PyObject *__pyx_self, PyObject *__pyx_v_items_list) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("list_to_choices (wrapper)", 0);
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_2list_to_choices(__pyx_self, ((PyObject *)__pyx_v_items_list));

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

/* "polemarch/api/v2/serializers.py":799
 * 
 * def list_to_choices(items_list):
 *     def handler(item):             # <<<<<<<<<<<<<<
 *         return (item, item)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_15list_to_choices_1handler(PyObject *__pyx_self, PyObject *__pyx_v_item); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_15list_to_choices_1handler = {"handler", (PyCFunction)__pyx_pw_9polemarch_3api_2v2_11serializers_15list_to_choices_1handler, METH_O, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_15list_to_choices_1handler(PyObject *__pyx_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handler (wrapper)", 0);
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_15list_to_choices_handler(__pyx_self, ((PyObject *)__pyx_v_item));

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_15list_to_choices_handler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("handler", 0);

  /* "polemarch/api/v2/serializers.py":800
 * def list_to_choices(items_list):
 *     def handler(item):
 *         return (item, item)             # <<<<<<<<<<<<<<
 * 
 *     return list(map(handler, items_list))
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_item);
  __Pyx_GIVEREF(__pyx_v_item);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_item);
  __Pyx_INCREF(__pyx_v_item);
  __Pyx_GIVEREF(__pyx_v_item);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_item);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":799
 * 
 * def list_to_choices(items_list):
 *     def handler(item):             # <<<<<<<<<<<<<<
 *         return (item, item)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.list_to_choices.handler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":798
 * 
 * 
 * def list_to_choices(items_list):             # <<<<<<<<<<<<<<
 *     def handler(item):
 *         return (item, item)
 */

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_2list_to_choices(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_items_list) {
  PyObject *__pyx_v_handler = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("list_to_choices", 0);

  /* "polemarch/api/v2/serializers.py":799
 * 
 * def list_to_choices(items_list):
 *     def handler(item):             # <<<<<<<<<<<<<<
 *         return (item, item)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_15list_to_choices_1handler, 0, __pyx_n_s_list_to_choices_locals_handler, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_handler = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":802
 *         return (item, item)
 * 
 *     return list(map(handler, items_list))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_handler);
  __Pyx_GIVEREF(__pyx_v_handler);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_handler);
  __Pyx_INCREF(__pyx_v_items_list);
  __Pyx_GIVEREF(__pyx_v_items_list);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_items_list);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":798
 * 
 * 
 * def list_to_choices(items_list):             # <<<<<<<<<<<<<<
 *     def handler(item):
 *         return (item, item)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.list_to_choices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_handler);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":842
 *         }
 * 
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         repo_type = validated_data.pop('type')
 *         repo_auth_type = validated_data.pop('repo_auth')
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_29ProjectCreateMasterSerializer_1create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_29ProjectCreateMasterSerializer_1create = {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_29ProjectCreateMasterSerializer_1create, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_29ProjectCreateMasterSerializer_1create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_validated_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_validated_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validated_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, 1); __PYX_ERR(0, 842, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 842, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_validated_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 842, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.ProjectCreateMasterSerializer.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_29ProjectCreateMasterSerializer_create(__pyx_self, __pyx_v_self, __pyx_v_validated_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_29ProjectCreateMasterSerializer_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_validated_data) {
  PyObject *__pyx_v_repo_type = NULL;
  PyObject *__pyx_v_repo_auth_type = NULL;
  PyObject *__pyx_v_repo_auth_data = NULL;
  PyObject *__pyx_v_instance = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("create", 0);

  /* "polemarch/api/v2/serializers.py":843
 * 
 *     def create(self, validated_data):
 *         repo_type = validated_data.pop('type')             # <<<<<<<<<<<<<<
 *         repo_auth_type = validated_data.pop('repo_auth')
 *         repo_auth_data = validated_data.pop('auth_data')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_validated_data, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_type);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_repo_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":844
 *     def create(self, validated_data):
 *         repo_type = validated_data.pop('type')
 *         repo_auth_type = validated_data.pop('repo_auth')             # <<<<<<<<<<<<<<
 *         repo_auth_data = validated_data.pop('auth_data')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_validated_data, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_repo_auth) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_repo_auth);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_repo_auth_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":845
 *         repo_type = validated_data.pop('type')
 *         repo_auth_type = validated_data.pop('repo_auth')
 *         repo_auth_data = validated_data.pop('auth_data')             # <<<<<<<<<<<<<<
 * 
 *         instance = super(ProjectCreateMasterSerializer, self).create(validated_data)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_validated_data, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_auth_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_auth_data);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_repo_auth_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":847
 *         repo_auth_data = validated_data.pop('auth_data')
 * 
 *         instance = super(ProjectCreateMasterSerializer, self).create(validated_data)             # <<<<<<<<<<<<<<
 *         instance.variables.create(key='repo_type', value=repo_type)
 *         if repo_auth_type != 'NONE':  # nocv
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ProjectCreateMasterSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_validated_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_validated_data);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_instance = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":848
 * 
 *         instance = super(ProjectCreateMasterSerializer, self).create(validated_data)
 *         instance.variables.create(key='repo_type', value=repo_type)             # <<<<<<<<<<<<<<
 *         if repo_auth_type != 'NONE':  # nocv
 *             key = 'repo_{}'.format(repo_auth_type.lower())
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_key, __pyx_n_u_repo_type) < 0) __PYX_ERR(0, 848, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_value, __pyx_v_repo_type) < 0) __PYX_ERR(0, 848, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":849
 *         instance = super(ProjectCreateMasterSerializer, self).create(validated_data)
 *         instance.variables.create(key='repo_type', value=repo_type)
 *         if repo_auth_type != 'NONE':  # nocv             # <<<<<<<<<<<<<<
 *             key = 'repo_{}'.format(repo_auth_type.lower())
 *             instance.variables.create(key=key, value=repo_auth_data)
 */
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_repo_auth_type, __pyx_n_u_NONE, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 849, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "polemarch/api/v2/serializers.py":850
 *         instance.variables.create(key='repo_type', value=repo_type)
 *         if repo_auth_type != 'NONE':  # nocv
 *             key = 'repo_{}'.format(repo_auth_type.lower())             # <<<<<<<<<<<<<<
 *             instance.variables.create(key=key, value=repo_auth_data)
 *         return instance
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_repo, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_repo_auth_type, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_key = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "polemarch/api/v2/serializers.py":851
 *         if repo_auth_type != 'NONE':  # nocv
 *             key = 'repo_{}'.format(repo_auth_type.lower())
 *             instance.variables.create(key=key, value=repo_auth_data)             # <<<<<<<<<<<<<<
 *         return instance
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_v_key) < 0) __PYX_ERR(0, 851, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_value, __pyx_v_repo_auth_data) < 0) __PYX_ERR(0, 851, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "polemarch/api/v2/serializers.py":849
 *         instance = super(ProjectCreateMasterSerializer, self).create(validated_data)
 *         instance.variables.create(key='repo_type', value=repo_type)
 *         if repo_auth_type != 'NONE':  # nocv             # <<<<<<<<<<<<<<
 *             key = 'repo_{}'.format(repo_auth_type.lower())
 *             instance.variables.create(key=key, value=repo_auth_data)
 */
  }

  /* "polemarch/api/v2/serializers.py":852
 *             key = 'repo_{}'.format(repo_auth_type.lower())
 *             instance.variables.create(key=key, value=repo_auth_data)
 *         return instance             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_instance);
  __pyx_r = __pyx_v_instance;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":842
 *         }
 * 
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         repo_type = validated_data.pop('type')
 *         repo_auth_type = validated_data.pop('repo_auth')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.ProjectCreateMasterSerializer.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_repo_type);
  __Pyx_XDECREF(__pyx_v_repo_auth_type);
  __Pyx_XDECREF(__pyx_v_repo_auth_data);
  __Pyx_XDECREF(__pyx_v_instance);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":867
 * 
 *     @transaction.atomic
 *     def _do_with_vars(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         instance = super(ProjectSerializer, self)._do_with_vars(*args, **kw)
 *         return instance if instance.repo_class else None
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_17ProjectSerializer_1_do_with_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_17ProjectSerializer_1_do_with_vars = {"_do_with_vars", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_17ProjectSerializer_1_do_with_vars, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_17ProjectSerializer_1_do_with_vars(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_do_with_vars (wrapper)", 0);
  __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, used_pos_args, "_do_with_vars") < 0)) __PYX_ERR(0, 867, __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_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_do_with_vars", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 867, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.ProjectSerializer._do_with_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_17ProjectSerializer__do_with_vars(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kw);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_17ProjectSerializer__do_with_vars(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kw) {
  PyObject *__pyx_v_instance = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("_do_with_vars", 0);

  /* "polemarch/api/v2/serializers.py":868
 *     @transaction.atomic
 *     def _do_with_vars(self, *args, **kw):
 *         instance = super(ProjectSerializer, self)._do_with_vars(*args, **kw)             # <<<<<<<<<<<<<<
 *         return instance if instance.repo_class else None
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProjectSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __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_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_do_with_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_instance = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":869
 *     def _do_with_vars(self, *args, **kw):
 *         instance = super(ProjectSerializer, self)._do_with_vars(*args, **kw)
 *         return instance if instance.repo_class else None             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_instance, __pyx_n_s_repo_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_v_instance);
    __pyx_t_1 = __pyx_v_instance;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":867
 * 
 *     @transaction.atomic
 *     def _do_with_vars(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         instance = super(ProjectSerializer, self)._do_with_vars(*args, **kw)
 *         return instance if instance.repo_class else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.ProjectSerializer._do_with_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_instance);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":893
 * 
 *     @transaction.atomic()
 *     def sync(self):             # <<<<<<<<<<<<<<
 *         self.instance.start_repo_task("sync")
 *         serializer = ActionResponseSerializer(
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_1sync(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_1sync = {"sync", (PyCFunction)__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_1sync, METH_O, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_1sync(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_sync(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_sync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_serializer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("sync", 0);

  /* "polemarch/api/v2/serializers.py":894
 *     @transaction.atomic()
 *     def sync(self):
 *         self.instance.start_repo_task("sync")             # <<<<<<<<<<<<<<
 *         serializer = ActionResponseSerializer(
 *             data=dict(detail="Sync with {}.".format(self.instance.repository))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_start_repo_task); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_u_sync) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_sync);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":895
 *     def sync(self):
 *         self.instance.start_repo_task("sync")
 *         serializer = ActionResponseSerializer(             # <<<<<<<<<<<<<<
 *             data=dict(detail="Sync with {}.".format(self.instance.repository))
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ActionResponseSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":896
 *         self.instance.start_repo_task("sync")
 *         serializer = ActionResponseSerializer(
 *             data=dict(detail="Sync with {}.".format(self.instance.repository))             # <<<<<<<<<<<<<<
 *         )
 *         serializer.is_valid(True)
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Sync_with, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_repository); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_detail, __pyx_t_4) < 0) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_data, __pyx_t_2) < 0) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":895
 *     def sync(self):
 *         self.instance.start_repo_task("sync")
 *         serializer = ActionResponseSerializer(             # <<<<<<<<<<<<<<
 *             data=dict(detail="Sync with {}.".format(self.instance.repository))
 *         )
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_serializer = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":898
 *             data=dict(detail="Sync with {}.".format(self.instance.repository))
 *         )
 *         serializer.is_valid(True)             # <<<<<<<<<<<<<<
 *         return Response(serializer.data, status.HTTP_200_OK)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_serializer, __pyx_n_s_is_valid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_3, Py_True);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":899
 *         )
 *         serializer.is_valid(True)
 *         return Response(serializer.data, status.HTTP_200_OK)             # <<<<<<<<<<<<<<
 * 
 *     def _get_execution_inventory(self, template, inventory, user):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Response); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_serializer, __pyx_n_s_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_HTTP_200_OK); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_8 = 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_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_1, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_1, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_t_5);
    __pyx_t_1 = 0;
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":893
 * 
 *     @transaction.atomic()
 *     def sync(self):             # <<<<<<<<<<<<<<
 *         self.instance.start_repo_task("sync")
 *         serializer = ActionResponseSerializer(
 */

  /* function exit code */
  __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("polemarch.api.v2.serializers.OneProjectSerializer.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_serializer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":901
 *         return Response(serializer.data, status.HTTP_200_OK)
 * 
 *     def _get_execution_inventory(self, template, inventory, user):             # <<<<<<<<<<<<<<
 *         if template or inventory is None:
 *             return inventory
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_3_get_execution_inventory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_3_get_execution_inventory = {"_get_execution_inventory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_3_get_execution_inventory, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_3_get_execution_inventory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_template = 0;
  PyObject *__pyx_v_inventory = 0;
  PyObject *__pyx_v_user = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_execution_inventory (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_template,&__pyx_n_s_inventory,&__pyx_n_s_user,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_template)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_get_execution_inventory", 1, 4, 4, 1); __PYX_ERR(0, 901, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inventory)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_get_execution_inventory", 1, 4, 4, 2); __PYX_ERR(0, 901, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_user)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_get_execution_inventory", 1, 4, 4, 3); __PYX_ERR(0, 901, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_execution_inventory") < 0)) __PYX_ERR(0, 901, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_template = values[1];
    __pyx_v_inventory = values[2];
    __pyx_v_user = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_execution_inventory", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 901, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneProjectSerializer._get_execution_inventory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_2_get_execution_inventory(__pyx_self, __pyx_v_self, __pyx_v_template, __pyx_v_inventory, __pyx_v_user);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_2_get_execution_inventory(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_template, PyObject *__pyx_v_inventory, PyObject *__pyx_v_user) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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;
  __Pyx_RefNannySetupContext("_get_execution_inventory", 0);
  __Pyx_INCREF(__pyx_v_inventory);

  /* "polemarch/api/v2/serializers.py":902
 * 
 *     def _get_execution_inventory(self, template, inventory, user):
 *         if template or inventory is None:             # <<<<<<<<<<<<<<
 *             return inventory
 *         try:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_template); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 902, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_inventory == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "polemarch/api/v2/serializers.py":903
 *     def _get_execution_inventory(self, template, inventory, user):
 *         if template or inventory is None:
 *             return inventory             # <<<<<<<<<<<<<<
 *         try:
 *             inventory = Inventory.objects.get(id=int(inventory))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_inventory);
    __pyx_r = __pyx_v_inventory;
    goto __pyx_L0;

    /* "polemarch/api/v2/serializers.py":902
 * 
 *     def _get_execution_inventory(self, template, inventory, user):
 *         if template or inventory is None:             # <<<<<<<<<<<<<<
 *             return inventory
 *         try:
 */
  }

  /* "polemarch/api/v2/serializers.py":904
 *         if template or inventory is None:
 *             return inventory
 *         try:             # <<<<<<<<<<<<<<
 *             inventory = Inventory.objects.get(id=int(inventory))
 *             if not inventory.acl_handler.viewable_by(user):  # nocv
 */
  {
    __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:*/ {

      /* "polemarch/api/v2/serializers.py":905
 *             return inventory
 *         try:
 *             inventory = Inventory.objects.get(id=int(inventory))             # <<<<<<<<<<<<<<
 *             if not inventory.acl_handler.viewable_by(user):  # nocv
 *                 raise PermissionDenied(
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Inventory); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 905, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_objects); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 905, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 905, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 905, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_v_inventory); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 905, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_id, __pyx_t_9) < 0) __PYX_ERR(0, 905, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 905, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_inventory, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "polemarch/api/v2/serializers.py":906
 *         try:
 *             inventory = Inventory.objects.get(id=int(inventory))
 *             if not inventory.acl_handler.viewable_by(user):  # nocv             # <<<<<<<<<<<<<<
 *                 raise PermissionDenied(
 *                     "You don't have permission to inventory."
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_inventory, __pyx_n_s_acl_handler); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 906, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_viewable_by); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 906, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_user) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_user);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 906, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 906, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_3 = ((!__pyx_t_1) != 0);
      if (unlikely(__pyx_t_3)) {

        /* "polemarch/api/v2/serializers.py":907
 *             inventory = Inventory.objects.get(id=int(inventory))
 *             if not inventory.acl_handler.viewable_by(user):  # nocv
 *                 raise PermissionDenied(             # <<<<<<<<<<<<<<
 *                     "You don't have permission to inventory."
 *                 )
 */
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PermissionDenied); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 907, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_kp_u_You_don_t_have_permission_to_inv) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u_You_don_t_have_permission_to_inv);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 907, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(0, 907, __pyx_L6_error)

        /* "polemarch/api/v2/serializers.py":906
 *         try:
 *             inventory = Inventory.objects.get(id=int(inventory))
 *             if not inventory.acl_handler.viewable_by(user):  # nocv             # <<<<<<<<<<<<<<
 *                 raise PermissionDenied(
 *                     "You don't have permission to inventory."
 */
      }

      /* "polemarch/api/v2/serializers.py":904
 *         if template or inventory is None:
 *             return inventory
 *         try:             # <<<<<<<<<<<<<<
 *             inventory = Inventory.objects.get(id=int(inventory))
 *             if not inventory.acl_handler.viewable_by(user):  # nocv
 */
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L11_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "polemarch/api/v2/serializers.py":910
 *                     "You don't have permission to inventory."
 *                 )
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             pass
 *         return inventory
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_10) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L7_exception_handled;
    }
    goto __pyx_L8_except_error;
    __pyx_L8_except_error:;

    /* "polemarch/api/v2/serializers.py":904
 *         if template or inventory is None:
 *             return inventory
 *         try:             # <<<<<<<<<<<<<<
 *             inventory = Inventory.objects.get(id=int(inventory))
 *             if not inventory.acl_handler.viewable_by(user):  # nocv
 */
    __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_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    __pyx_L11_try_end:;
  }

  /* "polemarch/api/v2/serializers.py":912
 *         except ValueError:
 *             pass
 *         return inventory             # <<<<<<<<<<<<<<
 * 
 *     def _execution(self, kind, data, user, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_inventory);
  __pyx_r = __pyx_v_inventory;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":901
 *         return Response(serializer.data, status.HTTP_200_OK)
 * 
 *     def _get_execution_inventory(self, template, inventory, user):             # <<<<<<<<<<<<<<
 *         if template or inventory is None:
 *             return inventory
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneProjectSerializer._get_execution_inventory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_inventory);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":914
 *         return inventory
 * 
 *     def _execution(self, kind, data, user, **kwargs):             # <<<<<<<<<<<<<<
 *         template = kwargs.pop("template", None)
 *         inventory = self._get_execution_inventory(
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_5_execution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_5_execution = {"_execution", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_5_execution, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_5_execution(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kind = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_user = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_execution (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_kind,&__pyx_n_s_data,&__pyx_n_s_user,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kind)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_execution", 1, 4, 4, 1); __PYX_ERR(0, 914, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_execution", 1, 4, 4, 2); __PYX_ERR(0, 914, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_user)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_execution", 1, 4, 4, 3); __PYX_ERR(0, 914, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "_execution") < 0)) __PYX_ERR(0, 914, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_kind = values[1];
    __pyx_v_data = values[2];
    __pyx_v_user = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_execution", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 914, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneProjectSerializer._execution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_4_execution(__pyx_self, __pyx_v_self, __pyx_v_kind, __pyx_v_data, __pyx_v_user, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_4_execution(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kind, PyObject *__pyx_v_data, PyObject *__pyx_v_user, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_template = NULL;
  PyObject *__pyx_v_inventory = NULL;
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_v_init_type = NULL;
  PyObject *__pyx_v_obj_id = NULL;
  PyObject *__pyx_v_serializer = NULL;
  PyObject *__pyx_v_history_id = NULL;
  PyObject *__pyx_v_rdata = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_k = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  __Pyx_RefNannySetupContext("_execution", 0);
  __Pyx_INCREF(__pyx_v_data);

  /* "polemarch/api/v2/serializers.py":915
 * 
 *     def _execution(self, kind, data, user, **kwargs):
 *         template = kwargs.pop("template", None)             # <<<<<<<<<<<<<<
 *         inventory = self._get_execution_inventory(
 *             template, data.pop("inventory", None), user
 */
  __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_kwargs, __pyx_n_u_template, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_template = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":916
 *     def _execution(self, kind, data, user, **kwargs):
 *         template = kwargs.pop("template", None)
 *         inventory = self._get_execution_inventory(             # <<<<<<<<<<<<<<
 *             template, data.pop("inventory", None), user
 *         )
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_execution_inventory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":917
 *         template = kwargs.pop("template", None)
 *         inventory = self._get_execution_inventory(
 *             template, data.pop("inventory", None), user             # <<<<<<<<<<<<<<
 *         )
 *         msg = "Started in the inventory {}.".format(
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && 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_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_template, __pyx_t_4, __pyx_v_user};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_template, __pyx_t_4, __pyx_v_user};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_template);
    __Pyx_GIVEREF(__pyx_v_template);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_template);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_user);
    __Pyx_GIVEREF(__pyx_v_user);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_user);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_inventory = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":919
 *             template, data.pop("inventory", None), user
 *         )
 *         msg = "Started in the inventory {}.".format(             # <<<<<<<<<<<<<<
 *             inventory if inventory else 'specified in the project configuration.'
 *         )
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Started_in_the_inventory, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":920
 *         )
 *         msg = "Started in the inventory {}.".format(
 *             inventory if inventory else 'specified in the project configuration.'             # <<<<<<<<<<<<<<
 *         )
 *         if template is not None:
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_inventory); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 920, __pyx_L1_error)
  if (__pyx_t_7) {
    __Pyx_INCREF(__pyx_v_inventory);
    __pyx_t_6 = __pyx_v_inventory;
  } else {
    __Pyx_INCREF(__pyx_kp_u_specified_in_the_project_configu);
    __pyx_t_6 = __pyx_kp_u_specified_in_the_project_configu;
  }
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_msg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":922
 *             inventory if inventory else 'specified in the project configuration.'
 *         )
 *         if template is not None:             # <<<<<<<<<<<<<<
 *             init_type = "template"
 *             obj_id = template
 */
  __pyx_t_7 = (__pyx_v_template != Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "polemarch/api/v2/serializers.py":923
 *         )
 *         if template is not None:
 *             init_type = "template"             # <<<<<<<<<<<<<<
 *             obj_id = template
 *             data['template_option'] = kwargs.get('template_option', None)
 */
    __Pyx_INCREF(__pyx_n_u_template);
    __pyx_v_init_type = __pyx_n_u_template;

    /* "polemarch/api/v2/serializers.py":924
 *         if template is not None:
 *             init_type = "template"
 *             obj_id = template             # <<<<<<<<<<<<<<
 *             data['template_option'] = kwargs.get('template_option', None)
 *             msg = 'Start template [id={}].'.format(template)
 */
    __Pyx_INCREF(__pyx_v_template);
    __pyx_v_obj_id = __pyx_v_template;

    /* "polemarch/api/v2/serializers.py":925
 *             init_type = "template"
 *             obj_id = template
 *             data['template_option'] = kwargs.get('template_option', None)             # <<<<<<<<<<<<<<
 *             msg = 'Start template [id={}].'.format(template)
 *         else:
 */
    __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_u_template_option, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_n_u_template_option, __pyx_t_1) < 0)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":926
 *             obj_id = template
 *             data['template_option'] = kwargs.get('template_option', None)
 *             msg = 'Start template [id={}].'.format(template)             # <<<<<<<<<<<<<<
 *         else:
 *             init_type = "project"
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Start_template_id, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_template) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_template);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":922
 *             inventory if inventory else 'specified in the project configuration.'
 *         )
 *         if template is not None:             # <<<<<<<<<<<<<<
 *             init_type = "template"
 *             obj_id = template
 */
    goto __pyx_L3;
  }

  /* "polemarch/api/v2/serializers.py":928
 *             msg = 'Start template [id={}].'.format(template)
 *         else:
 *             init_type = "project"             # <<<<<<<<<<<<<<
 *             obj_id = self.instance.id
 *             if kind.lower() == 'module':
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_u_project);
    __pyx_v_init_type = __pyx_n_u_project;

    /* "polemarch/api/v2/serializers.py":929
 *         else:
 *             init_type = "project"
 *             obj_id = self.instance.id             # <<<<<<<<<<<<<<
 *             if kind.lower() == 'module':
 *                 serializer = AnsibleModuleSerializer()
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_obj_id = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "polemarch/api/v2/serializers.py":930
 *             init_type = "project"
 *             obj_id = self.instance.id
 *             if kind.lower() == 'module':             # <<<<<<<<<<<<<<
 *                 serializer = AnsibleModuleSerializer()
 *             elif kind.lower() == 'playbook':
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kind, __pyx_n_s_lower); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_module, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_8) {

      /* "polemarch/api/v2/serializers.py":931
 *             obj_id = self.instance.id
 *             if kind.lower() == 'module':
 *                 serializer = AnsibleModuleSerializer()             # <<<<<<<<<<<<<<
 *             elif kind.lower() == 'playbook':
 *                 serializer = AnsiblePlaybookSerializer()
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_AnsibleModuleSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_serializer = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "polemarch/api/v2/serializers.py":930
 *             init_type = "project"
 *             obj_id = self.instance.id
 *             if kind.lower() == 'module':             # <<<<<<<<<<<<<<
 *                 serializer = AnsibleModuleSerializer()
 *             elif kind.lower() == 'playbook':
 */
      goto __pyx_L4;
    }

    /* "polemarch/api/v2/serializers.py":932
 *             if kind.lower() == 'module':
 *                 serializer = AnsibleModuleSerializer()
 *             elif kind.lower() == 'playbook':             # <<<<<<<<<<<<<<
 *                 serializer = AnsiblePlaybookSerializer()
 *             else:  # nocv
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kind, __pyx_n_s_lower); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_playbook, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(__pyx_t_8)) {

      /* "polemarch/api/v2/serializers.py":933
 *                 serializer = AnsibleModuleSerializer()
 *             elif kind.lower() == 'playbook':
 *                 serializer = AnsiblePlaybookSerializer()             # <<<<<<<<<<<<<<
 *             else:  # nocv
 *                 raise Exception('Unknown kind')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_AnsiblePlaybookSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_serializer = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "polemarch/api/v2/serializers.py":932
 *             if kind.lower() == 'module':
 *                 serializer = AnsibleModuleSerializer()
 *             elif kind.lower() == 'playbook':             # <<<<<<<<<<<<<<
 *                 serializer = AnsiblePlaybookSerializer()
 *             else:  # nocv
 */
      goto __pyx_L4;
    }

    /* "polemarch/api/v2/serializers.py":935
 *                 serializer = AnsiblePlaybookSerializer()
 *             else:  # nocv
 *                 raise Exception('Unknown kind')             # <<<<<<<<<<<<<<
 *             data = {
 *                 k: v for k, v in serializer.to_internal_value(data).items()
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 935, __pyx_L1_error)
    }
    __pyx_L4:;

    /* "polemarch/api/v2/serializers.py":936
 *             else:  # nocv
 *                 raise Exception('Unknown kind')
 *             data = {             # <<<<<<<<<<<<<<
 *                 k: v for k, v in serializer.to_internal_value(data).items()
 *                 if k in data.keys() or v
 */
    { /* enter inner scope */
      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "polemarch/api/v2/serializers.py":937
 *                 raise Exception('Unknown kind')
 *             data = {
 *                 k: v for k, v in serializer.to_internal_value(data).items()             # <<<<<<<<<<<<<<
 *                 if k in data.keys() or v
 *             }
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_serializer, __pyx_n_s_to_internal_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 937, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 937, __pyx_L7_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 937, __pyx_L7_error)
            #else
            __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 937, __pyx_L7_error)
            #else
            __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          }
        } else {
          __pyx_t_1 = __pyx_t_10(__pyx_t_4);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 937, __pyx_L7_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 937, __pyx_L7_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          #else
          __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 937, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 937, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
          index = 0; __pyx_t_6 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_6)) goto __pyx_L10_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L10_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 937, __pyx_L7_error)
          __pyx_t_12 = NULL;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          goto __pyx_L11_unpacking_done;
          __pyx_L10_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_12 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 937, __pyx_L7_error)
          __pyx_L11_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_k, __pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_v, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "polemarch/api/v2/serializers.py":938
 *             data = {
 *                 k: v for k, v in serializer.to_internal_value(data).items()
 *                 if k in data.keys() or v             # <<<<<<<<<<<<<<
 *             }
 *         history_id = self.instance.execute(
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr1__pyx_v_k, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 938, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_13 = (__pyx_t_7 != 0);
        if (!__pyx_t_13) {
        } else {
          __pyx_t_8 = __pyx_t_13;
          goto __pyx_L13_bool_binop_done;
        }
        __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_8genexpr1__pyx_v_v); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 938, __pyx_L7_error)
        __pyx_t_8 = __pyx_t_13;
        __pyx_L13_bool_binop_done:;
        if (__pyx_t_8) {

          /* "polemarch/api/v2/serializers.py":937
 *                 raise Exception('Unknown kind')
 *             data = {
 *                 k: v for k, v in serializer.to_internal_value(data).items()             # <<<<<<<<<<<<<<
 *                 if k in data.keys() or v
 *             }
 */
          if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_8genexpr1__pyx_v_k, (PyObject*)__pyx_8genexpr1__pyx_v_v))) __PYX_ERR(0, 937, __pyx_L7_error)

          /* "polemarch/api/v2/serializers.py":938
 *             data = {
 *                 k: v for k, v in serializer.to_internal_value(data).items()
 *                 if k in data.keys() or v             # <<<<<<<<<<<<<<
 *             }
 *         history_id = self.instance.execute(
 */
        }

        /* "polemarch/api/v2/serializers.py":937
 *                 raise Exception('Unknown kind')
 *             data = {
 *                 k: v for k, v in serializer.to_internal_value(data).items()             # <<<<<<<<<<<<<<
 *                 if k in data.keys() or v
 *             }
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); __pyx_8genexpr1__pyx_v_k = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __pyx_8genexpr1__pyx_v_v = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); __pyx_8genexpr1__pyx_v_k = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __pyx_8genexpr1__pyx_v_v = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "polemarch/api/v2/serializers.py":940
 *                 if k in data.keys() or v
 *             }
 *         history_id = self.instance.execute(             # <<<<<<<<<<<<<<
 *             kind, str(data.pop(kind)), inventory,
 *             initiator=obj_id, initiator_type=init_type, executor=user, **data
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_execute); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":941
 *             }
 *         history_id = self.instance.execute(
 *             kind, str(data.pop(kind)), inventory,             # <<<<<<<<<<<<<<
 *             initiator=obj_id, initiator_type=init_type, executor=user, **data
 *         )
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_kind) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_kind);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":940
 *                 if k in data.keys() or v
 *             }
 *         history_id = self.instance.execute(             # <<<<<<<<<<<<<<
 *             kind, str(data.pop(kind)), inventory,
 *             initiator=obj_id, initiator_type=init_type, executor=user, **data
 */
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_kind);
  __Pyx_GIVEREF(__pyx_v_kind);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_kind);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_inventory);
  __Pyx_GIVEREF(__pyx_v_inventory);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_inventory);
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":942
 *         history_id = self.instance.execute(
 *             kind, str(data.pop(kind)), inventory,
 *             initiator=obj_id, initiator_type=init_type, executor=user, **data             # <<<<<<<<<<<<<<
 *         )
 *         rdata = ExecuteResponseSerializer(data=dict(
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_initiator, __pyx_v_obj_id) < 0) __PYX_ERR(0, 942, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_initiator_type, __pyx_v_init_type) < 0) __PYX_ERR(0, 942, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_executor, __pyx_v_user) < 0) __PYX_ERR(0, 942, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 942, __pyx_L1_error)
  }
  if (__Pyx_MergeKeywords(__pyx_t_1, __pyx_v_data) < 0) __PYX_ERR(0, 942, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":940
 *                 if k in data.keys() or v
 *             }
 *         history_id = self.instance.execute(             # <<<<<<<<<<<<<<
 *             kind, str(data.pop(kind)), inventory,
 *             initiator=obj_id, initiator_type=init_type, executor=user, **data
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_history_id = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":944
 *             initiator=obj_id, initiator_type=init_type, executor=user, **data
 *         )
 *         rdata = ExecuteResponseSerializer(data=dict(             # <<<<<<<<<<<<<<
 *             detail=msg,
 *             history_id=history_id, executor=user.id
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ExecuteResponseSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":945
 *         )
 *         rdata = ExecuteResponseSerializer(data=dict(
 *             detail=msg,             # <<<<<<<<<<<<<<
 *             history_id=history_id, executor=user.id
 *         ))
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_detail, __pyx_v_msg) < 0) __PYX_ERR(0, 945, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":946
 *         rdata = ExecuteResponseSerializer(data=dict(
 *             detail=msg,
 *             history_id=history_id, executor=user.id             # <<<<<<<<<<<<<<
 *         ))
 *         rdata.is_valid(raise_exception=True)
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_history_id, __pyx_v_history_id) < 0) __PYX_ERR(0, 945, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_user, __pyx_n_s_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_executor, __pyx_t_4) < 0) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_data, __pyx_t_2) < 0) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":944
 *             initiator=obj_id, initiator_type=init_type, executor=user, **data
 *         )
 *         rdata = ExecuteResponseSerializer(data=dict(             # <<<<<<<<<<<<<<
 *             detail=msg,
 *             history_id=history_id, executor=user.id
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_rdata = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":948
 *             history_id=history_id, executor=user.id
 *         ))
 *         rdata.is_valid(raise_exception=True)             # <<<<<<<<<<<<<<
 *         return Response(rdata.data, status.HTTP_201_CREATED)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rdata, __pyx_n_s_is_valid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_raise_exception, Py_True) < 0) __PYX_ERR(0, 948, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":949
 *         ))
 *         rdata.is_valid(raise_exception=True)
 *         return Response(rdata.data, status.HTTP_201_CREATED)             # <<<<<<<<<<<<<<
 * 
 *     def execute_playbook(self, request):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Response); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rdata, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_status); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_HTTP_201_CREATED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_5, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_5, __pyx_t_6);
    __pyx_t_2 = 0;
    __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":914
 *         return inventory
 * 
 *     def _execution(self, kind, data, user, **kwargs):             # <<<<<<<<<<<<<<
 *         template = kwargs.pop("template", None)
 *         inventory = self._get_execution_inventory(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneProjectSerializer._execution", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_template);
  __Pyx_XDECREF(__pyx_v_inventory);
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_init_type);
  __Pyx_XDECREF(__pyx_v_obj_id);
  __Pyx_XDECREF(__pyx_v_serializer);
  __Pyx_XDECREF(__pyx_v_history_id);
  __Pyx_XDECREF(__pyx_v_rdata);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":951
 *         return Response(rdata.data, status.HTTP_201_CREATED)
 * 
 *     def execute_playbook(self, request):             # <<<<<<<<<<<<<<
 *         return self._execution("playbook", dict(request.data), request.user)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_7execute_playbook(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_7execute_playbook = {"execute_playbook", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_7execute_playbook, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_7execute_playbook(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_request = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execute_playbook (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_request,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_request)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("execute_playbook", 1, 2, 2, 1); __PYX_ERR(0, 951, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "execute_playbook") < 0)) __PYX_ERR(0, 951, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_request = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("execute_playbook", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 951, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneProjectSerializer.execute_playbook", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_6execute_playbook(__pyx_self, __pyx_v_self, __pyx_v_request);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_6execute_playbook(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_request) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("execute_playbook", 0);

  /* "polemarch/api/v2/serializers.py":952
 * 
 *     def execute_playbook(self, request):
 *         return self._execution("playbook", dict(request.data), request.user)             # <<<<<<<<<<<<<<
 * 
 *     def execute_module(self, request):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_execution); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_request, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_request, __pyx_n_s_user); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_n_u_playbook, __pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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[4] = {__pyx_t_5, __pyx_n_u_playbook, __pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_playbook);
    __Pyx_GIVEREF(__pyx_n_u_playbook);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_n_u_playbook);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":951
 *         return Response(rdata.data, status.HTTP_201_CREATED)
 * 
 *     def execute_playbook(self, request):             # <<<<<<<<<<<<<<
 *         return self._execution("playbook", dict(request.data), request.user)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneProjectSerializer.execute_playbook", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":954
 *         return self._execution("playbook", dict(request.data), request.user)
 * 
 *     def execute_module(self, request):             # <<<<<<<<<<<<<<
 *         return self._execution("module", dict(request.data), request.user)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_9execute_module(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_9execute_module = {"execute_module", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_9execute_module, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_9execute_module(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_request = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execute_module (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_request,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_request)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("execute_module", 1, 2, 2, 1); __PYX_ERR(0, 954, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "execute_module") < 0)) __PYX_ERR(0, 954, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_request = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("execute_module", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 954, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneProjectSerializer.execute_module", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_8execute_module(__pyx_self, __pyx_v_self, __pyx_v_request);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_8execute_module(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_request) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("execute_module", 0);

  /* "polemarch/api/v2/serializers.py":955
 * 
 *     def execute_module(self, request):
 *         return self._execution("module", dict(request.data), request.user)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_execution); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_request, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_request, __pyx_n_s_user); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_n_u_module, __pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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[4] = {__pyx_t_5, __pyx_n_u_module, __pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_module);
    __Pyx_GIVEREF(__pyx_n_u_module);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_n_u_module);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":954
 *         return self._execution("playbook", dict(request.data), request.user)
 * 
 *     def execute_module(self, request):             # <<<<<<<<<<<<<<
 *         return self._execution("module", dict(request.data), request.user)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.OneProjectSerializer.execute_module", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":961
 * 
 * 
 * def generate_fileds(ansible_type):             # <<<<<<<<<<<<<<
 *     if ansible_type is None:
 *         return OrderedDict()
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_5generate_fileds(PyObject *__pyx_self, PyObject *__pyx_v_ansible_type); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_5generate_fileds = {"generate_fileds", (PyCFunction)__pyx_pw_9polemarch_3api_2v2_11serializers_5generate_fileds, METH_O, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_5generate_fileds(PyObject *__pyx_self, PyObject *__pyx_v_ansible_type) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("generate_fileds (wrapper)", 0);
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_4generate_fileds(__pyx_self, ((PyObject *)__pyx_v_ansible_type));

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_4generate_fileds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ansible_type) {
  PyObject *__pyx_v_fields = NULL;
  PyObject *__pyx_v_ref = NULL;
  PyObject *__pyx_v_settings = NULL;
  PyObject *__pyx_v_ref_type = NULL;
  PyObject *__pyx_v_kwargs = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_v_field_name = NULL;
  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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_RefNannySetupContext("generate_fileds", 0);

  /* "polemarch/api/v2/serializers.py":962
 * 
 * def generate_fileds(ansible_type):
 *     if ansible_type is None:             # <<<<<<<<<<<<<<
 *         return OrderedDict()
 * 
 */
  __pyx_t_1 = (__pyx_v_ansible_type == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "polemarch/api/v2/serializers.py":963
 * def generate_fileds(ansible_type):
 *     if ansible_type is None:
 *         return OrderedDict()             # <<<<<<<<<<<<<<
 * 
 *     fields = OrderedDict()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_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, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "polemarch/api/v2/serializers.py":962
 * 
 * def generate_fileds(ansible_type):
 *     if ansible_type is None:             # <<<<<<<<<<<<<<
 *         return OrderedDict()
 * 
 */
  }

  /* "polemarch/api/v2/serializers.py":965
 *         return OrderedDict()
 * 
 *     fields = OrderedDict()             # <<<<<<<<<<<<<<
 * 
 *     for ref, settings in ansible_reference.raw_dict[ansible_type].items():
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_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, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_fields = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":967
 *     fields = OrderedDict()
 * 
 *     for ref, settings in ansible_reference.raw_dict[ansible_type].items():             # <<<<<<<<<<<<<<
 *         if ref in ['help', 'version', ]:
 *             continue
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ansible_reference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_raw_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_ansible_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 967, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 967, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 967, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_7(__pyx_t_5);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 967, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 967, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 967, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 967, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 967, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 967, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_ref, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_settings, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "polemarch/api/v2/serializers.py":968
 * 
 *     for ref, settings in ansible_reference.raw_dict[ansible_type].items():
 *         if ref in ['help', 'version', ]:             # <<<<<<<<<<<<<<
 *             continue
 *         ref_type = settings.get('type', None)
 */
    __Pyx_INCREF(__pyx_v_ref);
    __pyx_t_3 = __pyx_v_ref;
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_help, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
    if (!__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_version, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
    __pyx_t_2 = __pyx_t_1;
    __pyx_L9_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "polemarch/api/v2/serializers.py":969
 *     for ref, settings in ansible_reference.raw_dict[ansible_type].items():
 *         if ref in ['help', 'version', ]:
 *             continue             # <<<<<<<<<<<<<<
 *         ref_type = settings.get('type', None)
 *         kwargs = dict(help_text=settings.get('help', ''), required=False)
 */
      goto __pyx_L4_continue;

      /* "polemarch/api/v2/serializers.py":968
 * 
 *     for ref, settings in ansible_reference.raw_dict[ansible_type].items():
 *         if ref in ['help', 'version', ]:             # <<<<<<<<<<<<<<
 *             continue
 *         ref_type = settings.get('type', None)
 */
    }

    /* "polemarch/api/v2/serializers.py":970
 *         if ref in ['help', 'version', ]:
 *             continue
 *         ref_type = settings.get('type', None)             # <<<<<<<<<<<<<<
 *         kwargs = dict(help_text=settings.get('help', ''), required=False)
 *         field = None
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_settings, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_ref_type, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "polemarch/api/v2/serializers.py":971
 *             continue
 *         ref_type = settings.get('type', None)
 *         kwargs = dict(help_text=settings.get('help', ''), required=False)             # <<<<<<<<<<<<<<
 *         field = None
 *         if ref_type is None:
 */
    __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_settings, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_help_text, __pyx_t_4) < 0) __PYX_ERR(0, 971, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 971, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_kwargs, ((PyObject*)__pyx_t_8));
    __pyx_t_8 = 0;

    /* "polemarch/api/v2/serializers.py":972
 *         ref_type = settings.get('type', None)
 *         kwargs = dict(help_text=settings.get('help', ''), required=False)
 *         field = None             # <<<<<<<<<<<<<<
 *         if ref_type is None:
 *             field = serializers.BooleanField
 */
    __Pyx_INCREF(Py_None);
    __Pyx_XDECREF_SET(__pyx_v_field, Py_None);

    /* "polemarch/api/v2/serializers.py":973
 *         kwargs = dict(help_text=settings.get('help', ''), required=False)
 *         field = None
 *         if ref_type is None:             # <<<<<<<<<<<<<<
 *             field = serializers.BooleanField
 *             kwargs['default'] = False
 */
    __pyx_t_1 = (__pyx_v_ref_type == Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "polemarch/api/v2/serializers.py":974
 *         field = None
 *         if ref_type is None:
 *             field = serializers.BooleanField             # <<<<<<<<<<<<<<
 *             kwargs['default'] = False
 *         elif ref_type == 'int':
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_serializers); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 974, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_BooleanField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 974, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "polemarch/api/v2/serializers.py":975
 *         if ref_type is None:
 *             field = serializers.BooleanField
 *             kwargs['default'] = False             # <<<<<<<<<<<<<<
 *         elif ref_type == 'int':
 *             field = serializers.IntegerField
 */
      if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_default, Py_False) < 0)) __PYX_ERR(0, 975, __pyx_L1_error)

      /* "polemarch/api/v2/serializers.py":973
 *         kwargs = dict(help_text=settings.get('help', ''), required=False)
 *         field = None
 *         if ref_type is None:             # <<<<<<<<<<<<<<
 *             field = serializers.BooleanField
 *             kwargs['default'] = False
 */
      goto __pyx_L11;
    }

    /* "polemarch/api/v2/serializers.py":976
 *             field = serializers.BooleanField
 *             kwargs['default'] = False
 *         elif ref_type == 'int':             # <<<<<<<<<<<<<<
 *             field = serializers.IntegerField
 *         elif ref_type == 'string' or 'choice':
 */
    __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_ref_type, __pyx_n_u_int, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 976, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "polemarch/api/v2/serializers.py":977
 *             kwargs['default'] = False
 *         elif ref_type == 'int':
 *             field = serializers.IntegerField             # <<<<<<<<<<<<<<
 *         elif ref_type == 'string' or 'choice':
 *             field = vst_fields.VSTCharField
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_serializers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "polemarch/api/v2/serializers.py":976
 *             field = serializers.BooleanField
 *             kwargs['default'] = False
 *         elif ref_type == 'int':             # <<<<<<<<<<<<<<
 *             field = serializers.IntegerField
 *         elif ref_type == 'string' or 'choice':
 */
      goto __pyx_L11;
    }

    /* "polemarch/api/v2/serializers.py":978
 *         elif ref_type == 'int':
 *             field = serializers.IntegerField
 *         elif ref_type == 'string' or 'choice':             # <<<<<<<<<<<<<<
 *             field = vst_fields.VSTCharField
 *             kwargs['allow_blank'] = True
 */
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_ref_type, __pyx_n_u_string, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 978, __pyx_L1_error)
    if (!__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_2 = 1;
    __pyx_L12_bool_binop_done:;
    if (__pyx_t_2) {

      /* "polemarch/api/v2/serializers.py":979
 *             field = serializers.IntegerField
 *         elif ref_type == 'string' or 'choice':
 *             field = vst_fields.VSTCharField             # <<<<<<<<<<<<<<
 *             kwargs['allow_blank'] = True
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 979, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 979, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "polemarch/api/v2/serializers.py":980
 *         elif ref_type == 'string' or 'choice':
 *             field = vst_fields.VSTCharField
 *             kwargs['allow_blank'] = True             # <<<<<<<<<<<<<<
 * 
 *         if ref == 'verbose':
 */
      if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_allow_blank, Py_True) < 0)) __PYX_ERR(0, 980, __pyx_L1_error)

      /* "polemarch/api/v2/serializers.py":978
 *         elif ref_type == 'int':
 *             field = serializers.IntegerField
 *         elif ref_type == 'string' or 'choice':             # <<<<<<<<<<<<<<
 *             field = vst_fields.VSTCharField
 *             kwargs['allow_blank'] = True
 */
    }
    __pyx_L11:;

    /* "polemarch/api/v2/serializers.py":982
 *             kwargs['allow_blank'] = True
 * 
 *         if ref == 'verbose':             # <<<<<<<<<<<<<<
 *             field = serializers.IntegerField
 *             kwargs.update(dict(max_value=4, default=0))
 */
    __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_ref, __pyx_n_u_verbose, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 982, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "polemarch/api/v2/serializers.py":983
 * 
 *         if ref == 'verbose':
 *             field = serializers.IntegerField             # <<<<<<<<<<<<<<
 *             kwargs.update(dict(max_value=4, default=0))
 *         if ref in models.PeriodicTask.HIDDEN_VARS:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_serializers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "polemarch/api/v2/serializers.py":984
 *         if ref == 'verbose':
 *             field = serializers.IntegerField
 *             kwargs.update(dict(max_value=4, default=0))             # <<<<<<<<<<<<<<
 *         if ref in models.PeriodicTask.HIDDEN_VARS:
 *             field = vst_fields.SecretFileInString
 */
      __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_max_value, __pyx_int_4) < 0) __PYX_ERR(0, 984, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_default, __pyx_int_0) < 0) __PYX_ERR(0, 984, __pyx_L1_error)
      __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_kwargs, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "polemarch/api/v2/serializers.py":982
 *             kwargs['allow_blank'] = True
 * 
 *         if ref == 'verbose':             # <<<<<<<<<<<<<<
 *             field = serializers.IntegerField
 *             kwargs.update(dict(max_value=4, default=0))
 */
    }

    /* "polemarch/api/v2/serializers.py":985
 *             field = serializers.IntegerField
 *             kwargs.update(dict(max_value=4, default=0))
 *         if ref in models.PeriodicTask.HIDDEN_VARS:             # <<<<<<<<<<<<<<
 *             field = vst_fields.SecretFileInString
 *         if ref == 'inventory':
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_models); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PeriodicTask); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_HIDDEN_VARS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_ref, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "polemarch/api/v2/serializers.py":986
 *             kwargs.update(dict(max_value=4, default=0))
 *         if ref in models.PeriodicTask.HIDDEN_VARS:
 *             field = vst_fields.SecretFileInString             # <<<<<<<<<<<<<<
 *         if ref == 'inventory':
 *             kwargs['autocomplete'] = 'Inventory'
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SecretFileInString); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "polemarch/api/v2/serializers.py":985
 *             field = serializers.IntegerField
 *             kwargs.update(dict(max_value=4, default=0))
 *         if ref in models.PeriodicTask.HIDDEN_VARS:             # <<<<<<<<<<<<<<
 *             field = vst_fields.SecretFileInString
 *         if ref == 'inventory':
 */
    }

    /* "polemarch/api/v2/serializers.py":987
 *         if ref in models.PeriodicTask.HIDDEN_VARS:
 *             field = vst_fields.SecretFileInString
 *         if ref == 'inventory':             # <<<<<<<<<<<<<<
 *             kwargs['autocomplete'] = 'Inventory'
 *             field = vst_fields.AutoCompletionField
 */
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_ref, __pyx_n_u_inventory, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 987, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "polemarch/api/v2/serializers.py":988
 *             field = vst_fields.SecretFileInString
 *         if ref == 'inventory':
 *             kwargs['autocomplete'] = 'Inventory'             # <<<<<<<<<<<<<<
 *             field = vst_fields.AutoCompletionField
 * 
 */
      if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_autocomplete, __pyx_n_u_Inventory) < 0)) __PYX_ERR(0, 988, __pyx_L1_error)

      /* "polemarch/api/v2/serializers.py":989
 *         if ref == 'inventory':
 *             kwargs['autocomplete'] = 'Inventory'
 *             field = vst_fields.AutoCompletionField             # <<<<<<<<<<<<<<
 * 
 *         if field is None:  # nocv
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_AutoCompletionField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "polemarch/api/v2/serializers.py":987
 *         if ref in models.PeriodicTask.HIDDEN_VARS:
 *             field = vst_fields.SecretFileInString
 *         if ref == 'inventory':             # <<<<<<<<<<<<<<
 *             kwargs['autocomplete'] = 'Inventory'
 *             field = vst_fields.AutoCompletionField
 */
    }

    /* "polemarch/api/v2/serializers.py":991
 *             field = vst_fields.AutoCompletionField
 * 
 *         if field is None:  # nocv             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_1 = (__pyx_v_field == Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "polemarch/api/v2/serializers.py":992
 * 
 *         if field is None:  # nocv
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         if ansible_type == 'module':
 */
      goto __pyx_L4_continue;

      /* "polemarch/api/v2/serializers.py":991
 *             field = vst_fields.AutoCompletionField
 * 
 *         if field is None:  # nocv             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    }

    /* "polemarch/api/v2/serializers.py":994
 *             continue
 * 
 *         if ansible_type == 'module':             # <<<<<<<<<<<<<<
 *             if ref == 'group':
 *                 kwargs['default'] = 'all'
 */
    __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_ansible_type, __pyx_n_u_module, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 994, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "polemarch/api/v2/serializers.py":995
 * 
 *         if ansible_type == 'module':
 *             if ref == 'group':             # <<<<<<<<<<<<<<
 *                 kwargs['default'] = 'all'
 * 
 */
      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_ref, __pyx_n_u_group, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 995, __pyx_L1_error)
      if (__pyx_t_2) {

        /* "polemarch/api/v2/serializers.py":996
 *         if ansible_type == 'module':
 *             if ref == 'group':
 *                 kwargs['default'] = 'all'             # <<<<<<<<<<<<<<
 * 
 *         field_name = ref.replace('-', '_')
 */
        if (unlikely(PyDict_SetItem(__pyx_v_kwargs, __pyx_n_u_default, __pyx_n_u_all) < 0)) __PYX_ERR(0, 996, __pyx_L1_error)

        /* "polemarch/api/v2/serializers.py":995
 * 
 *         if ansible_type == 'module':
 *             if ref == 'group':             # <<<<<<<<<<<<<<
 *                 kwargs['default'] = 'all'
 * 
 */
      }

      /* "polemarch/api/v2/serializers.py":994
 *             continue
 * 
 *         if ansible_type == 'module':             # <<<<<<<<<<<<<<
 *             if ref == 'group':
 *                 kwargs['default'] = 'all'
 */
    }

    /* "polemarch/api/v2/serializers.py":998
 *                 kwargs['default'] = 'all'
 * 
 *         field_name = ref.replace('-', '_')             # <<<<<<<<<<<<<<
 *         fields[field_name] = field(**kwargs)
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ref, __pyx_n_s_replace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "polemarch/api/v2/serializers.py":999
 * 
 *         field_name = ref.replace('-', '_')
 *         fields[field_name] = field(**kwargs)             # <<<<<<<<<<<<<<
 * 
 *     return fields
 */
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_v_field, __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (unlikely(PyObject_SetItem(__pyx_v_fields, __pyx_v_field_name, __pyx_t_8) < 0)) __PYX_ERR(0, 999, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "polemarch/api/v2/serializers.py":967
 *     fields = OrderedDict()
 * 
 *     for ref, settings in ansible_reference.raw_dict[ansible_type].items():             # <<<<<<<<<<<<<<
 *         if ref in ['help', 'version', ]:
 *             continue
 */
    __pyx_L4_continue:;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":1001
 *         fields[field_name] = field(**kwargs)
 * 
 *     return fields             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_fields);
  __pyx_r = __pyx_v_fields;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":961
 * 
 * 
 * def generate_fileds(ansible_type):             # <<<<<<<<<<<<<<
 *     if ansible_type is None:
 *         return OrderedDict()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.generate_fileds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_ref);
  __Pyx_XDECREF(__pyx_v_settings);
  __Pyx_XDECREF(__pyx_v_ref_type);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":1007
 *     # pylint: disable=super-on-old-class
 *     @staticmethod
 *     def __new__(cls, name, bases, attrs):             # <<<<<<<<<<<<<<
 *         ansible_type = None
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_26AnsibleSerializerMetaclass_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_26AnsibleSerializerMetaclass_1__new__ = {"__new__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_26AnsibleSerializerMetaclass_1__new__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_26AnsibleSerializerMetaclass_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_bases = 0;
  PyObject *__pyx_v_attrs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_name,&__pyx_n_s_bases,&__pyx_n_s_attrs,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_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 1); __PYX_ERR(0, 1007, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bases)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 2); __PYX_ERR(0, 1007, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 3); __PYX_ERR(0, 1007, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 1007, __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_name = values[1];
    __pyx_v_bases = values[2];
    __pyx_v_attrs = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1007, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.AnsibleSerializerMetaclass.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_26AnsibleSerializerMetaclass___new__(__pyx_self, __pyx_v_cls, __pyx_v_name, __pyx_v_bases, __pyx_v_attrs);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_26AnsibleSerializerMetaclass___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_name, PyObject *__pyx_v_bases, PyObject *__pyx_v_attrs) {
  PyObject *__pyx_v_ansible_type = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "polemarch/api/v2/serializers.py":1008
 *     @staticmethod
 *     def __new__(cls, name, bases, attrs):
 *         ansible_type = None             # <<<<<<<<<<<<<<
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):
 *             ansible_type = 'playbook'
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_ansible_type = ((PyObject*)Py_None);

  /* "polemarch/api/v2/serializers.py":1009
 *     def __new__(cls, name, bases, attrs):
 *         ansible_type = None
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):             # <<<<<<<<<<<<<<
 *             ansible_type = 'playbook'
 *         elif isinstance(attrs.get('module', None), serializers.CharField):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrs, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_serializers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CharField); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = PyObject_IsInstance(__pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "polemarch/api/v2/serializers.py":1010
 *         ansible_type = None
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):
 *             ansible_type = 'playbook'             # <<<<<<<<<<<<<<
 *         elif isinstance(attrs.get('module', None), serializers.CharField):
 *             ansible_type = 'module'
 */
    __Pyx_INCREF(__pyx_n_u_playbook);
    __Pyx_DECREF_SET(__pyx_v_ansible_type, __pyx_n_u_playbook);

    /* "polemarch/api/v2/serializers.py":1009
 *     def __new__(cls, name, bases, attrs):
 *         ansible_type = None
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):             # <<<<<<<<<<<<<<
 *             ansible_type = 'playbook'
 *         elif isinstance(attrs.get('module', None), serializers.CharField):
 */
    goto __pyx_L3;
  }

  /* "polemarch/api/v2/serializers.py":1011
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):
 *             ansible_type = 'playbook'
 *         elif isinstance(attrs.get('module', None), serializers.CharField):             # <<<<<<<<<<<<<<
 *             ansible_type = 'module'
 *         attrs.update(generate_fileds(ansible_type))
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrs, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_serializers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CharField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = PyObject_IsInstance(__pyx_t_2, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (__pyx_t_4) {

    /* "polemarch/api/v2/serializers.py":1012
 *             ansible_type = 'playbook'
 *         elif isinstance(attrs.get('module', None), serializers.CharField):
 *             ansible_type = 'module'             # <<<<<<<<<<<<<<
 *         attrs.update(generate_fileds(ansible_type))
 *         return super(AnsibleSerializerMetaclass, cls).__new__(cls, name, bases, attrs)
 */
    __Pyx_INCREF(__pyx_n_u_module);
    __Pyx_DECREF_SET(__pyx_v_ansible_type, __pyx_n_u_module);

    /* "polemarch/api/v2/serializers.py":1011
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):
 *             ansible_type = 'playbook'
 *         elif isinstance(attrs.get('module', None), serializers.CharField):             # <<<<<<<<<<<<<<
 *             ansible_type = 'module'
 *         attrs.update(generate_fileds(ansible_type))
 */
  }
  __pyx_L3:;

  /* "polemarch/api/v2/serializers.py":1013
 *         elif isinstance(attrs.get('module', None), serializers.CharField):
 *             ansible_type = 'module'
 *         attrs.update(generate_fileds(ansible_type))             # <<<<<<<<<<<<<<
 *         return super(AnsibleSerializerMetaclass, cls).__new__(cls, name, bases, attrs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrs, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_generate_fileds); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_ansible_type) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_ansible_type);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":1014
 *             ansible_type = 'module'
 *         attrs.update(generate_fileds(ansible_type))
 *         return super(AnsibleSerializerMetaclass, cls).__new__(cls, name, bases, attrs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AnsibleSerializerMetaclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_cls);
  __Pyx_GIVEREF(__pyx_v_cls);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_cls, __pyx_v_name, __pyx_v_bases, __pyx_v_attrs};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_cls, __pyx_v_name, __pyx_v_bases, __pyx_v_attrs};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_cls);
    __Pyx_GIVEREF(__pyx_v_cls);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_cls);
    __Pyx_INCREF(__pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_name);
    __Pyx_INCREF(__pyx_v_bases);
    __Pyx_GIVEREF(__pyx_v_bases);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_v_bases);
    __Pyx_INCREF(__pyx_v_attrs);
    __Pyx_GIVEREF(__pyx_v_attrs);
    PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_8, __pyx_v_attrs);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":1007
 *     # pylint: disable=super-on-old-class
 *     @staticmethod
 *     def __new__(cls, name, bases, attrs):             # <<<<<<<<<<<<<<
 *         ansible_type = None
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):
 */

  /* function 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("polemarch.api.v2.serializers.AnsibleSerializerMetaclass.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ansible_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "polemarch/api/v2/serializers.py":1074
 * 
 *     @transaction.atomic()
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         parser = AnsibleInventoryParser()
 *         inv_json = parser.get_inventory_data(validated_data['raw_data'])
 */

/* Python wrapper */
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_25InventoryImportSerializer_1create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9polemarch_3api_2v2_11serializers_25InventoryImportSerializer_1create = {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9polemarch_3api_2v2_11serializers_25InventoryImportSerializer_1create, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9polemarch_3api_2v2_11serializers_25InventoryImportSerializer_1create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_validated_data = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_validated_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_validated_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, 1); __PYX_ERR(0, 1074, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 1074, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_validated_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1074, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("polemarch.api.v2.serializers.InventoryImportSerializer.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9polemarch_3api_2v2_11serializers_25InventoryImportSerializer_create(__pyx_self, __pyx_v_self, __pyx_v_validated_data);

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

static PyObject *__pyx_pf_9polemarch_3api_2v2_11serializers_25InventoryImportSerializer_create(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_validated_data) {
  PyObject *__pyx_v_parser = NULL;
  PyObject *__pyx_v_inv_json = NULL;
  PyObject *__pyx_v_inventory = NULL;
  PyObject *__pyx_v_created_hosts = NULL;
  PyObject *__pyx_v_created_groups = NULL;
  PyObject *__pyx_v_host = NULL;
  PyObject *__pyx_v_inv_host = NULL;
  PyObject *__pyx_v_group = NULL;
  int __pyx_v_children;
  PyObject *__pyx_v_inv_group = NULL;
  PyObject *__pyx_v_g_subs = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("create", 0);

  /* "polemarch/api/v2/serializers.py":1075
 *     @transaction.atomic()
 *     def create(self, validated_data):
 *         parser = AnsibleInventoryParser()             # <<<<<<<<<<<<<<
 *         inv_json = parser.get_inventory_data(validated_data['raw_data'])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AnsibleInventoryParser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_parser = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":1076
 *     def create(self, validated_data):
 *         parser = AnsibleInventoryParser()
 *         inv_json = parser.get_inventory_data(validated_data['raw_data'])             # <<<<<<<<<<<<<<
 * 
 *         inventory = Inventory.objects.create(name=validated_data['name'])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_get_inventory_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_validated_data, __pyx_n_u_raw_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_inv_json = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":1078
 *         inv_json = parser.get_inventory_data(validated_data['raw_data'])
 * 
 *         inventory = Inventory.objects.create(name=validated_data['name'])             # <<<<<<<<<<<<<<
 *         inventory.vars = inv_json['vars']
 *         created_hosts, created_groups = dict(), dict()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Inventory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_objects); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_validated_data, __pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_t_3) < 0) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __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_v_inventory = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1079
 * 
 *         inventory = Inventory.objects.create(name=validated_data['name'])
 *         inventory.vars = inv_json['vars']             # <<<<<<<<<<<<<<
 *         created_hosts, created_groups = dict(), dict()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_inv_json, __pyx_n_u_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_inventory, __pyx_n_s_vars, __pyx_t_3) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1080
 *         inventory = Inventory.objects.create(name=validated_data['name'])
 *         inventory.vars = inv_json['vars']
 *         created_hosts, created_groups = dict(), dict()             # <<<<<<<<<<<<<<
 * 
 *         for host in inv_json['hosts']:
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_created_hosts = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_v_created_groups = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":1082
 *         created_hosts, created_groups = dict(), dict()
 * 
 *         for host in inv_json['hosts']:             # <<<<<<<<<<<<<<
 *             inv_host = inventory.hosts.create(name=host['name'])
 *             inv_host.vars = host['vars']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_inv_json, __pyx_n_u_hosts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1082, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1082, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1082, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1082, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "polemarch/api/v2/serializers.py":1083
 * 
 *         for host in inv_json['hosts']:
 *             inv_host = inventory.hosts.create(name=host['name'])             # <<<<<<<<<<<<<<
 *             inv_host.vars = host['vars']
 *             created_hosts[inv_host.name] = inv_host
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_inventory, __pyx_n_s_hosts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_host, __pyx_n_u_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_t_4) < 0) __PYX_ERR(0, 1083, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_inv_host, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "polemarch/api/v2/serializers.py":1084
 *         for host in inv_json['hosts']:
 *             inv_host = inventory.hosts.create(name=host['name'])
 *             inv_host.vars = host['vars']             # <<<<<<<<<<<<<<
 *             created_hosts[inv_host.name] = inv_host
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_host, __pyx_n_u_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_inv_host, __pyx_n_s_vars, __pyx_t_4) < 0) __PYX_ERR(0, 1084, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "polemarch/api/v2/serializers.py":1085
 *             inv_host = inventory.hosts.create(name=host['name'])
 *             inv_host.vars = host['vars']
 *             created_hosts[inv_host.name] = inv_host             # <<<<<<<<<<<<<<
 * 
 *         for group in inv_json['groups']:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inv_host, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(PyDict_SetItem(__pyx_v_created_hosts, __pyx_t_4, __pyx_v_inv_host) < 0)) __PYX_ERR(0, 1085, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "polemarch/api/v2/serializers.py":1082
 *         created_hosts, created_groups = dict(), dict()
 * 
 *         for host in inv_json['hosts']:             # <<<<<<<<<<<<<<
 *             inv_host = inventory.hosts.create(name=host['name'])
 *             inv_host.vars = host['vars']
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1087
 *             created_hosts[inv_host.name] = inv_host
 * 
 *         for group in inv_json['groups']:             # <<<<<<<<<<<<<<
 *             children = False if len(group['groups']) == 0 else True
 *             inv_group = inventory.groups.create(name=group['name'], children=children)
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_inv_json, __pyx_n_u_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1087, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1087, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1087, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1087, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "polemarch/api/v2/serializers.py":1088
 * 
 *         for group in inv_json['groups']:
 *             children = False if len(group['groups']) == 0 else True             # <<<<<<<<<<<<<<
 *             inv_group = inventory.groups.create(name=group['name'], children=children)
 *             inv_group.vars = group['vars']
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_group, __pyx_n_u_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1088, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (((__pyx_t_8 == 0) != 0)) {
      __pyx_t_7 = 0;
    } else {
      __pyx_t_7 = 1;
    }
    __pyx_v_children = __pyx_t_7;

    /* "polemarch/api/v2/serializers.py":1089
 *         for group in inv_json['groups']:
 *             children = False if len(group['groups']) == 0 else True
 *             inv_group = inventory.groups.create(name=group['name'], children=children)             # <<<<<<<<<<<<<<
 *             inv_group.vars = group['vars']
 *             created_groups[inv_group.name] = inv_group
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_inventory, __pyx_n_s_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_create); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_group, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_t_1) < 0) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_children, __pyx_t_1) < 0) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_inv_group, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":1090
 *             children = False if len(group['groups']) == 0 else True
 *             inv_group = inventory.groups.create(name=group['name'], children=children)
 *             inv_group.vars = group['vars']             # <<<<<<<<<<<<<<
 *             created_groups[inv_group.name] = inv_group
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_group, __pyx_n_u_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_inv_group, __pyx_n_s_vars, __pyx_t_1) < 0) __PYX_ERR(0, 1090, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":1091
 *             inv_group = inventory.groups.create(name=group['name'], children=children)
 *             inv_group.vars = group['vars']
 *             created_groups[inv_group.name] = inv_group             # <<<<<<<<<<<<<<
 * 
 *         for group in inv_json['groups']:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_inv_group, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_created_groups, __pyx_t_1, __pyx_v_inv_group) < 0)) __PYX_ERR(0, 1091, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "polemarch/api/v2/serializers.py":1087
 *             created_hosts[inv_host.name] = inv_host
 * 
 *         for group in inv_json['groups']:             # <<<<<<<<<<<<<<
 *             children = False if len(group['groups']) == 0 else True
 *             inv_group = inventory.groups.create(name=group['name'], children=children)
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":1093
 *             created_groups[inv_group.name] = inv_group
 * 
 *         for group in inv_json['groups']:             # <<<<<<<<<<<<<<
 *             inv_group = created_groups[group['name']]
 *             g_subs = list()
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_inv_json, __pyx_n_u_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1093, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1093, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1093, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1093, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1093, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1093, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "polemarch/api/v2/serializers.py":1094
 * 
 *         for group in inv_json['groups']:
 *             inv_group = created_groups[group['name']]             # <<<<<<<<<<<<<<
 *             g_subs = list()
 *             if inv_group.children:
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_group, __pyx_n_u_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_created_groups, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_inv_group, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "polemarch/api/v2/serializers.py":1095
 *         for group in inv_json['groups']:
 *             inv_group = created_groups[group['name']]
 *             g_subs = list()             # <<<<<<<<<<<<<<
 *             if inv_group.children:
 *                 for name in group['groups']:
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_g_subs, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "polemarch/api/v2/serializers.py":1096
 *             inv_group = created_groups[group['name']]
 *             g_subs = list()
 *             if inv_group.children:             # <<<<<<<<<<<<<<
 *                 for name in group['groups']:
 *                     g_subs.append(created_groups[name])
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_inv_group, __pyx_n_s_children); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {

      /* "polemarch/api/v2/serializers.py":1097
 *             g_subs = list()
 *             if inv_group.children:
 *                 for name in group['groups']:             # <<<<<<<<<<<<<<
 *                     g_subs.append(created_groups[name])
 *                 inv_group.groups.add(*g_subs)
 */
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_group, __pyx_n_u_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
        __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1097, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1097, __pyx_L1_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1097, __pyx_L1_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_9(__pyx_t_4);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1097, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "polemarch/api/v2/serializers.py":1098
 *             if inv_group.children:
 *                 for name in group['groups']:
 *                     g_subs.append(created_groups[name])             # <<<<<<<<<<<<<<
 *                 inv_group.groups.add(*g_subs)
 *             else:
 */
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_created_groups, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_g_subs, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1098, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "polemarch/api/v2/serializers.py":1097
 *             g_subs = list()
 *             if inv_group.children:
 *                 for name in group['groups']:             # <<<<<<<<<<<<<<
 *                     g_subs.append(created_groups[name])
 *                 inv_group.groups.add(*g_subs)
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "polemarch/api/v2/serializers.py":1099
 *                 for name in group['groups']:
 *                     g_subs.append(created_groups[name])
 *                 inv_group.groups.add(*g_subs)             # <<<<<<<<<<<<<<
 *             else:
 *                 for name in group['hosts']:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inv_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PySequence_Tuple(__pyx_v_g_subs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "polemarch/api/v2/serializers.py":1096
 *             inv_group = created_groups[group['name']]
 *             g_subs = list()
 *             if inv_group.children:             # <<<<<<<<<<<<<<
 *                 for name in group['groups']:
 *                     g_subs.append(created_groups[name])
 */
      goto __pyx_L9;
    }

    /* "polemarch/api/v2/serializers.py":1101
 *                 inv_group.groups.add(*g_subs)
 *             else:
 *                 for name in group['hosts']:             # <<<<<<<<<<<<<<
 *                     g_subs.append(created_hosts[name])
 *                 inv_group.hosts.add(*g_subs)
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_group, __pyx_n_u_hosts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1101, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1101, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1101, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_9(__pyx_t_4);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1101, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "polemarch/api/v2/serializers.py":1102
 *             else:
 *                 for name in group['hosts']:
 *                     g_subs.append(created_hosts[name])             # <<<<<<<<<<<<<<
 *                 inv_group.hosts.add(*g_subs)
 * 
 */
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_created_hosts, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_g_subs, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1102, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "polemarch/api/v2/serializers.py":1101
 *                 inv_group.groups.add(*g_subs)
 *             else:
 *                 for name in group['hosts']:             # <<<<<<<<<<<<<<
 *                     g_subs.append(created_hosts[name])
 *                 inv_group.hosts.add(*g_subs)
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "polemarch/api/v2/serializers.py":1103
 *                 for name in group['hosts']:
 *                     g_subs.append(created_hosts[name])
 *                 inv_group.hosts.add(*g_subs)             # <<<<<<<<<<<<<<
 * 
 *         return dict(
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inv_group, __pyx_n_s_hosts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PySequence_Tuple(__pyx_v_g_subs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L9:;

    /* "polemarch/api/v2/serializers.py":1093
 *             created_groups[inv_group.name] = inv_group
 * 
 *         for group in inv_json['groups']:             # <<<<<<<<<<<<<<
 *             inv_group = created_groups[group['name']]
 *             g_subs = list()
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":1105
 *                 inv_group.hosts.add(*g_subs)
 * 
 *         return dict(             # <<<<<<<<<<<<<<
 *             inventory_id=inventory.id,
 *             name=inventory.name,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "polemarch/api/v2/serializers.py":1106
 * 
 *         return dict(
 *             inventory_id=inventory.id,             # <<<<<<<<<<<<<<
 *             name=inventory.name,
 *             raw_data=validated_data['raw_data']
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_inventory, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_inventory_id, __pyx_t_3) < 0) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1107
 *         return dict(
 *             inventory_id=inventory.id,
 *             name=inventory.name,             # <<<<<<<<<<<<<<
 *             raw_data=validated_data['raw_data']
 *         )
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_inventory, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_t_3) < 0) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1108
 *             inventory_id=inventory.id,
 *             name=inventory.name,
 *             raw_data=validated_data['raw_data']             # <<<<<<<<<<<<<<
 *         )
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_validated_data, __pyx_n_u_raw_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_raw_data, __pyx_t_3) < 0) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "polemarch/api/v2/serializers.py":1074
 * 
 *     @transaction.atomic()
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         parser = AnsibleInventoryParser()
 *         inv_json = parser.get_inventory_data(validated_data['raw_data'])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("polemarch.api.v2.serializers.InventoryImportSerializer.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parser);
  __Pyx_XDECREF(__pyx_v_inv_json);
  __Pyx_XDECREF(__pyx_v_inventory);
  __Pyx_XDECREF(__pyx_v_created_hosts);
  __Pyx_XDECREF(__pyx_v_created_groups);
  __Pyx_XDECREF(__pyx_v_host);
  __Pyx_XDECREF(__pyx_v_inv_host);
  __Pyx_XDECREF(__pyx_v_group);
  __Pyx_XDECREF(__pyx_v_inv_group);
  __Pyx_XDECREF(__pyx_v_g_subs);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *__pyx_freelist_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals[8];
static int __pyx_freecount_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals = 0;

static PyObject *__pyx_tp_new_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals)))) {
    o = (PyObject*)__pyx_freelist_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals[--__pyx_freecount_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals];
    memset(o, 0, sizeof(struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals(PyObject *o) {
  struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *p = (struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_func);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals)))) {
    __pyx_freelist_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals[__pyx_freecount_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals++] = ((struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

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

static int __pyx_tp_clear_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *p = (struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals *)o;
  tmp = ((PyObject*)p->__pyx_v_func);
  p->__pyx_v_func = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals = {
  PyVarObject_HEAD_INIT(0, 0)
  "polemarch.api.v2.serializers.__pyx_scope_struct__with_signals", /*tp_name*/
  sizeof(struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals, /*tp_traverse*/
  __pyx_tp_clear_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *__pyx_freelist_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr[--__pyx_freecount_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_field);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr)))) {
    __pyx_freelist_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr[__pyx_freecount_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_v_field) {
    e = (*v)(p->__pyx_v_field, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "polemarch.api.v2.serializers.__pyx_scope_struct_1_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_serializers(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_serializers},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "serializers",
    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_ActionResponseSerializer, __pyx_k_ActionResponseSerializer, sizeof(__pyx_k_ActionResponseSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_AnsibleArgumentsReference, __pyx_k_AnsibleArgumentsReference, sizeof(__pyx_k_AnsibleArgumentsReference), 0, 0, 1, 1},
  {&__pyx_n_s_AnsibleInventoryParser, __pyx_k_AnsibleInventoryParser, sizeof(__pyx_k_AnsibleInventoryParser), 0, 0, 1, 1},
  {&__pyx_n_s_AnsibleModuleSerializer, __pyx_k_AnsibleModuleSerializer, sizeof(__pyx_k_AnsibleModuleSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_AnsiblePlaybookSerializer, __pyx_k_AnsiblePlaybookSerializer, sizeof(__pyx_k_AnsiblePlaybookSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_AnsibleSerializer, __pyx_k_AnsibleSerializer, sizeof(__pyx_k_AnsibleSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_AnsibleSerializerMetaclass, __pyx_k_AnsibleSerializerMetaclass, sizeof(__pyx_k_AnsibleSerializerMetaclass), 0, 0, 1, 1},
  {&__pyx_n_s_AnsibleSerializerMetaclass___new, __pyx_k_AnsibleSerializerMetaclass___new, sizeof(__pyx_k_AnsibleSerializerMetaclass___new), 0, 0, 1, 1},
  {&__pyx_n_s_AutoCompletionField, __pyx_k_AutoCompletionField, sizeof(__pyx_k_AutoCompletionField), 0, 0, 1, 1},
  {&__pyx_n_u_BOOLEAN_VARS, __pyx_k_BOOLEAN_VARS, sizeof(__pyx_k_BOOLEAN_VARS), 0, 1, 0, 1},
  {&__pyx_n_s_BaseDashboardJobSerializer, __pyx_k_BaseDashboardJobSerializer, sizeof(__pyx_k_BaseDashboardJobSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_BooleanField, __pyx_k_BooleanField, sizeof(__pyx_k_BooleanField), 0, 0, 1, 1},
  {&__pyx_n_u_CRONTAB, __pyx_k_CRONTAB, sizeof(__pyx_k_CRONTAB), 0, 1, 0, 1},
  {&__pyx_n_s_ChangePasswordSerializer, __pyx_k_ChangePasswordSerializer, sizeof(__pyx_k_ChangePasswordSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_ChangePasswordSerializer_to_repr, __pyx_k_ChangePasswordSerializer_to_repr, sizeof(__pyx_k_ChangePasswordSerializer_to_repr), 0, 0, 1, 1},
  {&__pyx_n_s_ChangePasswordSerializer_update, __pyx_k_ChangePasswordSerializer_update, sizeof(__pyx_k_ChangePasswordSerializer_update), 0, 0, 1, 1},
  {&__pyx_n_s_CharField, __pyx_k_CharField, sizeof(__pyx_k_CharField), 0, 0, 1, 1},
  {&__pyx_n_s_ChartLineSettingSerializer, __pyx_k_ChartLineSettingSerializer, sizeof(__pyx_k_ChartLineSettingSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_ChartLineSettingsSerializer, __pyx_k_ChartLineSettingsSerializer, sizeof(__pyx_k_ChartLineSettingsSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_ChoiceField, __pyx_k_ChoiceField, sizeof(__pyx_k_ChoiceField), 0, 0, 1, 1},
  {&__pyx_kp_u_Confirm_new_password, __pyx_k_Confirm_new_password, sizeof(__pyx_k_Confirm_new_password), 0, 1, 0, 0},
  {&__pyx_kp_u_Contains_groups, __pyx_k_Contains_groups, sizeof(__pyx_k_Contains_groups), 0, 1, 0, 0},
  {&__pyx_n_s_CounterWidgetSettingSerializer, __pyx_k_CounterWidgetSettingSerializer, sizeof(__pyx_k_CounterWidgetSettingSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_CreateUserSerializer, __pyx_k_CreateUserSerializer, sizeof(__pyx_k_CreateUserSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_CreateUserSerializer_Meta, __pyx_k_CreateUserSerializer_Meta, sizeof(__pyx_k_CreateUserSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_CreateUserSerializer_run_validat, __pyx_k_CreateUserSerializer_run_validat, sizeof(__pyx_k_CreateUserSerializer_run_validat), 0, 0, 1, 1},
  {&__pyx_n_s_DashboardJobsSerializer, __pyx_k_DashboardJobsSerializer, sizeof(__pyx_k_DashboardJobsSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_DashboardStatisticSerializer, __pyx_k_DashboardStatisticSerializer, sizeof(__pyx_k_DashboardStatisticSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_DataSerializer, __pyx_k_DataSerializer, sizeof(__pyx_k_DataSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_DateTimeField, __pyx_k_DateTimeField, sizeof(__pyx_k_DateTimeField), 0, 0, 1, 1},
  {&__pyx_n_s_DayDashboardJobSerializer, __pyx_k_DayDashboardJobSerializer, sizeof(__pyx_k_DayDashboardJobSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_DependEnumField, __pyx_k_DependEnumField, sizeof(__pyx_k_DependEnumField), 0, 0, 1, 1},
  {&__pyx_n_s_DictField, __pyx_k_DictField, sizeof(__pyx_k_DictField), 0, 0, 1, 1},
  {&__pyx_n_s_DictField_to_internal_value, __pyx_k_DictField_to_internal_value, sizeof(__pyx_k_DictField_to_internal_value), 0, 0, 1, 1},
  {&__pyx_n_s_DictField_to_representation, __pyx_k_DictField_to_representation, sizeof(__pyx_k_DictField_to_representation), 0, 0, 1, 1},
  {&__pyx_kp_u_ENCRYPTED, __pyx_k_ENCRYPTED, sizeof(__pyx_k_ENCRYPTED), 0, 1, 0, 0},
  {&__pyx_n_s_EmailField, __pyx_k_EmailField, sizeof(__pyx_k_EmailField), 0, 0, 1, 1},
  {&__pyx_n_s_EmptySerializer, __pyx_k_EmptySerializer, sizeof(__pyx_k_EmptySerializer), 0, 0, 1, 1},
  {&__pyx_n_s_ExecuteResponseSerializer, __pyx_k_ExecuteResponseSerializer, sizeof(__pyx_k_ExecuteResponseSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_Group, __pyx_k_Group, sizeof(__pyx_k_Group), 0, 0, 1, 1},
  {&__pyx_n_s_GroupCreateMasterSerializer, __pyx_k_GroupCreateMasterSerializer, sizeof(__pyx_k_GroupCreateMasterSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_GroupSerializer, __pyx_k_GroupSerializer, sizeof(__pyx_k_GroupSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_GroupSerializer_Meta, __pyx_k_GroupSerializer_Meta, sizeof(__pyx_k_GroupSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_HIDDEN_VARS, __pyx_k_HIDDEN_VARS, sizeof(__pyx_k_HIDDEN_VARS), 0, 0, 1, 1},
  {&__pyx_n_u_HIDDEN_VARS, __pyx_k_HIDDEN_VARS, sizeof(__pyx_k_HIDDEN_VARS), 0, 1, 0, 1},
  {&__pyx_n_s_HOST, __pyx_k_HOST, sizeof(__pyx_k_HOST), 0, 0, 1, 1},
  {&__pyx_n_u_HOST, __pyx_k_HOST, sizeof(__pyx_k_HOST), 0, 1, 0, 1},
  {&__pyx_n_s_HTTP_200_OK, __pyx_k_HTTP_200_OK, sizeof(__pyx_k_HTTP_200_OK), 0, 0, 1, 1},
  {&__pyx_n_s_HTTP_201_CREATED, __pyx_k_HTTP_201_CREATED, sizeof(__pyx_k_HTTP_201_CREATED), 0, 0, 1, 1},
  {&__pyx_n_s_HiddenField, __pyx_k_HiddenField, sizeof(__pyx_k_HiddenField), 0, 0, 1, 1},
  {&__pyx_n_s_History, __pyx_k_History, sizeof(__pyx_k_History), 0, 0, 1, 1},
  {&__pyx_n_s_HistoryLines, __pyx_k_HistoryLines, sizeof(__pyx_k_HistoryLines), 0, 0, 1, 1},
  {&__pyx_n_s_HistoryLinesSerializer, __pyx_k_HistoryLinesSerializer, sizeof(__pyx_k_HistoryLinesSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_HistoryLinesSerializer_Meta, __pyx_k_HistoryLinesSerializer_Meta, sizeof(__pyx_k_HistoryLinesSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_HistorySerializer, __pyx_k_HistorySerializer, sizeof(__pyx_k_HistorySerializer), 0, 0, 1, 1},
  {&__pyx_n_s_HistorySerializer_Meta, __pyx_k_HistorySerializer_Meta, sizeof(__pyx_k_HistorySerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_Hook, __pyx_k_Hook, sizeof(__pyx_k_Hook), 0, 0, 1, 1},
  {&__pyx_n_s_HookSerializer, __pyx_k_HookSerializer, sizeof(__pyx_k_HookSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_HookSerializer_Meta, __pyx_k_HookSerializer_Meta, sizeof(__pyx_k_HookSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_Host, __pyx_k_Host, sizeof(__pyx_k_Host), 0, 0, 1, 1},
  {&__pyx_n_s_HostSerializer, __pyx_k_HostSerializer, sizeof(__pyx_k_HostSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_HostSerializer_Meta, __pyx_k_HostSerializer_Meta, sizeof(__pyx_k_HostSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_HtmlField, __pyx_k_HtmlField, sizeof(__pyx_k_HtmlField), 0, 0, 1, 1},
  {&__pyx_n_u_INTERVAL, __pyx_k_INTERVAL, sizeof(__pyx_k_INTERVAL), 0, 1, 0, 1},
  {&__pyx_n_u_Information, __pyx_k_Information, sizeof(__pyx_k_Information), 0, 1, 0, 1},
  {&__pyx_n_s_IntegerField, __pyx_k_IntegerField, sizeof(__pyx_k_IntegerField), 0, 0, 1, 1},
  {&__pyx_kp_u_Interval_type, __pyx_k_Interval_type, sizeof(__pyx_k_Interval_type), 0, 1, 0, 0},
  {&__pyx_n_s_Inventory, __pyx_k_Inventory, sizeof(__pyx_k_Inventory), 0, 0, 1, 1},
  {&__pyx_n_u_Inventory, __pyx_k_Inventory, sizeof(__pyx_k_Inventory), 0, 1, 0, 1},
  {&__pyx_n_s_InventoryDependEnumField, __pyx_k_InventoryDependEnumField, sizeof(__pyx_k_InventoryDependEnumField), 0, 0, 1, 1},
  {&__pyx_n_s_InventoryDependEnumField_to_repr, __pyx_k_InventoryDependEnumField_to_repr, sizeof(__pyx_k_InventoryDependEnumField_to_repr), 0, 0, 1, 1},
  {&__pyx_n_s_InventoryImportSerializer, __pyx_k_InventoryImportSerializer, sizeof(__pyx_k_InventoryImportSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_InventoryImportSerializer_create, __pyx_k_InventoryImportSerializer_create, sizeof(__pyx_k_InventoryImportSerializer_create), 0, 0, 1, 1},
  {&__pyx_n_s_InventoryOperations, __pyx_k_InventoryOperations, sizeof(__pyx_k_InventoryOperations), 0, 0, 1, 1},
  {&__pyx_n_s_InventorySerializer, __pyx_k_InventorySerializer, sizeof(__pyx_k_InventorySerializer), 0, 0, 1, 1},
  {&__pyx_n_s_InventorySerializer_Meta, __pyx_k_InventorySerializer_Meta, sizeof(__pyx_k_InventorySerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_InventoryVariableSerializer, __pyx_k_InventoryVariableSerializer, sizeof(__pyx_k_InventoryVariableSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_JsonObjectSerializer, __pyx_k_JsonObjectSerializer, sizeof(__pyx_k_JsonObjectSerializer), 0, 0, 1, 1},
  {&__pyx_n_u_KEY, __pyx_k_KEY, sizeof(__pyx_k_KEY), 0, 1, 0, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_s_ListField, __pyx_k_ListField, sizeof(__pyx_k_ListField), 0, 0, 1, 1},
  {&__pyx_n_u_MANUAL, __pyx_k_MANUAL, sizeof(__pyx_k_MANUAL), 0, 1, 0, 1},
  {&__pyx_n_u_MODULE, __pyx_k_MODULE, sizeof(__pyx_k_MODULE), 0, 1, 0, 1},
  {&__pyx_n_s_Meta, __pyx_k_Meta, sizeof(__pyx_k_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_ModelRelatedField, __pyx_k_ModelRelatedField, sizeof(__pyx_k_ModelRelatedField), 0, 0, 1, 1},
  {&__pyx_n_s_ModelRelatedField___init, __pyx_k_ModelRelatedField___init, sizeof(__pyx_k_ModelRelatedField___init), 0, 0, 1, 1},
  {&__pyx_n_s_ModelSerializer, __pyx_k_ModelSerializer, sizeof(__pyx_k_ModelSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_Module, __pyx_k_Module, sizeof(__pyx_k_Module), 0, 0, 1, 1},
  {&__pyx_n_u_Module, __pyx_k_Module, sizeof(__pyx_k_Module), 0, 1, 0, 1},
  {&__pyx_n_s_ModuleSerializer, __pyx_k_ModuleSerializer, sizeof(__pyx_k_ModuleSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_ModuleSerializer_Meta, __pyx_k_ModuleSerializer_Meta, sizeof(__pyx_k_ModuleSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_MonthDashboardJobSerializer, __pyx_k_MonthDashboardJobSerializer, sizeof(__pyx_k_MonthDashboardJobSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_MultiTypeField, __pyx_k_MultiTypeField, sizeof(__pyx_k_MultiTypeField), 0, 0, 1, 1},
  {&__pyx_n_s_MultiTypeField_to_internal_value, __pyx_k_MultiTypeField_to_internal_value, sizeof(__pyx_k_MultiTypeField_to_internal_value), 0, 0, 1, 1},
  {&__pyx_n_s_MultiTypeField_to_representation, __pyx_k_MultiTypeField_to_representation, sizeof(__pyx_k_MultiTypeField_to_representation), 0, 0, 1, 1},
  {&__pyx_n_u_NONE, __pyx_k_NONE, sizeof(__pyx_k_NONE), 0, 1, 0, 1},
  {&__pyx_kp_u_New_owner, __pyx_k_New_owner, sizeof(__pyx_k_New_owner), 0, 1, 0, 0},
  {&__pyx_kp_u_New_password, __pyx_k_New_password, sizeof(__pyx_k_New_password), 0, 1, 0, 0},
  {&__pyx_kp_u_New_passwords_values_are_not_equ, __pyx_k_New_passwords_values_are_not_equ, sizeof(__pyx_k_New_passwords_values_are_not_equ), 0, 1, 0, 0},
  {&__pyx_n_s_OneGroupSerializer, __pyx_k_OneGroupSerializer, sizeof(__pyx_k_OneGroupSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OneGroupSerializer_Meta, __pyx_k_OneGroupSerializer_Meta, sizeof(__pyx_k_OneGroupSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OneGroupSerializer_ValidationExc, __pyx_k_OneGroupSerializer_ValidationExc, sizeof(__pyx_k_OneGroupSerializer_ValidationExc), 0, 0, 1, 1},
  {&__pyx_n_s_OneHistorySerializer, __pyx_k_OneHistorySerializer, sizeof(__pyx_k_OneHistorySerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OneHistorySerializer_Meta, __pyx_k_OneHistorySerializer_Meta, sizeof(__pyx_k_OneHistorySerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OneHistorySerializer_get_facts, __pyx_k_OneHistorySerializer_get_facts, sizeof(__pyx_k_OneHistorySerializer_get_facts), 0, 0, 1, 1},
  {&__pyx_n_s_OneHistorySerializer_get_raw, __pyx_k_OneHistorySerializer_get_raw, sizeof(__pyx_k_OneHistorySerializer_get_raw), 0, 0, 1, 1},
  {&__pyx_n_s_OneHistorySerializer_get_raw_std, __pyx_k_OneHistorySerializer_get_raw_std, sizeof(__pyx_k_OneHistorySerializer_get_raw_std), 0, 0, 1, 1},
  {&__pyx_n_s_OneHostSerializer, __pyx_k_OneHostSerializer, sizeof(__pyx_k_OneHostSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OneHostSerializer_Meta, __pyx_k_OneHostSerializer_Meta, sizeof(__pyx_k_OneHostSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OneInventorySerializer, __pyx_k_OneInventorySerializer, sizeof(__pyx_k_OneInventorySerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OneInventorySerializer_Meta, __pyx_k_OneInventorySerializer_Meta, sizeof(__pyx_k_OneInventorySerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OneModuleSerializer, __pyx_k_OneModuleSerializer, sizeof(__pyx_k_OneModuleSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OneModuleSerializer_Meta, __pyx_k_OneModuleSerializer_Meta, sizeof(__pyx_k_OneModuleSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OnePeriodictaskSerializer, __pyx_k_OnePeriodictaskSerializer, sizeof(__pyx_k_OnePeriodictaskSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OnePeriodictaskSerializer_Meta, __pyx_k_OnePeriodictaskSerializer_Meta, sizeof(__pyx_k_OnePeriodictaskSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OnePeriodictaskSerializer_execut, __pyx_k_OnePeriodictaskSerializer_execut, sizeof(__pyx_k_OnePeriodictaskSerializer_execut), 0, 0, 1, 1},
  {&__pyx_n_s_OnePlaybookSerializer, __pyx_k_OnePlaybookSerializer, sizeof(__pyx_k_OnePlaybookSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OnePlaybookSerializer_Meta, __pyx_k_OnePlaybookSerializer_Meta, sizeof(__pyx_k_OnePlaybookSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OneProjectSerializer, __pyx_k_OneProjectSerializer, sizeof(__pyx_k_OneProjectSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OneProjectSerializer_Meta, __pyx_k_OneProjectSerializer_Meta, sizeof(__pyx_k_OneProjectSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OneProjectSerializer__execution, __pyx_k_OneProjectSerializer__execution, sizeof(__pyx_k_OneProjectSerializer__execution), 0, 0, 1, 1},
  {&__pyx_n_s_OneProjectSerializer__get_execut, __pyx_k_OneProjectSerializer__get_execut, sizeof(__pyx_k_OneProjectSerializer__get_execut), 0, 0, 1, 1},
  {&__pyx_n_s_OneProjectSerializer_execute_mod, __pyx_k_OneProjectSerializer_execute_mod, sizeof(__pyx_k_OneProjectSerializer_execute_mod), 0, 0, 1, 1},
  {&__pyx_n_s_OneProjectSerializer_execute_pla, __pyx_k_OneProjectSerializer_execute_pla, sizeof(__pyx_k_OneProjectSerializer_execute_pla), 0, 0, 1, 1},
  {&__pyx_n_s_OneProjectSerializer_sync, __pyx_k_OneProjectSerializer_sync, sizeof(__pyx_k_OneProjectSerializer_sync), 0, 0, 1, 1},
  {&__pyx_n_s_OneTeamSerializer, __pyx_k_OneTeamSerializer, sizeof(__pyx_k_OneTeamSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OneTeamSerializer_Meta, __pyx_k_OneTeamSerializer_Meta, sizeof(__pyx_k_OneTeamSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OneTemplateSerializer, __pyx_k_OneTemplateSerializer, sizeof(__pyx_k_OneTemplateSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OneTemplateSerializer_Meta, __pyx_k_OneTemplateSerializer_Meta, sizeof(__pyx_k_OneTemplateSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OneTemplateSerializer_execute, __pyx_k_OneTemplateSerializer_execute, sizeof(__pyx_k_OneTemplateSerializer_execute), 0, 0, 1, 1},
  {&__pyx_n_s_OneUserSerializer, __pyx_k_OneUserSerializer, sizeof(__pyx_k_OneUserSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_OneUserSerializer_Meta, __pyx_k_OneUserSerializer_Meta, sizeof(__pyx_k_OneUserSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_OneUserSerializer_Meta_genexpr, __pyx_k_OneUserSerializer_Meta_genexpr, sizeof(__pyx_k_OneUserSerializer_Meta_genexpr), 0, 0, 1, 1},
  {&__pyx_kp_u_One_host, __pyx_k_One_host, sizeof(__pyx_k_One_host), 0, 1, 0, 0},
  {&__pyx_kp_u_Only_for_GIT_repos_Checkout_bra, __pyx_k_Only_for_GIT_repos_Checkout_bra, sizeof(__pyx_k_Only_for_GIT_repos_Checkout_bra), 0, 1, 0, 0},
  {&__pyx_kp_u_Only_for_GIT_repos_Key_to_fetch, __pyx_k_Only_for_GIT_repos_Key_to_fetch, sizeof(__pyx_k_Only_for_GIT_repos_Key_to_fetch), 0, 1, 0, 0},
  {&__pyx_kp_u_Only_for_GIT_repos_Password_to, __pyx_k_Only_for_GIT_repos_Password_to, sizeof(__pyx_k_Only_for_GIT_repos_Password_to), 0, 1, 0, 0},
  {&__pyx_kp_u_Option_name_from_template_option, __pyx_k_Option_name_from_template_option, sizeof(__pyx_k_Option_name_from_template_option), 0, 1, 0, 0},
  {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
  {&__pyx_n_u_PASSWORD, __pyx_k_PASSWORD, sizeof(__pyx_k_PASSWORD), 0, 1, 0, 1},
  {&__pyx_n_u_PLAYBOOK, __pyx_k_PLAYBOOK, sizeof(__pyx_k_PLAYBOOK), 0, 1, 0, 1},
  {&__pyx_kp_u_Password_is_not_correct, __pyx_k_Password_is_not_correct, sizeof(__pyx_k_Password_is_not_correct), 0, 1, 0, 0},
  {&__pyx_kp_u_Passwords_do_not_match, __pyx_k_Passwords_do_not_match, sizeof(__pyx_k_Passwords_do_not_match), 0, 1, 0, 0},
  {&__pyx_n_s_PeriodicTask, __pyx_k_PeriodicTask, sizeof(__pyx_k_PeriodicTask), 0, 0, 1, 1},
  {&__pyx_n_s_PeriodicTaskVariableSerializer, __pyx_k_PeriodicTaskVariableSerializer, sizeof(__pyx_k_PeriodicTaskVariableSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_PeriodictaskSerializer, __pyx_k_PeriodictaskSerializer, sizeof(__pyx_k_PeriodictaskSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_PeriodictaskSerializer_Meta, __pyx_k_PeriodictaskSerializer_Meta, sizeof(__pyx_k_PeriodictaskSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_PeriodictaskSerializer__do_with, __pyx_k_PeriodictaskSerializer__do_with, sizeof(__pyx_k_PeriodictaskSerializer__do_with), 0, 0, 1, 1},
  {&__pyx_n_s_PermissionDenied, __pyx_k_PermissionDenied, sizeof(__pyx_k_PermissionDenied), 0, 0, 1, 1},
  {&__pyx_n_u_Playbook, __pyx_k_Playbook, sizeof(__pyx_k_Playbook), 0, 1, 0, 1},
  {&__pyx_n_s_PlaybookSerializer, __pyx_k_PlaybookSerializer, sizeof(__pyx_k_PlaybookSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_PlaybookSerializer_Meta, __pyx_k_PlaybookSerializer_Meta, sizeof(__pyx_k_PlaybookSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryKeyRelatedField, __pyx_k_PrimaryKeyRelatedField, sizeof(__pyx_k_PrimaryKeyRelatedField), 0, 0, 1, 1},
  {&__pyx_n_s_Project, __pyx_k_Project, sizeof(__pyx_k_Project), 0, 0, 1, 1},
  {&__pyx_n_s_ProjectCreateMasterSerializer, __pyx_k_ProjectCreateMasterSerializer, sizeof(__pyx_k_ProjectCreateMasterSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_ProjectCreateMasterSerializer_Me, __pyx_k_ProjectCreateMasterSerializer_Me, sizeof(__pyx_k_ProjectCreateMasterSerializer_Me), 0, 0, 1, 1},
  {&__pyx_n_s_ProjectCreateMasterSerializer_cr, __pyx_k_ProjectCreateMasterSerializer_cr, sizeof(__pyx_k_ProjectCreateMasterSerializer_cr), 0, 0, 1, 1},
  {&__pyx_n_s_ProjectHistorySerializer, __pyx_k_ProjectHistorySerializer, sizeof(__pyx_k_ProjectHistorySerializer), 0, 0, 1, 1},
  {&__pyx_n_s_ProjectHistorySerializer_Meta, __pyx_k_ProjectHistorySerializer_Meta, sizeof(__pyx_k_ProjectHistorySerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_ProjectSerializer, __pyx_k_ProjectSerializer, sizeof(__pyx_k_ProjectSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_ProjectSerializer_Meta, __pyx_k_ProjectSerializer_Meta, sizeof(__pyx_k_ProjectSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_ProjectSerializer__do_with_vars, __pyx_k_ProjectSerializer__do_with_vars, sizeof(__pyx_k_ProjectSerializer__do_with_vars), 0, 0, 1, 1},
  {&__pyx_n_s_ProjectVariableSerializer, __pyx_k_ProjectVariableSerializer, sizeof(__pyx_k_ProjectVariableSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_RANGE, __pyx_k_RANGE, sizeof(__pyx_k_RANGE), 0, 0, 1, 1},
  {&__pyx_kp_u_Range_of_hosts, __pyx_k_Range_of_hosts, sizeof(__pyx_k_Range_of_hosts), 0, 1, 0, 0},
  {&__pyx_n_s_RedirectIntegerField, __pyx_k_RedirectIntegerField, sizeof(__pyx_k_RedirectIntegerField), 0, 0, 1, 1},
  {&__pyx_kp_u_Relational_fields_should_not_pro, __pyx_k_Relational_fields_should_not_pro, sizeof(__pyx_k_Relational_fields_should_not_pro), 0, 1, 0, 0},
  {&__pyx_kp_u_Repeat_password, __pyx_k_Repeat_password, sizeof(__pyx_k_Repeat_password), 0, 1, 0, 0},
  {&__pyx_kp_u_Repo_auth_data, __pyx_k_Repo_auth_data, sizeof(__pyx_k_Repo_auth_data), 0, 1, 0, 0},
  {&__pyx_kp_u_Repo_auth_type, __pyx_k_Repo_auth_type, sizeof(__pyx_k_Repo_auth_type), 0, 1, 0, 0},
  {&__pyx_kp_u_Repo_type, __pyx_k_Repo_type, sizeof(__pyx_k_Repo_type), 0, 1, 0, 0},
  {&__pyx_kp_u_Repo_url, __pyx_k_Repo_url, sizeof(__pyx_k_Repo_url), 0, 1, 0, 0},
  {&__pyx_n_s_Response, __pyx_k_Response, sizeof(__pyx_k_Response), 0, 0, 1, 1},
  {&__pyx_n_s_STATUSES, __pyx_k_STATUSES, sizeof(__pyx_k_STATUSES), 0, 0, 1, 1},
  {&__pyx_n_s_SecretFileInString, __pyx_k_SecretFileInString, sizeof(__pyx_k_SecretFileInString), 0, 0, 1, 1},
  {&__pyx_n_s_Select2Field, __pyx_k_Select2Field, sizeof(__pyx_k_Select2Field), 0, 0, 1, 1},
  {&__pyx_n_s_Serializer, __pyx_k_Serializer, sizeof(__pyx_k_Serializer), 0, 0, 1, 1},
  {&__pyx_n_s_SerializerMetaclass, __pyx_k_SerializerMetaclass, sizeof(__pyx_k_SerializerMetaclass), 0, 0, 1, 1},
  {&__pyx_n_s_SerializerMethodField, __pyx_k_SerializerMethodField, sizeof(__pyx_k_SerializerMethodField), 0, 0, 1, 1},
  {&__pyx_n_s_SetOwnerSerializer, __pyx_k_SetOwnerSerializer, sizeof(__pyx_k_SetOwnerSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_SetOwnerSerializer_current_user, __pyx_k_SetOwnerSerializer_current_user, sizeof(__pyx_k_SetOwnerSerializer_current_user), 0, 0, 1, 1},
  {&__pyx_n_s_SetOwnerSerializer_get_user, __pyx_k_SetOwnerSerializer_get_user, sizeof(__pyx_k_SetOwnerSerializer_get_user), 0, 0, 1, 1},
  {&__pyx_n_s_SetOwnerSerializer_to_internal_v, __pyx_k_SetOwnerSerializer_to_internal_v, sizeof(__pyx_k_SetOwnerSerializer_to_internal_v), 0, 0, 1, 1},
  {&__pyx_n_s_SetOwnerSerializer_to_representa, __pyx_k_SetOwnerSerializer_to_representa, sizeof(__pyx_k_SetOwnerSerializer_to_representa), 0, 0, 1, 1},
  {&__pyx_n_s_SetOwnerSerializer_update, __pyx_k_SetOwnerSerializer_update, sizeof(__pyx_k_SetOwnerSerializer_update), 0, 0, 1, 1},
  {&__pyx_n_s_SignalSerializer, __pyx_k_SignalSerializer, sizeof(__pyx_k_SignalSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_SignalSerializer__writable_fiel, __pyx_k_SignalSerializer__writable_fiel, sizeof(__pyx_k_SignalSerializer__writable_fiel), 0, 0, 1, 1},
  {&__pyx_n_s_SignalSerializer_create, __pyx_k_SignalSerializer_create, sizeof(__pyx_k_SignalSerializer_create), 0, 0, 1, 1},
  {&__pyx_n_s_SignalSerializer_update, __pyx_k_SignalSerializer_update, sizeof(__pyx_k_SignalSerializer_update), 0, 0, 1, 1},
  {&__pyx_n_u_Staff, __pyx_k_Staff, sizeof(__pyx_k_Staff), 0, 1, 0, 1},
  {&__pyx_kp_u_Start_template_id, __pyx_k_Start_template_id, sizeof(__pyx_k_Start_template_id), 0, 1, 0, 0},
  {&__pyx_kp_u_Started_at_inventory, __pyx_k_Started_at_inventory, sizeof(__pyx_k_Started_at_inventory), 0, 1, 0, 0},
  {&__pyx_kp_u_Started_in_the_inventory, __pyx_k_Started_in_the_inventory, sizeof(__pyx_k_Started_in_the_inventory), 0, 1, 0, 0},
  {&__pyx_kp_u_Sync_project_by_every_execution, __pyx_k_Sync_project_by_every_execution, sizeof(__pyx_k_Sync_project_by_every_execution), 0, 1, 0, 0},
  {&__pyx_kp_u_Sync_with, __pyx_k_Sync_with, sizeof(__pyx_k_Sync_with), 0, 1, 0, 0},
  {&__pyx_n_u_TEMPLATE, __pyx_k_TEMPLATE, sizeof(__pyx_k_TEMPLATE), 0, 1, 0, 1},
  {&__pyx_n_s_Task, __pyx_k_Task, sizeof(__pyx_k_Task), 0, 0, 1, 1},
  {&__pyx_n_u_Task, __pyx_k_Task, sizeof(__pyx_k_Task), 0, 1, 0, 1},
  {&__pyx_kp_u_Task_type, __pyx_k_Task_type, sizeof(__pyx_k_Task_type), 0, 1, 0, 0},
  {&__pyx_n_s_TeamSerializer, __pyx_k_TeamSerializer, sizeof(__pyx_k_TeamSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_TeamSerializer_Meta, __pyx_k_TeamSerializer_Meta, sizeof(__pyx_k_TeamSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_Template, __pyx_k_Template, sizeof(__pyx_k_Template), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateExecSerializer, __pyx_k_TemplateExecSerializer, sizeof(__pyx_k_TemplateExecSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateSerializer, __pyx_k_TemplateSerializer, sizeof(__pyx_k_TemplateSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateSerializer_Meta, __pyx_k_TemplateSerializer_Meta, sizeof(__pyx_k_TemplateSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateSerializer_get_vars, __pyx_k_TemplateSerializer_get_vars, sizeof(__pyx_k_TemplateSerializer_get_vars), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateSerializer_repr_options, __pyx_k_TemplateSerializer_repr_options, sizeof(__pyx_k_TemplateSerializer_repr_options), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateSerializer_set_opts_vars, __pyx_k_TemplateSerializer_set_opts_vars, sizeof(__pyx_k_TemplateSerializer_set_opts_vars), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateSerializer_to_representa, __pyx_k_TemplateSerializer_to_representa, sizeof(__pyx_k_TemplateSerializer_to_representa), 0, 0, 1, 1},
  {&__pyx_n_s_TextareaField, __pyx_k_TextareaField, sizeof(__pyx_k_TextareaField), 0, 0, 1, 1},
  {&__pyx_n_u_True, __pyx_k_True, sizeof(__pyx_k_True), 0, 1, 0, 1},
  {&__pyx_n_u_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 1, 0, 1},
  {&__pyx_kp_u_Types_of_repo_Default_MANUAL, __pyx_k_Types_of_repo_Default_MANUAL, sizeof(__pyx_k_Types_of_repo_Default_MANUAL), 0, 1, 0, 0},
  {&__pyx_kp_u_Unknown_kind, __pyx_k_Unknown_kind, sizeof(__pyx_k_Unknown_kind), 0, 1, 0, 0},
  {&__pyx_kp_u_Unknown_type, __pyx_k_Unknown_type, sizeof(__pyx_k_Unknown_type), 0, 1, 0, 0},
  {&__pyx_n_s_UptimeField, __pyx_k_UptimeField, sizeof(__pyx_k_UptimeField), 0, 0, 1, 1},
  {&__pyx_n_s_User, __pyx_k_User, sizeof(__pyx_k_User), 0, 0, 1, 1},
  {&__pyx_n_u_User, __pyx_k_User, sizeof(__pyx_k_User), 0, 1, 0, 1},
  {&__pyx_n_s_UserGroup, __pyx_k_UserGroup, sizeof(__pyx_k_UserGroup), 0, 0, 1, 1},
  {&__pyx_n_s_UserSerializer, __pyx_k_UserSerializer, sizeof(__pyx_k_UserSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_UserSerializer_create, __pyx_k_UserSerializer_create, sizeof(__pyx_k_UserSerializer_create), 0, 0, 1, 1},
  {&__pyx_n_s_UserSerializer_update, __pyx_k_UserSerializer_update, sizeof(__pyx_k_UserSerializer_update), 0, 0, 1, 1},
  {&__pyx_n_s_UserSettingsSerializer, __pyx_k_UserSettingsSerializer, sizeof(__pyx_k_UserSettingsSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_VSTCharField, __pyx_k_VSTCharField, sizeof(__pyx_k_VSTCharField), 0, 0, 1, 1},
  {&__pyx_n_s_VSTSerializer, __pyx_k_VSTSerializer, sizeof(__pyx_k_VSTSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_ValidationError, __pyx_k_ValidationError, sizeof(__pyx_k_ValidationError), 0, 0, 1, 1},
  {&__pyx_n_s_ValidationException, __pyx_k_ValidationException, sizeof(__pyx_k_ValidationException), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_Variable, __pyx_k_Variable, sizeof(__pyx_k_Variable), 0, 0, 1, 1},
  {&__pyx_n_s_VariableSerializer, __pyx_k_VariableSerializer, sizeof(__pyx_k_VariableSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_VariableSerializer_Meta, __pyx_k_VariableSerializer_Meta, sizeof(__pyx_k_VariableSerializer_Meta), 0, 0, 1, 1},
  {&__pyx_n_s_VariableSerializer_to_representa, __pyx_k_VariableSerializer_to_representa, sizeof(__pyx_k_VariableSerializer_to_representa), 0, 0, 1, 1},
  {&__pyx_n_s_WidgetSettingSerializer, __pyx_k_WidgetSettingSerializer, sizeof(__pyx_k_WidgetSettingSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_WidgetSettingsSerializer, __pyx_k_WidgetSettingsSerializer, sizeof(__pyx_k_WidgetSettingsSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_WithPermissionsSerializer, __pyx_k_WithPermissionsSerializer, sizeof(__pyx_k_WithPermissionsSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_WithPermissionsSerializer_curre, __pyx_k_WithPermissionsSerializer_curre, sizeof(__pyx_k_WithPermissionsSerializer_curre), 0, 0, 1, 1},
  {&__pyx_n_s_WithPermissionsSerializer_is_va, __pyx_k_WithPermissionsSerializer_is_va, sizeof(__pyx_k_WithPermissionsSerializer_is_va), 0, 0, 1, 1},
  {&__pyx_n_s_WithVariablesSerializer, __pyx_k_WithVariablesSerializer, sizeof(__pyx_k_WithVariablesSerializer), 0, 0, 1, 1},
  {&__pyx_n_s_WithVariablesSerializer__do_wit, __pyx_k_WithVariablesSerializer__do_wit, sizeof(__pyx_k_WithVariablesSerializer__do_wit), 0, 0, 1, 1},
  {&__pyx_n_s_WithVariablesSerializer_create, __pyx_k_WithVariablesSerializer_create, sizeof(__pyx_k_WithVariablesSerializer_create), 0, 0, 1, 1},
  {&__pyx_n_s_WithVariablesSerializer_get_var, __pyx_k_WithVariablesSerializer_get_var, sizeof(__pyx_k_WithVariablesSerializer_get_var), 0, 0, 1, 1},
  {&__pyx_n_s_WithVariablesSerializer_to_repr, __pyx_k_WithVariablesSerializer_to_repr, sizeof(__pyx_k_WithVariablesSerializer_to_repr), 0, 0, 1, 1},
  {&__pyx_n_s_WithVariablesSerializer_update, __pyx_k_WithVariablesSerializer_update, sizeof(__pyx_k_WithVariablesSerializer_update), 0, 0, 1, 1},
  {&__pyx_n_s_YearDashboardJobSerializer, __pyx_k_YearDashboardJobSerializer, sizeof(__pyx_k_YearDashboardJobSerializer), 0, 0, 1, 1},
  {&__pyx_kp_u_You_do_not_have_permission_to_pe, __pyx_k_You_do_not_have_permission_to_pe, sizeof(__pyx_k_You_do_not_have_permission_to_pe), 0, 1, 0, 0},
  {&__pyx_kp_u_You_don_t_have_permission_to_inv, __pyx_k_You_don_t_have_permission_to_inv, sizeof(__pyx_k_You_don_t_have_permission_to_inv), 0, 1, 0, 0},
  {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0},
  {&__pyx_kp_u__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 1, 0, 0},
  {&__pyx_n_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 1},
  {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0},
  {&__pyx_n_s_acl_handler, __pyx_k_acl_handler, sizeof(__pyx_k_acl_handler), 0, 0, 1, 1},
  {&__pyx_n_s_active, __pyx_k_active, sizeof(__pyx_k_active), 0, 0, 1, 1},
  {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
  {&__pyx_n_s_add_metaclass, __pyx_k_add_metaclass, sizeof(__pyx_k_add_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_n_u_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 1, 0, 1},
  {&__pyx_n_s_all_tasks, __pyx_k_all_tasks, sizeof(__pyx_k_all_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_allow_blank, __pyx_k_allow_blank, sizeof(__pyx_k_allow_blank), 0, 0, 1, 1},
  {&__pyx_n_u_allow_blank, __pyx_k_allow_blank, sizeof(__pyx_k_allow_blank), 0, 1, 0, 1},
  {&__pyx_n_s_allow_null, __pyx_k_allow_null, sizeof(__pyx_k_allow_null), 0, 0, 1, 1},
  {&__pyx_n_u_ansible_become, __pyx_k_ansible_become, sizeof(__pyx_k_ansible_become), 0, 1, 0, 1},
  {&__pyx_n_u_ansible_become_pass, __pyx_k_ansible_become_pass, sizeof(__pyx_k_ansible_become_pass), 0, 1, 0, 1},
  {&__pyx_n_u_ansible_port, __pyx_k_ansible_port, sizeof(__pyx_k_ansible_port), 0, 1, 0, 1},
  {&__pyx_n_s_ansible_reference, __pyx_k_ansible_reference, sizeof(__pyx_k_ansible_reference), 0, 0, 1, 1},
  {&__pyx_n_u_ansible_ssh_pass, __pyx_k_ansible_ssh_pass, sizeof(__pyx_k_ansible_ssh_pass), 0, 1, 0, 1},
  {&__pyx_n_u_ansible_ssh_private_key_file, __pyx_k_ansible_ssh_private_key_file, sizeof(__pyx_k_ansible_ssh_private_key_file), 0, 1, 0, 1},
  {&__pyx_n_s_ansible_type, __pyx_k_ansible_type, sizeof(__pyx_k_ansible_type), 0, 0, 1, 1},
  {&__pyx_n_s_api_post_save, __pyx_k_api_post_save, sizeof(__pyx_k_api_post_save), 0, 0, 1, 1},
  {&__pyx_n_s_api_pre_save, __pyx_k_api_pre_save, sizeof(__pyx_k_api_pre_save), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_atomic, __pyx_k_atomic, sizeof(__pyx_k_atomic), 0, 0, 1, 1},
  {&__pyx_n_s_attr, __pyx_k_attr, sizeof(__pyx_k_attr), 0, 0, 1, 1},
  {&__pyx_n_s_attrs, __pyx_k_attrs, sizeof(__pyx_k_attrs), 0, 0, 1, 1},
  {&__pyx_n_s_auth_data, __pyx_k_auth_data, sizeof(__pyx_k_auth_data), 0, 0, 1, 1},
  {&__pyx_n_u_auth_data, __pyx_k_auth_data, sizeof(__pyx_k_auth_data), 0, 1, 0, 1},
  {&__pyx_n_s_auth_types, __pyx_k_auth_types, sizeof(__pyx_k_auth_types), 0, 0, 1, 1},
  {&__pyx_n_s_autocomplete, __pyx_k_autocomplete, sizeof(__pyx_k_autocomplete), 0, 0, 1, 1},
  {&__pyx_n_u_autocomplete, __pyx_k_autocomplete, sizeof(__pyx_k_autocomplete), 0, 1, 0, 1},
  {&__pyx_n_s_autocomplete_property, __pyx_k_autocomplete_property, sizeof(__pyx_k_autocomplete_property), 0, 0, 1, 1},
  {&__pyx_n_s_autocomplete_represent, __pyx_k_autocomplete_represent, sizeof(__pyx_k_autocomplete_represent), 0, 0, 1, 1},
  {&__pyx_n_s_autoupdateInterval, __pyx_k_autoupdateInterval, sizeof(__pyx_k_autoupdateInterval), 0, 0, 1, 1},
  {&__pyx_n_s_bases, __pyx_k_bases, sizeof(__pyx_k_bases), 0, 0, 1, 1},
  {&__pyx_n_u_boolean, __pyx_k_boolean, sizeof(__pyx_k_boolean), 0, 1, 0, 1},
  {&__pyx_n_u_branch, __pyx_k_branch, sizeof(__pyx_k_branch), 0, 1, 0, 1},
  {&__pyx_n_s_build_absolute_uri, __pyx_k_build_absolute_uri, sizeof(__pyx_k_build_absolute_uri), 0, 0, 1, 1},
  {&__pyx_n_s_cached_property, __pyx_k_cached_property, sizeof(__pyx_k_cached_property), 0, 0, 1, 1},
  {&__pyx_n_s_chartLineSettings, __pyx_k_chartLineSettings, sizeof(__pyx_k_chartLineSettings), 0, 0, 1, 1},
  {&__pyx_n_s_check_password, __pyx_k_check_password, sizeof(__pyx_k_check_password), 0, 0, 1, 1},
  {&__pyx_n_s_children, __pyx_k_children, sizeof(__pyx_k_children), 0, 0, 1, 1},
  {&__pyx_n_u_children, __pyx_k_children, sizeof(__pyx_k_children), 0, 1, 0, 1},
  {&__pyx_n_s_choices, __pyx_k_choices, sizeof(__pyx_k_choices), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {&__pyx_n_s_class_types, __pyx_k_class_types, sizeof(__pyx_k_class_types), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {&__pyx_n_s_collapse, __pyx_k_collapse, sizeof(__pyx_k_collapse), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_u_color, __pyx_k_color, sizeof(__pyx_k_color), 0, 1, 0, 1},
  {&__pyx_n_s_content_object, __pyx_k_content_object, sizeof(__pyx_k_content_object), 0, 0, 1, 1},
  {&__pyx_n_s_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 0, 1, 1},
  {&__pyx_n_s_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 0, 1, 1},
  {&__pyx_n_u_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 1, 0, 1},
  {&__pyx_n_s_created_groups, __pyx_k_created_groups, sizeof(__pyx_k_created_groups), 0, 0, 1, 1},
  {&__pyx_n_s_created_hosts, __pyx_k_created_hosts, sizeof(__pyx_k_created_hosts), 0, 0, 1, 1},
  {&__pyx_n_u_crontab, __pyx_k_crontab, sizeof(__pyx_k_crontab), 0, 1, 0, 1},
  {&__pyx_n_s_current_user, __pyx_k_current_user, sizeof(__pyx_k_current_user), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_u_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 1, 0, 1},
  {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_u_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 1, 0, 1},
  {&__pyx_n_s_delay, __pyx_k_delay, sizeof(__pyx_k_delay), 0, 0, 1, 1},
  {&__pyx_n_s_detail, __pyx_k_detail, sizeof(__pyx_k_detail), 0, 0, 1, 1},
  {&__pyx_n_u_disabled, __pyx_k_disabled, sizeof(__pyx_k_disabled), 0, 1, 0, 1},
  {&__pyx_n_s_django_contrib_auth_models, __pyx_k_django_contrib_auth_models, sizeof(__pyx_k_django_contrib_auth_models), 0, 0, 1, 1},
  {&__pyx_n_s_django_db, __pyx_k_django_db, sizeof(__pyx_k_django_db), 0, 0, 1, 1},
  {&__pyx_n_s_django_utils_functional, __pyx_k_django_utils_functional, sizeof(__pyx_k_django_utils_functional), 0, 0, 1, 1},
  {&__pyx_n_s_do_with_vars, __pyx_k_do_with_vars, sizeof(__pyx_k_do_with_vars), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_email, __pyx_k_email, sizeof(__pyx_k_email), 0, 0, 1, 1},
  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
  {&__pyx_n_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 1},
  {&__pyx_n_u_enabled, __pyx_k_enabled, sizeof(__pyx_k_enabled), 0, 1, 0, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  {&__pyx_n_s_exceptions, __pyx_k_exceptions, sizeof(__pyx_k_exceptions), 0, 0, 1, 1},
  {&__pyx_n_s_execute, __pyx_k_execute, sizeof(__pyx_k_execute), 0, 0, 1, 1},
  {&__pyx_n_u_execute_args, __pyx_k_execute_args, sizeof(__pyx_k_execute_args), 0, 1, 0, 1},
  {&__pyx_n_s_execute_module, __pyx_k_execute_module, sizeof(__pyx_k_execute_module), 0, 0, 1, 1},
  {&__pyx_n_s_execute_playbook, __pyx_k_execute_playbook, sizeof(__pyx_k_execute_playbook), 0, 0, 1, 1},
  {&__pyx_n_s_execute_view_data, __pyx_k_execute_view_data, sizeof(__pyx_k_execute_view_data), 0, 0, 1, 1},
  {&__pyx_n_u_execute_view_data, __pyx_k_execute_view_data, sizeof(__pyx_k_execute_view_data), 0, 1, 0, 1},
  {&__pyx_n_s_execution, __pyx_k_execution, sizeof(__pyx_k_execution), 0, 0, 1, 1},
  {&__pyx_n_s_execution_time, __pyx_k_execution_time, sizeof(__pyx_k_execution_time), 0, 0, 1, 1},
  {&__pyx_n_u_execution_time, __pyx_k_execution_time, sizeof(__pyx_k_execution_time), 0, 1, 0, 1},
  {&__pyx_n_s_executor, __pyx_k_executor, sizeof(__pyx_k_executor), 0, 0, 1, 1},
  {&__pyx_n_u_executor, __pyx_k_executor, sizeof(__pyx_k_executor), 0, 1, 0, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_extra_kwargs, __pyx_k_extra_kwargs, sizeof(__pyx_k_extra_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_facts, __pyx_k_facts, sizeof(__pyx_k_facts), 0, 0, 1, 1},
  {&__pyx_n_s_fail, __pyx_k_fail, sizeof(__pyx_k_fail), 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_u_field_name, __pyx_k_field_name, sizeof(__pyx_k_field_name), 0, 1, 0, 1},
  {&__pyx_n_s_field_object, __pyx_k_field_object, sizeof(__pyx_k_field_object), 0, 0, 1, 1},
  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
  {&__pyx_n_s_func_wrapper, __pyx_k_func_wrapper, sizeof(__pyx_k_func_wrapper), 0, 0, 1, 1},
  {&__pyx_n_s_g_subs, __pyx_k_g_subs, sizeof(__pyx_k_g_subs), 0, 0, 1, 1},
  {&__pyx_n_s_generate_fileds, __pyx_k_generate_fileds, sizeof(__pyx_k_generate_fileds), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_execution_inventory, __pyx_k_get_execution_inventory, sizeof(__pyx_k_get_execution_inventory), 0, 0, 1, 1},
  {&__pyx_n_s_get_facts, __pyx_k_get_facts, sizeof(__pyx_k_get_facts), 0, 0, 1, 1},
  {&__pyx_n_s_get_inventory_data, __pyx_k_get_inventory_data, sizeof(__pyx_k_get_inventory_data), 0, 0, 1, 1},
  {&__pyx_n_s_get_raw, __pyx_k_get_raw, sizeof(__pyx_k_get_raw), 0, 0, 1, 1},
  {&__pyx_n_s_get_raw_stdout, __pyx_k_get_raw_stdout, sizeof(__pyx_k_get_raw_stdout), 0, 0, 1, 1},
  {&__pyx_n_s_get_user, __pyx_k_get_user, sizeof(__pyx_k_get_user), 0, 0, 1, 1},
  {&__pyx_n_s_get_vars, __pyx_k_get_vars, sizeof(__pyx_k_get_vars), 0, 0, 1, 1},
  {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
  {&__pyx_n_u_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 1, 0, 1},
  {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
  {&__pyx_n_u_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 1, 0, 1},
  {&__pyx_n_s_handler, __pyx_k_handler, sizeof(__pyx_k_handler), 0, 0, 1, 1},
  {&__pyx_n_s_handlers, __pyx_k_handlers, sizeof(__pyx_k_handlers), 0, 0, 1, 1},
  {&__pyx_n_u_help, __pyx_k_help, sizeof(__pyx_k_help), 0, 1, 0, 1},
  {&__pyx_n_s_help_text, __pyx_k_help_text, sizeof(__pyx_k_help_text), 0, 0, 1, 1},
  {&__pyx_n_u_hidden, __pyx_k_hidden, sizeof(__pyx_k_hidden), 0, 1, 0, 1},
  {&__pyx_n_s_hidden_vars, __pyx_k_hidden_vars, sizeof(__pyx_k_hidden_vars), 0, 0, 1, 1},
  {&__pyx_n_s_history_id, __pyx_k_history_id, sizeof(__pyx_k_history_id), 0, 0, 1, 1},
  {&__pyx_n_s_host, __pyx_k_host, sizeof(__pyx_k_host), 0, 0, 1, 1},
  {&__pyx_n_s_hosts, __pyx_k_hosts, sizeof(__pyx_k_hosts), 0, 0, 1, 1},
  {&__pyx_n_u_hosts, __pyx_k_hosts, sizeof(__pyx_k_hosts), 0, 1, 0, 1},
  {&__pyx_n_s_hv, __pyx_k_hv, sizeof(__pyx_k_hv), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_u_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 1, 0, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_init_type, __pyx_k_init_type, sizeof(__pyx_k_init_type), 0, 0, 1, 1},
  {&__pyx_n_s_initiator, __pyx_k_initiator, sizeof(__pyx_k_initiator), 0, 0, 1, 1},
  {&__pyx_n_u_initiator, __pyx_k_initiator, sizeof(__pyx_k_initiator), 0, 1, 0, 1},
  {&__pyx_n_s_initiator_type, __pyx_k_initiator_type, sizeof(__pyx_k_initiator_type), 0, 0, 1, 1},
  {&__pyx_n_u_initiator_type, __pyx_k_initiator_type, sizeof(__pyx_k_initiator_type), 0, 1, 0, 1},
  {&__pyx_n_s_instance, __pyx_k_instance, sizeof(__pyx_k_instance), 0, 0, 1, 1},
  {&__pyx_n_u_instance, __pyx_k_instance, sizeof(__pyx_k_instance), 0, 1, 0, 1},
  {&__pyx_n_u_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 1, 0, 1},
  {&__pyx_n_u_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 0, 1, 0, 1},
  {&__pyx_n_s_interrupted, __pyx_k_interrupted, sizeof(__pyx_k_interrupted), 0, 0, 1, 1},
  {&__pyx_n_s_inv_group, __pyx_k_inv_group, sizeof(__pyx_k_inv_group), 0, 0, 1, 1},
  {&__pyx_n_s_inv_host, __pyx_k_inv_host, sizeof(__pyx_k_inv_host), 0, 0, 1, 1},
  {&__pyx_n_s_inv_json, __pyx_k_inv_json, sizeof(__pyx_k_inv_json), 0, 0, 1, 1},
  {&__pyx_n_s_inventories, __pyx_k_inventories, sizeof(__pyx_k_inventories), 0, 0, 1, 1},
  {&__pyx_n_s_inventory, __pyx_k_inventory, sizeof(__pyx_k_inventory), 0, 0, 1, 1},
  {&__pyx_n_u_inventory, __pyx_k_inventory, sizeof(__pyx_k_inventory), 0, 1, 0, 1},
  {&__pyx_n_s_inventory_id, __pyx_k_inventory_id, sizeof(__pyx_k_inventory_id), 0, 0, 1, 1},
  {&__pyx_n_s_is_staff, __pyx_k_is_staff, sizeof(__pyx_k_is_staff), 0, 0, 1, 1},
  {&__pyx_n_s_is_valid, __pyx_k_is_valid, sizeof(__pyx_k_is_valid), 0, 0, 1, 1},
  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_items_list, __pyx_k_items_list, sizeof(__pyx_k_items_list), 0, 0, 1, 1},
  {&__pyx_n_s_jobs, __pyx_k_jobs, sizeof(__pyx_k_jobs), 0, 0, 1, 1},
  {&__pyx_n_s_json, __pyx_k_json, sizeof(__pyx_k_json), 0, 0, 1, 1},
  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_u_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 1, 0, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 0, 1, 1},
  {&__pyx_n_u_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 1, 0, 1},
  {&__pyx_n_s_kinds, __pyx_k_kinds, sizeof(__pyx_k_kinds), 0, 0, 1, 1},
  {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1},
  {&__pyx_n_u_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 1, 0, 1},
  {&__pyx_n_u_line_gnumber, __pyx_k_line_gnumber, sizeof(__pyx_k_line_gnumber), 0, 1, 0, 1},
  {&__pyx_n_u_line_number, __pyx_k_line_number, sizeof(__pyx_k_line_number), 0, 1, 0, 1},
  {&__pyx_n_s_list, __pyx_k_list, sizeof(__pyx_k_list), 0, 0, 1, 1},
  {&__pyx_n_s_list_to_choices, __pyx_k_list_to_choices, sizeof(__pyx_k_list_to_choices), 0, 0, 1, 1},
  {&__pyx_n_s_list_to_choices_locals_handler, __pyx_k_list_to_choices_locals_handler, sizeof(__pyx_k_list_to_choices_locals_handler), 0, 0, 1, 1},
  {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1},
  {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_main_2, __pyx_k_main_2, sizeof(__pyx_k_main_2), 0, 0, 1, 1},
  {&__pyx_n_s_main_models, __pyx_k_main_models, sizeof(__pyx_k_main_models), 0, 0, 1, 1},
  {&__pyx_n_s_main_utils, __pyx_k_main_utils, sizeof(__pyx_k_main_utils), 0, 0, 1, 1},
  {&__pyx_n_s_many, __pyx_k_many, sizeof(__pyx_k_many), 0, 0, 1, 1},
  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
  {&__pyx_n_s_mask_key, __pyx_k_mask_key, sizeof(__pyx_k_mask_key), 0, 0, 1, 1},
  {&__pyx_n_s_max_value, __pyx_k_max_value, sizeof(__pyx_k_max_value), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1},
  {&__pyx_n_s_method_name, __pyx_k_method_name, sizeof(__pyx_k_method_name), 0, 0, 1, 1},
  {&__pyx_n_s_min_length, __pyx_k_min_length, sizeof(__pyx_k_min_length), 0, 0, 1, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
  {&__pyx_n_u_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 1, 0, 1},
  {&__pyx_n_s_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 0, 1, 1},
  {&__pyx_n_u_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 1, 0, 1},
  {&__pyx_n_s_models, __pyx_k_models, sizeof(__pyx_k_models), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_u_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 1, 0, 1},
  {&__pyx_n_s_module_2, __pyx_k_module_2, sizeof(__pyx_k_module_2), 0, 0, 1, 1},
  {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 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_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_u_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 1, 0, 1},
  {&__pyx_n_s_notes, __pyx_k_notes, sizeof(__pyx_k_notes), 0, 0, 1, 1},
  {&__pyx_n_u_notes, __pyx_k_notes, sizeof(__pyx_k_notes), 0, 1, 0, 1},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_obj_id, __pyx_k_obj_id, sizeof(__pyx_k_obj_id), 0, 0, 1, 1},
  {&__pyx_n_s_objects, __pyx_k_objects, sizeof(__pyx_k_objects), 0, 0, 1, 1},
  {&__pyx_n_s_offline, __pyx_k_offline, sizeof(__pyx_k_offline), 0, 0, 1, 1},
  {&__pyx_n_s_ok, __pyx_k_ok, sizeof(__pyx_k_ok), 0, 0, 1, 1},
  {&__pyx_n_s_old_password, __pyx_k_old_password, sizeof(__pyx_k_old_password), 0, 0, 1, 1},
  {&__pyx_n_u_old_password, __pyx_k_old_password, sizeof(__pyx_k_old_password), 0, 1, 0, 1},
  {&__pyx_n_s_option, __pyx_k_option, sizeof(__pyx_k_option), 0, 0, 1, 1},
  {&__pyx_n_u_option, __pyx_k_option, sizeof(__pyx_k_option), 0, 1, 0, 1},
  {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1},
  {&__pyx_n_u_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 1, 0, 1},
  {&__pyx_n_s_options_list, __pyx_k_options_list, sizeof(__pyx_k_options_list), 0, 0, 1, 1},
  {&__pyx_n_u_options_list, __pyx_k_options_list, sizeof(__pyx_k_options_list), 0, 1, 0, 1},
  {&__pyx_n_s_owned_by, __pyx_k_owned_by, sizeof(__pyx_k_owned_by), 0, 0, 1, 1},
  {&__pyx_n_s_owner, __pyx_k_owner, sizeof(__pyx_k_owner), 0, 0, 1, 1},
  {&__pyx_n_u_owner, __pyx_k_owner, sizeof(__pyx_k_owner), 0, 1, 0, 1},
  {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
  {&__pyx_n_s_password, __pyx_k_password, sizeof(__pyx_k_password), 0, 0, 1, 1},
  {&__pyx_n_u_password, __pyx_k_password, sizeof(__pyx_k_password), 0, 1, 0, 1},
  {&__pyx_n_s_password2, __pyx_k_password2, sizeof(__pyx_k_password2), 0, 0, 1, 1},
  {&__pyx_n_u_password2, __pyx_k_password2, sizeof(__pyx_k_password2), 0, 1, 0, 1},
  {&__pyx_n_u_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 1, 0, 1},
  {&__pyx_n_s_perms_msg, __pyx_k_perms_msg, sizeof(__pyx_k_perms_msg), 0, 0, 1, 1},
  {&__pyx_n_s_pk, __pyx_k_pk, sizeof(__pyx_k_pk), 0, 0, 1, 1},
  {&__pyx_n_s_playbook, __pyx_k_playbook, sizeof(__pyx_k_playbook), 0, 0, 1, 1},
  {&__pyx_n_u_playbook, __pyx_k_playbook, sizeof(__pyx_k_playbook), 0, 1, 0, 1},
  {&__pyx_n_s_pmwChartWidget, __pyx_k_pmwChartWidget, sizeof(__pyx_k_pmwChartWidget), 0, 0, 1, 1},
  {&__pyx_n_s_pmwGroupsCounter, __pyx_k_pmwGroupsCounter, sizeof(__pyx_k_pmwGroupsCounter), 0, 0, 1, 1},
  {&__pyx_n_s_pmwHostsCounter, __pyx_k_pmwHostsCounter, sizeof(__pyx_k_pmwHostsCounter), 0, 0, 1, 1},
  {&__pyx_n_s_pmwInventoriesCounter, __pyx_k_pmwInventoriesCounter, sizeof(__pyx_k_pmwInventoriesCounter), 0, 0, 1, 1},
  {&__pyx_n_s_pmwProjectsCounter, __pyx_k_pmwProjectsCounter, sizeof(__pyx_k_pmwProjectsCounter), 0, 0, 1, 1},
  {&__pyx_n_s_pmwTemplatesCounter, __pyx_k_pmwTemplatesCounter, sizeof(__pyx_k_pmwTemplatesCounter), 0, 0, 1, 1},
  {&__pyx_n_s_pmwUsersCounter, __pyx_k_pmwUsersCounter, sizeof(__pyx_k_pmwUsersCounter), 0, 0, 1, 1},
  {&__pyx_n_s_polemarch_api_v2_serializers, __pyx_k_polemarch_api_v2_serializers, sizeof(__pyx_k_polemarch_api_v2_serializers), 0, 0, 1, 1},
  {&__pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_k_polemarch_api_v2_serializers_py, sizeof(__pyx_k_polemarch_api_v2_serializers_py), 0, 0, 1, 0},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_project, __pyx_k_project, sizeof(__pyx_k_project), 0, 0, 1, 1},
  {&__pyx_n_u_project, __pyx_k_project, sizeof(__pyx_k_project), 0, 1, 0, 1},
  {&__pyx_n_s_project_keys, __pyx_k_project_keys, sizeof(__pyx_k_project_keys), 0, 0, 1, 1},
  {&__pyx_n_s_projects, __pyx_k_projects, sizeof(__pyx_k_projects), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_query_params, __pyx_k_query_params, sizeof(__pyx_k_query_params), 0, 0, 1, 1},
  {&__pyx_n_s_queryset, __pyx_k_queryset, sizeof(__pyx_k_queryset), 0, 0, 1, 1},
  {&__pyx_n_u_queryset, __pyx_k_queryset, sizeof(__pyx_k_queryset), 0, 1, 0, 1},
  {&__pyx_n_s_raise_exception, __pyx_k_raise_exception, sizeof(__pyx_k_raise_exception), 0, 0, 1, 1},
  {&__pyx_kp_u_raw, __pyx_k_raw, sizeof(__pyx_k_raw), 0, 1, 0, 0},
  {&__pyx_n_u_raw_args, __pyx_k_raw_args, sizeof(__pyx_k_raw_args), 0, 1, 0, 1},
  {&__pyx_n_s_raw_data, __pyx_k_raw_data, sizeof(__pyx_k_raw_data), 0, 0, 1, 1},
  {&__pyx_n_u_raw_data, __pyx_k_raw_data, sizeof(__pyx_k_raw_data), 0, 1, 0, 1},
  {&__pyx_n_s_raw_dict, __pyx_k_raw_dict, sizeof(__pyx_k_raw_dict), 0, 0, 1, 1},
  {&__pyx_n_u_raw_inventory, __pyx_k_raw_inventory, sizeof(__pyx_k_raw_inventory), 0, 1, 0, 1},
  {&__pyx_n_s_raw_stdout, __pyx_k_raw_stdout, sizeof(__pyx_k_raw_stdout), 0, 0, 1, 1},
  {&__pyx_n_u_raw_stdout, __pyx_k_raw_stdout, sizeof(__pyx_k_raw_stdout), 0, 1, 0, 1},
  {&__pyx_n_s_rdata, __pyx_k_rdata, sizeof(__pyx_k_rdata), 0, 0, 1, 1},
  {&__pyx_n_s_read_only, __pyx_k_read_only, sizeof(__pyx_k_read_only), 0, 0, 1, 1},
  {&__pyx_n_u_read_only, __pyx_k_read_only, sizeof(__pyx_k_read_only), 0, 1, 0, 1},
  {&__pyx_n_s_readme_content, __pyx_k_readme_content, sizeof(__pyx_k_readme_content), 0, 0, 1, 1},
  {&__pyx_n_u_readme_content, __pyx_k_readme_content, sizeof(__pyx_k_readme_content), 0, 1, 0, 1},
  {&__pyx_n_u_recipients, __pyx_k_recipients, sizeof(__pyx_k_recipients), 0, 1, 0, 1},
  {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1},
  {&__pyx_n_s_ref_type, __pyx_k_ref_type, sizeof(__pyx_k_ref_type), 0, 0, 1, 1},
  {&__pyx_n_s_rep, __pyx_k_rep, sizeof(__pyx_k_rep), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_kp_u_repo, __pyx_k_repo, sizeof(__pyx_k_repo), 0, 1, 0, 0},
  {&__pyx_n_s_repo_auth, __pyx_k_repo_auth, sizeof(__pyx_k_repo_auth), 0, 0, 1, 1},
  {&__pyx_n_u_repo_auth, __pyx_k_repo_auth, sizeof(__pyx_k_repo_auth), 0, 1, 0, 1},
  {&__pyx_n_s_repo_auth_data, __pyx_k_repo_auth_data, sizeof(__pyx_k_repo_auth_data), 0, 0, 1, 1},
  {&__pyx_n_s_repo_auth_type, __pyx_k_repo_auth_type, sizeof(__pyx_k_repo_auth_type), 0, 0, 1, 1},
  {&__pyx_n_u_repo_branch, __pyx_k_repo_branch, sizeof(__pyx_k_repo_branch), 0, 1, 0, 1},
  {&__pyx_n_s_repo_class, __pyx_k_repo_class, sizeof(__pyx_k_repo_class), 0, 0, 1, 1},
  {&__pyx_n_s_repo_handlers, __pyx_k_repo_handlers, sizeof(__pyx_k_repo_handlers), 0, 0, 1, 1},
  {&__pyx_n_u_repo_key, __pyx_k_repo_key, sizeof(__pyx_k_repo_key), 0, 1, 0, 1},
  {&__pyx_n_u_repo_password, __pyx_k_repo_password, sizeof(__pyx_k_repo_password), 0, 1, 0, 1},
  {&__pyx_n_u_repo_sync_on_run, __pyx_k_repo_sync_on_run, sizeof(__pyx_k_repo_sync_on_run), 0, 1, 0, 1},
  {&__pyx_n_s_repo_type, __pyx_k_repo_type, sizeof(__pyx_k_repo_type), 0, 0, 1, 1},
  {&__pyx_n_u_repo_type, __pyx_k_repo_type, sizeof(__pyx_k_repo_type), 0, 1, 0, 1},
  {&__pyx_n_s_repository, __pyx_k_repository, sizeof(__pyx_k_repository), 0, 0, 1, 1},
  {&__pyx_n_u_repository, __pyx_k_repository, sizeof(__pyx_k_repository), 0, 1, 0, 1},
  {&__pyx_n_s_repr_options, __pyx_k_repr_options, sizeof(__pyx_k_repr_options), 0, 0, 1, 1},
  {&__pyx_n_s_representation, __pyx_k_representation, sizeof(__pyx_k_representation), 0, 0, 1, 1},
  {&__pyx_n_s_request, __pyx_k_request, sizeof(__pyx_k_request), 0, 0, 1, 1},
  {&__pyx_n_u_request, __pyx_k_request, sizeof(__pyx_k_request), 0, 1, 0, 1},
  {&__pyx_n_s_required, __pyx_k_required, sizeof(__pyx_k_required), 0, 0, 1, 1},
  {&__pyx_n_u_required, __pyx_k_required, sizeof(__pyx_k_required), 0, 1, 0, 1},
  {&__pyx_n_s_rest_framework, __pyx_k_rest_framework, sizeof(__pyx_k_rest_framework), 0, 0, 1, 1},
  {&__pyx_n_s_rest_framework_exceptions, __pyx_k_rest_framework_exceptions, sizeof(__pyx_k_rest_framework_exceptions), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_u_revision, __pyx_k_revision, sizeof(__pyx_k_revision), 0, 1, 0, 1},
  {&__pyx_n_s_run_validation, __pyx_k_run_validation, sizeof(__pyx_k_run_validation), 0, 0, 1, 1},
  {&__pyx_n_s_save, __pyx_k_save, sizeof(__pyx_k_save), 0, 0, 1, 1},
  {&__pyx_n_u_save_result, __pyx_k_save_result, sizeof(__pyx_k_save_result), 0, 1, 0, 1},
  {&__pyx_n_s_schedule, __pyx_k_schedule, sizeof(__pyx_k_schedule), 0, 0, 1, 1},
  {&__pyx_n_u_schedule, __pyx_k_schedule, sizeof(__pyx_k_schedule), 0, 1, 0, 1},
  {&__pyx_n_u_secretfile, __pyx_k_secretfile, sizeof(__pyx_k_secretfile), 0, 1, 0, 1},
  {&__pyx_n_s_select, __pyx_k_select, sizeof(__pyx_k_select), 0, 0, 1, 1},
  {&__pyx_n_u_select2, __pyx_k_select2, sizeof(__pyx_k_select2), 0, 1, 0, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_sender, __pyx_k_sender, sizeof(__pyx_k_sender), 0, 0, 1, 1},
  {&__pyx_n_s_serializer, __pyx_k_serializer, sizeof(__pyx_k_serializer), 0, 0, 1, 1},
  {&__pyx_n_s_serializers, __pyx_k_serializers, sizeof(__pyx_k_serializers), 0, 0, 1, 1},
  {&__pyx_n_s_set_opts_vars, __pyx_k_set_opts_vars, sizeof(__pyx_k_set_opts_vars), 0, 0, 1, 1},
  {&__pyx_n_s_set_owner, __pyx_k_set_owner, sizeof(__pyx_k_set_owner), 0, 0, 1, 1},
  {&__pyx_n_s_set_password, __pyx_k_set_password, sizeof(__pyx_k_set_password), 0, 0, 1, 1},
  {&__pyx_n_s_settings, __pyx_k_settings, sizeof(__pyx_k_settings), 0, 0, 1, 1},
  {&__pyx_n_s_signals, __pyx_k_signals, sizeof(__pyx_k_signals), 0, 0, 1, 1},
  {&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
  {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1},
  {&__pyx_n_u_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 1, 0, 1},
  {&__pyx_n_u_source_attrs, __pyx_k_source_attrs, sizeof(__pyx_k_source_attrs), 0, 1, 0, 1},
  {&__pyx_kp_u_specified_in_the_project_configu, __pyx_k_specified_in_the_project_configu, sizeof(__pyx_k_specified_in_the_project_configu), 0, 1, 0, 0},
  {&__pyx_n_s_start_repo_task, __pyx_k_start_repo_task, sizeof(__pyx_k_start_repo_task), 0, 0, 1, 1},
  {&__pyx_n_u_start_time, __pyx_k_start_time, sizeof(__pyx_k_start_time), 0, 1, 0, 1},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
  {&__pyx_n_u_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 1, 0, 1},
  {&__pyx_n_s_status_code, __pyx_k_status_code, sizeof(__pyx_k_status_code), 0, 0, 1, 1},
  {&__pyx_n_s_statuses, __pyx_k_statuses, sizeof(__pyx_k_statuses), 0, 0, 1, 1},
  {&__pyx_n_u_stop_time, __pyx_k_stop_time, sizeof(__pyx_k_stop_time), 0, 1, 0, 1},
  {&__pyx_n_u_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 1, 0, 1},
  {&__pyx_n_s_string_types, __pyx_k_string_types, sizeof(__pyx_k_string_types), 0, 0, 1, 1},
  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_sync, __pyx_k_sync, sizeof(__pyx_k_sync), 0, 0, 1, 1},
  {&__pyx_n_u_sync, __pyx_k_sync, sizeof(__pyx_k_sync), 0, 1, 0, 1},
  {&__pyx_n_s_teams, __pyx_k_teams, sizeof(__pyx_k_teams), 0, 0, 1, 1},
  {&__pyx_n_s_template, __pyx_k_template, sizeof(__pyx_k_template), 0, 0, 1, 1},
  {&__pyx_n_u_template, __pyx_k_template, sizeof(__pyx_k_template), 0, 1, 0, 1},
  {&__pyx_n_s_template_opt, __pyx_k_template_opt, sizeof(__pyx_k_template_opt), 0, 0, 1, 1},
  {&__pyx_n_u_template_opt, __pyx_k_template_opt, sizeof(__pyx_k_template_opt), 0, 1, 0, 1},
  {&__pyx_n_u_template_option, __pyx_k_template_option, sizeof(__pyx_k_template_option), 0, 1, 0, 1},
  {&__pyx_n_s_templates, __pyx_k_templates, sizeof(__pyx_k_templates), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_text_type, __pyx_k_text_type, sizeof(__pyx_k_text_type), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_to_internal_value, __pyx_k_to_internal_value, sizeof(__pyx_k_to_internal_value), 0, 0, 1, 1},
  {&__pyx_n_s_to_representation, __pyx_k_to_representation, sizeof(__pyx_k_to_representation), 0, 0, 1, 1},
  {&__pyx_n_s_transaction, __pyx_k_transaction, sizeof(__pyx_k_transaction), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_u_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 1, 0, 1},
  {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_u_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 1, 0, 1},
  {&__pyx_n_s_user, __pyx_k_user, sizeof(__pyx_k_user), 0, 0, 1, 1},
  {&__pyx_n_s_user_id, __pyx_k_user_id, sizeof(__pyx_k_user_id), 0, 0, 1, 1},
  {&__pyx_n_u_user_id, __pyx_k_user_id, sizeof(__pyx_k_user_id), 0, 1, 0, 1},
  {&__pyx_n_u_username, __pyx_k_username, sizeof(__pyx_k_username), 0, 1, 0, 1},
  {&__pyx_n_s_users, __pyx_k_users, sizeof(__pyx_k_users), 0, 0, 1, 1},
  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
  {&__pyx_n_s_validated_data, __pyx_k_validated_data, sizeof(__pyx_k_validated_data), 0, 0, 1, 1},
  {&__pyx_n_u_validated_data, __pyx_k_validated_data, sizeof(__pyx_k_validated_data), 0, 1, 0, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_u_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 1, 0, 1},
  {&__pyx_n_s_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 0, 1, 1},
  {&__pyx_n_s_variables, __pyx_k_variables, sizeof(__pyx_k_variables), 0, 0, 1, 1},
  {&__pyx_n_s_variables_keys, __pyx_k_variables_keys, sizeof(__pyx_k_variables_keys), 0, 0, 1, 1},
  {&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1},
  {&__pyx_n_u_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 1, 0, 1},
  {&__pyx_n_u_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 1, 0, 1},
  {&__pyx_n_u_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 1, 0, 1},
  {&__pyx_n_s_viewable_by, __pyx_k_viewable_by, sizeof(__pyx_k_viewable_by), 0, 0, 1, 1},
  {&__pyx_n_s_vst_fields, __pyx_k_vst_fields, sizeof(__pyx_k_vst_fields), 0, 0, 1, 1},
  {&__pyx_n_s_vst_serializers, __pyx_k_vst_serializers, sizeof(__pyx_k_vst_serializers), 0, 0, 1, 1},
  {&__pyx_n_s_vstutils_api, __pyx_k_vstutils_api, sizeof(__pyx_k_vstutils_api), 0, 0, 1, 1},
  {&__pyx_n_s_vstutils_api_base, __pyx_k_vstutils_api_base, sizeof(__pyx_k_vstutils_api_base), 0, 0, 1, 1},
  {&__pyx_n_s_vstutils_api_serializers, __pyx_k_vstutils_api_serializers, sizeof(__pyx_k_vstutils_api_serializers), 0, 0, 1, 1},
  {&__pyx_n_s_when, __pyx_k_when, sizeof(__pyx_k_when), 0, 0, 1, 1},
  {&__pyx_n_u_when, __pyx_k_when, sizeof(__pyx_k_when), 0, 1, 0, 1},
  {&__pyx_n_s_when_types_names, __pyx_k_when_types_names, sizeof(__pyx_k_when_types_names), 0, 0, 1, 1},
  {&__pyx_n_s_widgetSettings, __pyx_k_widgetSettings, sizeof(__pyx_k_widgetSettings), 0, 0, 1, 1},
  {&__pyx_n_s_with_signals, __pyx_k_with_signals, sizeof(__pyx_k_with_signals), 0, 0, 1, 1},
  {&__pyx_n_s_with_signals_locals_func_wrapper, __pyx_k_with_signals_locals_func_wrapper, sizeof(__pyx_k_with_signals_locals_func_wrapper), 0, 0, 1, 1},
  {&__pyx_n_s_writable_fields, __pyx_k_writable_fields, sizeof(__pyx_k_writable_fields), 0, 0, 1, 1},
  {&__pyx_n_s_writable_fields_2, __pyx_k_writable_fields_2, sizeof(__pyx_k_writable_fields_2), 0, 0, 1, 1},
  {&__pyx_n_s_write_only, __pyx_k_write_only, sizeof(__pyx_k_write_only), 0, 0, 1, 1},
  {&__pyx_n_u_write_only, __pyx_k_write_only, sizeof(__pyx_k_write_only), 0, 1, 0, 1},
  {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1},
  {&__pyx_n_u_yes, __pyx_k_yes, sizeof(__pyx_k_yes), 0, 1, 0, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 1006, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 36, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 675, __pyx_L1_error)
  __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 802, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 910, __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);

  /* "polemarch/api/v2/serializers.py":83
 *     def func_wrapper(*args, **kwargs):
 *         user = args[0].context['request'].user
 *         with transaction.atomic():             # <<<<<<<<<<<<<<
 *             instance = func(*args, **kwargs)
 *             api_pre_save.send(
 */
  __pyx_tuple_ = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "polemarch/api/v2/serializers.py":88
 *                 sender=instance.__class__, instance=instance, user=user
 *             )
 *         with transaction.atomic():             # <<<<<<<<<<<<<<
 *             api_post_save.send(
 *                 sender=instance.__class__, instance=instance, user=user
 */
  __pyx_tuple_ = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "polemarch/api/v2/serializers.py":81
 *     Decorator for send api_pre_save and api_post_save signals from serializers.
 *     '''
 *     def func_wrapper(*args, **kwargs):             # <<<<<<<<<<<<<<
 *         user = args[0].context['request'].user
 *         with transaction.atomic():
 */
  __pyx_tuple__2 = PyTuple_Pack(4, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_user, __pyx_n_s_instance); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);
  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_func_wrapper, 81, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 81, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":228
 *     def run_validation(self, data=serializers.empty):
 *         validated_data = super(CreateUserSerializer, self).run_validation(data)
 *         if validated_data['password'] != validated_data.pop('password2', None):             # <<<<<<<<<<<<<<
 *             raise exceptions.ValidationError('Passwords do not match.')
 *         return validated_data
 */
  __pyx_tuple__5 = PyTuple_Pack(2, __pyx_n_u_password2, Py_None); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "polemarch/api/v2/serializers.py":363
 * 
 *     def get_raw(self, request):
 *         return self.instance.get_raw(request.query_params.get("color", "no") == "yes")             # <<<<<<<<<<<<<<
 * 
 *     def get_raw_stdout(self, obj):
 */
  __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_u_color, __pyx_n_u_no); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "polemarch/api/v2/serializers.py":465
 * 
 *     def create(self, validated_data):
 *         return self._do_with_vars("create", validated_data=validated_data)             # <<<<<<<<<<<<<<
 * 
 *     def update(self, instance, validated_data):
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_u_create); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "polemarch/api/v2/serializers.py":471
 * 
 *     def get_vars(self, representation):
 *         return representation.get('vars', None)             # <<<<<<<<<<<<<<
 * 
 *     def to_representation(self, instance, hidden_vars=None):
 */
  __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_u_vars, Py_None); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "polemarch/api/v2/serializers.py":615
 *     def _do_with_vars(self, *args, **kwargs):
 *         kw = kwargs['validated_data']
 *         if kw.get('kind', None) == 'TEMPLATE':             # <<<<<<<<<<<<<<
 *             kw['inventory'] = ''
 *             kw['mode'] = ''
 */
  __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_u_kind, Py_None); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "polemarch/api/v2/serializers.py":679
 * 
 *     def set_opts_vars(self, rep, hidden_vars):
 *         if not rep.get('vars', None):             # <<<<<<<<<<<<<<
 *             return rep
 *         var = rep['vars']
 */
  __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_u_vars, Py_None); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "polemarch/api/v2/serializers.py":725
 *         serializer = OneProjectSerializer(self.instance.project)
 *         return self.instance.execute(
 *             serializer, request.user, request.data.get('option', None)             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_u_option, Py_None); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "polemarch/api/v2/serializers.py":799
 * 
 * def list_to_choices(items_list):
 *     def handler(item):             # <<<<<<<<<<<<<<
 *         return (item, item)
 * 
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_item); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);
  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_handler, 799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 799, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":917
 *         template = kwargs.pop("template", None)
 *         inventory = self._get_execution_inventory(
 *             template, data.pop("inventory", None), user             # <<<<<<<<<<<<<<
 *         )
 *         msg = "Started in the inventory {}.".format(
 */
  __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_u_inventory, Py_None); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "polemarch/api/v2/serializers.py":935
 *                 serializer = AnsiblePlaybookSerializer()
 *             else:  # nocv
 *                 raise Exception('Unknown kind')             # <<<<<<<<<<<<<<
 *             data = {
 *                 k: v for k, v in serializer.to_internal_value(data).items()
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_Unknown_kind); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "polemarch/api/v2/serializers.py":970
 *         if ref in ['help', 'version', ]:
 *             continue
 *         ref_type = settings.get('type', None)             # <<<<<<<<<<<<<<
 *         kwargs = dict(help_text=settings.get('help', ''), required=False)
 *         field = None
 */
  __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_u_type, Py_None); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "polemarch/api/v2/serializers.py":971
 *             continue
 *         ref_type = settings.get('type', None)
 *         kwargs = dict(help_text=settings.get('help', ''), required=False)             # <<<<<<<<<<<<<<
 *         field = None
 *         if ref_type is None:
 */
  __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_u_help, __pyx_kp_u__10); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "polemarch/api/v2/serializers.py":998
 *                 kwargs['default'] = 'all'
 * 
 *         field_name = ref.replace('-', '_')             # <<<<<<<<<<<<<<
 *         fields[field_name] = field(**kwargs)
 * 
 */
  __pyx_tuple__20 = PyTuple_Pack(2, __pyx_kp_u__18, __pyx_n_u__19); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "polemarch/api/v2/serializers.py":1009
 *     def __new__(cls, name, bases, attrs):
 *         ansible_type = None
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):             # <<<<<<<<<<<<<<
 *             ansible_type = 'playbook'
 *         elif isinstance(attrs.get('module', None), serializers.CharField):
 */
  __pyx_tuple__21 = PyTuple_Pack(2, __pyx_n_u_playbook, Py_None); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "polemarch/api/v2/serializers.py":1011
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):
 *             ansible_type = 'playbook'
 *         elif isinstance(attrs.get('module', None), serializers.CharField):             # <<<<<<<<<<<<<<
 *             ansible_type = 'module'
 *         attrs.update(generate_fileds(ansible_type))
 */
  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_u_module, Py_None); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "polemarch/api/v2/serializers.py":27
 * # Serializers field for usability
 * class ModelRelatedField(serializers.PrimaryKeyRelatedField):
 *     def __init__(self, **kwargs):  # nocv             # <<<<<<<<<<<<<<
 *         model = kwargs.pop("model", None)
 *         assert not ((model is not None or self.queryset is not None) and
 */
  __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_kwargs, __pyx_n_s_model); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_init, 27, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 27, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":41
 * class DictField(serializers.CharField):
 * 
 *     def to_internal_value(self, data):  # nocv             # <<<<<<<<<<<<<<
 *         return (
 *             data
 */
  __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_to_internal_value, 41, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 41, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":51
 *         )
 * 
 *     def to_representation(self, value):  # nocv             # <<<<<<<<<<<<<<
 *         return (
 *             json.loads(value)
 */
  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);
  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_polemarch_api_v2_serializers_py, __pyx_n_s_to_representation, 51, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 51, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":60
 * 
 * class MultiTypeField(serializers.CharField):
 *     def to_internal_value(self, data):             # <<<<<<<<<<<<<<
 *         return data
 * 
 */
  __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_polemarch_api_v2_serializers_py, __pyx_n_s_to_internal_value, 60, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 60, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":63
 *         return data
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return (
 *             value if not isinstance(value, six.class_types)
 */
  __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);
  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_polemarch_api_v2_serializers_py, __pyx_n_s_to_representation, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 63, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":71
 * 
 * class InventoryDependEnumField(vst_fields.DependEnumField):
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         if isinstance(value, models.Inventory):
 *             value = value.id  # nocv
 */
  __pyx_tuple__33 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);
  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_to_representation, 71, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 71, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":77
 * 
 * 
 * def with_signals(func):             # <<<<<<<<<<<<<<
 *     '''
 *     Decorator for send api_pre_save and api_post_save signals from serializers.
 */
  __pyx_tuple__35 = PyTuple_Pack(3, __pyx_n_s_func, __pyx_n_s_func_wrapper, __pyx_n_s_func_wrapper); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);
  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 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_polemarch_api_v2_serializers_py, __pyx_n_s_with_signals, 77, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 77, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":112
 *                                       autocomplete_represent='username')
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         if not self.instance.acl_handler.owned_by(self.current_user()):  # noce
 *             raise PermissionDenied(self.perms_msg)
 */
  __pyx_tuple__37 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_instance, __pyx_n_s_validated_data, __pyx_n_s_user); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 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_polemarch_api_v2_serializers_py, __pyx_n_s_update, 112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 112, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":119
 *         return user
 * 
 *     def get_user(self, validated_data):             # <<<<<<<<<<<<<<
 *         return User.objects.get(**validated_data)
 * 
 */
  __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_validated_data); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_get_user, 119, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 119, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":122
 *         return User.objects.get(**validated_data)
 * 
 *     def current_user(self):             # <<<<<<<<<<<<<<
 *         return self.context['request'].user
 * 
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_current_user, 122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 122, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":125
 *         return self.context['request'].user
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return dict(user_id=value.id)
 * 
 */
  __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_to_representation, 125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 125, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":128
 *         return dict(user_id=value.id)
 * 
 *     def to_internal_value(self, data):             # <<<<<<<<<<<<<<
 *         return dict(pk=data['user_id'])
 * 
 */
  __pyx_tuple__45 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);
  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_polemarch_api_v2_serializers_py, __pyx_n_s_to_internal_value, 128, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 128, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":137
 *     password2 = serializers.CharField(required=True, label='Confirm new password')
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         if not instance.check_password(validated_data['old_password']):
 *             raise exceptions.PermissionDenied('Password is not correct.')
 */
  __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_instance, __pyx_n_s_validated_data); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_polemarch_api_v2_serializers_py, __pyx_n_s_update, 137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 137, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":146
 *         return instance
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return dict(
 *             old_password='***',
 */
  __pyx_tuple__49 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_polemarch_api_v2_serializers_py, __pyx_n_s_to_representation, 146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 146, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":156
 * class _SignalSerializer(serializers.ModelSerializer):
 *     @cached_property
 *     def _writable_fields(self):             # <<<<<<<<<<<<<<
 *         writable_fields = super(_SignalSerializer, self)._writable_fields
 *         fields = []
 */
  __pyx_tuple__51 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_writable_fields_2, __pyx_n_s_fields, __pyx_n_s_attrs, __pyx_n_s_field, __pyx_n_s_field_object, __pyx_n_s_attr); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 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_polemarch_api_v2_serializers_py, __pyx_n_s_writable_fields, 156, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 156, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":174
 * 
 *     @with_signals
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         return super(_SignalSerializer, self).create(validated_data)
 * 
 */
  __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_validated_data); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_create, 174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 174, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":178
 * 
 *     @with_signals
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return super(_SignalSerializer, self).update(instance, validated_data)
 * 
 */
  __pyx_tuple__55 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_instance, __pyx_n_s_validated_data); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_polemarch_api_v2_serializers_py, __pyx_n_s_update, 178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 178, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":185
 *     perms_msg = "You do not have permission to perform this action."
 * 
 *     def is_valid(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         result = super(_WithPermissionsSerializer, self).is_valid(*args, **kwargs)
 *         if not hasattr(self, 'instance'):  # nocv
 */
  __pyx_tuple__57 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_is_valid, 185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 185, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":193
 *         return result
 * 
 *     def current_user(self):             # <<<<<<<<<<<<<<
 *         return self.context['request'].user  # nocv
 * 
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_polemarch_api_v2_serializers_py, __pyx_n_s_current_user, 193, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 193, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":201
 * 
 *     @with_signals
 *     def create(self, data):             # <<<<<<<<<<<<<<
 *         return super(UserSerializer, self).create(data)
 * 
 */
  __pyx_tuple__61 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_create, 201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 201, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":205
 * 
 *     @with_signals
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return super(UserSerializer, self).update(instance, validated_data)
 * 
 */
  __pyx_tuple__63 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_instance, __pyx_n_s_validated_data); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);
  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_polemarch_api_v2_serializers_py, __pyx_n_s_update, 205, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 205, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":226
 *         fields = list(OneUserSerializer.Meta.fields) + ['password', 'password2']
 * 
 *     def run_validation(self, data=serializers.empty):             # <<<<<<<<<<<<<<
 *         validated_data = super(CreateUserSerializer, self).run_validation(data)
 *         if validated_data['password'] != validated_data.pop('password2', None):
 */
  __pyx_tuple__65 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_validated_data); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 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_polemarch_api_v2_serializers_py, __pyx_n_s_run_validation, 226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 226, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":278
 *         model = models.UserGroup
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             "name",
 *         )
 */
  __pyx_tuple__67 = PyTuple_Pack(2, __pyx_n_u_id, __pyx_n_u_name); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "polemarch/api/v2/serializers.py":290
 *         model = models.UserGroup
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             "name",
 *             "notes",
 */
  __pyx_tuple__68 = PyTuple_Pack(4, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_notes, __pyx_n_u_owner); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "polemarch/api/v2/serializers.py":303
 *         model = models.History
 *         fields = (
 *             "id",             # <<<<<<<<<<<<<<
 *             "start_time",
 *             "executor",
 */
  __pyx_tuple__69 = PyTuple_Pack(12, __pyx_n_u_id, __pyx_n_u_start_time, __pyx_n_u_executor, __pyx_n_u_initiator, __pyx_n_u_initiator_type, __pyx_n_u_project, __pyx_n_u_inventory, __pyx_n_u_kind, __pyx_n_u_mode, __pyx_n_u_options, __pyx_n_u_status, __pyx_n_u_stop_time); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "polemarch/api/v2/serializers.py":321
 *     class Meta(HistorySerializer.Meta):
 *         fields = (
 *             "id",             # <<<<<<<<<<<<<<
 *             "start_time",
 *             "executor",
 */
  __pyx_tuple__70 = PyTuple_Pack(12, __pyx_n_u_id, __pyx_n_u_start_time, __pyx_n_u_executor, __pyx_n_u_initiator, __pyx_n_u_initiator_type, __pyx_n_u_revision, __pyx_n_u_inventory, __pyx_n_u_kind, __pyx_n_u_mode, __pyx_n_u_options, __pyx_n_u_status, __pyx_n_u_stop_time); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "polemarch/api/v2/serializers.py":343
 *     class Meta:
 *         model = models.History
 *         fields = ("id",             # <<<<<<<<<<<<<<
 *                   "status",
 *                   "executor",
 */
  __pyx_tuple__71 = PyTuple_Pack(18, __pyx_n_u_id, __pyx_n_u_status, __pyx_n_u_executor, __pyx_n_u_project, __pyx_n_u_revision, __pyx_n_u_inventory, __pyx_n_u_kind, __pyx_n_u_mode, __pyx_n_u_execute_args, __pyx_n_u_execution_time, __pyx_n_u_start_time, __pyx_n_u_stop_time, __pyx_n_u_initiator, __pyx_n_u_initiator_type, __pyx_n_u_options, __pyx_n_u_raw_args, __pyx_n_u_raw_stdout, __pyx_n_u_raw_inventory); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "polemarch/api/v2/serializers.py":362
 *                   "raw_inventory",)
 * 
 *     def get_raw(self, request):             # <<<<<<<<<<<<<<
 *         return self.instance.get_raw(request.query_params.get("color", "no") == "yes")
 * 
 */
  __pyx_tuple__72 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_request); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_get_raw, 362, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 362, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":365
 *         return self.instance.get_raw(request.query_params.get("color", "no") == "yes")
 * 
 *     def get_raw_stdout(self, obj):             # <<<<<<<<<<<<<<
 *         return self.context.get('request').build_absolute_uri("raw/")
 * 
 */
  __pyx_tuple__74 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_get_raw_stdout, 365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 365, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":368
 *         return self.context.get('request').build_absolute_uri("raw/")
 * 
 *     def get_facts(self, request):             # <<<<<<<<<<<<<<
 *         return self.instance.facts
 * 
 */
  __pyx_tuple__76 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_request); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_get_facts, 368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 368, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":375
 *     class Meta:
 *         model = models.HistoryLines
 *         fields = ("line_number",             # <<<<<<<<<<<<<<
 *                   "line_gnumber",
 *                   "line",)
 */
  __pyx_tuple__78 = PyTuple_Pack(3, __pyx_n_u_line_number, __pyx_n_u_line_gnumber, __pyx_n_u_line); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "polemarch/api/v2/serializers.py":392
 *         model = models.Hook
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'name',
 *             'type',
 */
  __pyx_tuple__79 = PyTuple_Pack(6, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_type, __pyx_n_u_when, __pyx_n_u_enable, __pyx_n_u_recipients); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "polemarch/api/v2/serializers.py":407
 *         model = models.Variable
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'key',
 *             'value',
 */
  __pyx_tuple__80 = PyTuple_Pack(3, __pyx_n_u_id, __pyx_n_u_key, __pyx_n_u_value); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "polemarch/api/v2/serializers.py":412
 *         )
 * 
 *     def to_representation(self, instance):             # <<<<<<<<<<<<<<
 *         result = super(VariableSerializer, self).to_representation(instance)
 *         if instance.key in getattr(instance.content_object, 'HIDDEN_VARS', []):
 */
  __pyx_tuple__81 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_instance, __pyx_n_s_result); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 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_polemarch_api_v2_serializers_py, __pyx_n_s_to_representation, 412, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 412, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":441
 * class ProjectVariableSerializer(VariableSerializer):
 *     project_keys = (
 *         ('repo_type', 'Types of repo. Default="MANUAL".'),             # <<<<<<<<<<<<<<
 *         ('repo_sync_on_run', "Sync project by every execution."),
 *         ('repo_branch', "[Only for GIT repos] Checkout branch on sync."),
 */
  __pyx_tuple__83 = PyTuple_Pack(2, __pyx_n_u_repo_type, __pyx_kp_u_Types_of_repo_Default_MANUAL); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "polemarch/api/v2/serializers.py":442
 *     project_keys = (
 *         ('repo_type', 'Types of repo. Default="MANUAL".'),
 *         ('repo_sync_on_run', "Sync project by every execution."),             # <<<<<<<<<<<<<<
 *         ('repo_branch', "[Only for GIT repos] Checkout branch on sync."),
 *         ('repo_password', "[Only for GIT repos] Password to fetch access."),
 */
  __pyx_tuple__84 = PyTuple_Pack(2, __pyx_n_u_repo_sync_on_run, __pyx_kp_u_Sync_project_by_every_execution); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "polemarch/api/v2/serializers.py":443
 *         ('repo_type', 'Types of repo. Default="MANUAL".'),
 *         ('repo_sync_on_run', "Sync project by every execution."),
 *         ('repo_branch', "[Only for GIT repos] Checkout branch on sync."),             # <<<<<<<<<<<<<<
 *         ('repo_password', "[Only for GIT repos] Password to fetch access."),
 *         ('repo_key', "[Only for GIT repos] Key to fetch access."),
 */
  __pyx_tuple__85 = PyTuple_Pack(2, __pyx_n_u_repo_branch, __pyx_kp_u_Only_for_GIT_repos_Checkout_bra); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "polemarch/api/v2/serializers.py":444
 *         ('repo_sync_on_run', "Sync project by every execution."),
 *         ('repo_branch', "[Only for GIT repos] Checkout branch on sync."),
 *         ('repo_password', "[Only for GIT repos] Password to fetch access."),             # <<<<<<<<<<<<<<
 *         ('repo_key', "[Only for GIT repos] Key to fetch access."),
 *     )
 */
  __pyx_tuple__86 = PyTuple_Pack(2, __pyx_n_u_repo_password, __pyx_kp_u_Only_for_GIT_repos_Password_to); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "polemarch/api/v2/serializers.py":445
 *         ('repo_branch', "[Only for GIT repos] Checkout branch on sync."),
 *         ('repo_password', "[Only for GIT repos] Password to fetch access."),
 *         ('repo_key', "[Only for GIT repos] Key to fetch access."),             # <<<<<<<<<<<<<<
 *     )
 *     key = serializers.ChoiceField(choices=project_keys)
 */
  __pyx_tuple__87 = PyTuple_Pack(2, __pyx_n_u_repo_key, __pyx_kp_u_Only_for_GIT_repos_Key_to_fetch); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "polemarch/api/v2/serializers.py":441
 * class ProjectVariableSerializer(VariableSerializer):
 *     project_keys = (
 *         ('repo_type', 'Types of repo. Default="MANUAL".'),             # <<<<<<<<<<<<<<
 *         ('repo_sync_on_run', "Sync project by every execution."),
 *         ('repo_branch', "[Only for GIT repos] Checkout branch on sync."),
 */
  __pyx_tuple__88 = PyTuple_Pack(5, __pyx_tuple__83, __pyx_tuple__84, __pyx_tuple__85, __pyx_tuple__86, __pyx_tuple__87); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "polemarch/api/v2/serializers.py":459
 * class _WithVariablesSerializer(_WithPermissionsSerializer):
 *     @transaction.atomic
 *     def _do_with_vars(self, method_name, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         method = getattr(super(_WithVariablesSerializer, self), method_name)
 *         instance = method(*args, **kwargs)
 */
  __pyx_tuple__89 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_method_name, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_method, __pyx_n_s_instance); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_do_with_vars, 459, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 459, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":464
 *         return instance
 * 
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         return self._do_with_vars("create", validated_data=validated_data)
 * 
 */
  __pyx_tuple__91 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_validated_data); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_create, 464, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 464, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":467
 *         return self._do_with_vars("create", validated_data=validated_data)
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return self._do_with_vars("update", instance, validated_data=validated_data)
 * 
 */
  __pyx_tuple__93 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_instance, __pyx_n_s_validated_data); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_update, 467, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 467, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":470
 *         return self._do_with_vars("update", instance, validated_data=validated_data)
 * 
 *     def get_vars(self, representation):             # <<<<<<<<<<<<<<
 *         return representation.get('vars', None)
 * 
 */
  __pyx_tuple__95 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_representation); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_get_vars, 470, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 470, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":473
 *         return representation.get('vars', None)
 * 
 *     def to_representation(self, instance, hidden_vars=None):             # <<<<<<<<<<<<<<
 *         rep = super(_WithVariablesSerializer, self).to_representation(instance)
 *         hv = hidden_vars
 */
  __pyx_tuple__97 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_instance, __pyx_n_s_hidden_vars, __pyx_n_s_rep, __pyx_n_s_hv, __pyx_n_s_vars, __pyx_n_s_mask_key); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_to_representation, 473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 473, __pyx_L1_error)
  __pyx_tuple__99 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "polemarch/api/v2/serializers.py":494
 *     class Meta:
 *         model = models.Host
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'type',)
 */
  __pyx_tuple__100 = PyTuple_Pack(3, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_type); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "polemarch/api/v2/serializers.py":505
 *     class Meta:
 *         model = models.Host
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'notes',
 */
  __pyx_tuple__101 = PyTuple_Pack(5, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_notes, __pyx_n_u_type, __pyx_n_u_owner); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "polemarch/api/v2/serializers.py":515
 *     class Meta:
 *         model = models.Task
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'playbook',)
 */
  __pyx_tuple__102 = PyTuple_Pack(3, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_playbook); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "polemarch/api/v2/serializers.py":525
 *     class Meta:
 *         model = models.Task
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'playbook',)
 */
  __pyx_tuple__102 = PyTuple_Pack(3, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_playbook); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "polemarch/api/v2/serializers.py":534
 *         model = models.Module
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'path',
 *             'name',
 */
  __pyx_tuple__103 = PyTuple_Pack(3, __pyx_n_u_id, __pyx_n_u_path, __pyx_n_u_name); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "polemarch/api/v2/serializers.py":546
 *         model = models.Module
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'path',
 *             'name',
 */
  __pyx_tuple__104 = PyTuple_Pack(4, __pyx_n_u_id, __pyx_n_u_path, __pyx_n_u_name, __pyx_n_u_data); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "polemarch/api/v2/serializers.py":600
 *     class Meta:
 *         model = models.PeriodicTask
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'kind',
 */
  __pyx_tuple__105 = PyTuple_Pack(11, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_kind, __pyx_n_u_mode, __pyx_n_u_inventory, __pyx_n_u_save_result, __pyx_n_u_template, __pyx_n_u_template_opt, __pyx_n_u_enabled, __pyx_n_u_type, __pyx_n_u_schedule); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "polemarch/api/v2/serializers.py":613
 * 
 *     @transaction.atomic
 *     def _do_with_vars(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         kw = kwargs['validated_data']
 *         if kw.get('kind', None) == 'TEMPLATE':
 */
  __pyx_tuple__106 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_kw); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_do_with_vars, 613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 613, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":627
 *     class Meta:
 *         model = models.PeriodicTask
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'kind',
 */
  __pyx_tuple__108 = PyTuple_Pack(12, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_kind, __pyx_n_u_mode, __pyx_n_u_inventory, __pyx_n_u_save_result, __pyx_n_u_template, __pyx_n_u_template_opt, __pyx_n_u_enabled, __pyx_n_u_type, __pyx_n_u_schedule, __pyx_n_u_notes); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "polemarch/api/v2/serializers.py":640
 *                   'notes',)
 * 
 *     def execute(self):             # <<<<<<<<<<<<<<
 *         inventory = self.instance.inventory
 *         rdata = ExecuteResponseSerializer(data=dict(
 */
  __pyx_tuple__109 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_inventory, __pyx_n_s_rdata); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_execute, 640, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 640, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":664
 *         model = models.Template
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'name',
 *             'kind',
 */
  __pyx_tuple__111 = PyTuple_Pack(6, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_kind, __pyx_n_u_data, __pyx_n_u_options, __pyx_n_u_options_list); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "polemarch/api/v2/serializers.py":672
 *         )
 * 
 *     def get_vars(self, representation):             # <<<<<<<<<<<<<<
 *         try:
 *             return representation['data']['vars']
 */
  __pyx_tuple__112 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_representation); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_get_vars, 672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 672, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":678
 *             return None
 * 
 *     def set_opts_vars(self, rep, hidden_vars):             # <<<<<<<<<<<<<<
 *         if not rep.get('vars', None):
 *             return rep
 */
  __pyx_tuple__114 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_rep, __pyx_n_s_hidden_vars, __pyx_n_s_var, __pyx_n_s_mask_key); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_set_opts_vars, 678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 678, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":687
 *         return rep
 * 
 *     def repr_options(self, instance, data, hidden_vars):             # <<<<<<<<<<<<<<
 *         hv = hidden_vars
 *         hv = instance.HIDDEN_VARS if hv is None else hv
 */
  __pyx_tuple__116 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_instance, __pyx_n_s_data, __pyx_n_s_hidden_vars, __pyx_n_s_hv, __pyx_n_s_name, __pyx_n_s_rep); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_repr_options, 687, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 687, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":693
 *             data['options'][name] = self.set_opts_vars(rep, hv)
 * 
 *     def to_representation(self, instance):             # <<<<<<<<<<<<<<
 *         data = OrderedDict()
 *         if instance.kind in ["Task", "Module"]:
 */
  __pyx_tuple__118 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_instance, __pyx_n_s_data, __pyx_n_s_hidden_vars); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_to_representation, 693, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 693, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":713
 *         model = models.Template
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'name',
 *             'notes',
 */
  __pyx_tuple__120 = PyTuple_Pack(7, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_notes, __pyx_n_u_kind, __pyx_n_u_data, __pyx_n_u_options, __pyx_n_u_options_list); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);

  /* "polemarch/api/v2/serializers.py":722
 *         )
 * 
 *     def execute(self, request):             # <<<<<<<<<<<<<<
 *         serializer = OneProjectSerializer(self.instance.project)
 *         return self.instance.execute(
 */
  __pyx_tuple__121 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_request, __pyx_n_s_serializer); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_execute, 722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 722, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":751
 *     class Meta:
 *         model = models.Group
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'children',)
 */
  __pyx_tuple__123 = PyTuple_Pack(3, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_children); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);

  /* "polemarch/api/v2/serializers.py":762
 *     class Meta:
 *         model = models.Group
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'notes',
 */
  __pyx_tuple__124 = PyTuple_Pack(5, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_notes, __pyx_n_u_children, __pyx_n_u_owner); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "polemarch/api/v2/serializers.py":782
 *     class Meta:
 *         model = models.Inventory
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',)
 * 
 */
  __pyx_tuple__67 = PyTuple_Pack(2, __pyx_n_u_id, __pyx_n_u_name); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "polemarch/api/v2/serializers.py":792
 *     class Meta:
 *         model = models.Inventory
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'notes',
 */
  __pyx_tuple__68 = PyTuple_Pack(4, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_notes, __pyx_n_u_owner); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "polemarch/api/v2/serializers.py":798
 * 
 * 
 * def list_to_choices(items_list):             # <<<<<<<<<<<<<<
 *     def handler(item):
 *         return (item, item)
 */
  __pyx_tuple__125 = PyTuple_Pack(3, __pyx_n_s_items_list, __pyx_n_s_handler, __pyx_n_s_handler); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_list_to_choices, 798, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 798, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":830
 *         model = models.Project
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'name',
 *             'status',
 */
  __pyx_tuple__127 = PyTuple_Pack(7, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_status, __pyx_n_u_type, __pyx_n_u_repository, __pyx_n_u_repo_auth, __pyx_n_u_auth_data); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);

  /* "polemarch/api/v2/serializers.py":842
 *         }
 * 
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         repo_type = validated_data.pop('type')
 *         repo_auth_type = validated_data.pop('repo_auth')
 */
  __pyx_tuple__128 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_validated_data, __pyx_n_s_repo_type, __pyx_n_s_repo_auth_type, __pyx_n_s_repo_auth_data, __pyx_n_s_instance, __pyx_n_s_key); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_create, 842, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 842, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":861
 *     class Meta:
 *         model = models.Project
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'type',
 */
  __pyx_tuple__130 = PyTuple_Pack(4, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_type, __pyx_n_u_status); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);

  /* "polemarch/api/v2/serializers.py":867
 * 
 *     @transaction.atomic
 *     def _do_with_vars(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         instance = super(ProjectSerializer, self)._do_with_vars(*args, **kw)
 *         return instance if instance.repo_class else None
 */
  __pyx_tuple__131 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kw, __pyx_n_s_instance); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_do_with_vars, 867, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":881
 *     class Meta:
 *         model = models.Project
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'repository',
 */
  __pyx_tuple__133 = PyTuple_Pack(10, __pyx_n_u_id, __pyx_n_u_name, __pyx_n_u_repository, __pyx_n_u_status, __pyx_n_u_revision, __pyx_n_u_branch, __pyx_n_u_owner, __pyx_n_u_notes, __pyx_n_u_readme_content, __pyx_n_u_execute_view_data); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);

  /* "polemarch/api/v2/serializers.py":893
 * 
 *     @transaction.atomic()
 *     def sync(self):             # <<<<<<<<<<<<<<
 *         self.instance.start_repo_task("sync")
 *         serializer = ActionResponseSerializer(
 */
  __pyx_tuple__134 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_serializer); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_sync, 893, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 893, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":901
 *         return Response(serializer.data, status.HTTP_200_OK)
 * 
 *     def _get_execution_inventory(self, template, inventory, user):             # <<<<<<<<<<<<<<
 *         if template or inventory is None:
 *             return inventory
 */
  __pyx_tuple__136 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_template, __pyx_n_s_inventory, __pyx_n_s_user); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_get_execution_inventory, 901, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 901, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":914
 *         return inventory
 * 
 *     def _execution(self, kind, data, user, **kwargs):             # <<<<<<<<<<<<<<
 *         template = kwargs.pop("template", None)
 *         inventory = self._get_execution_inventory(
 */
  __pyx_tuple__138 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_kind, __pyx_n_s_data, __pyx_n_s_user, __pyx_n_s_kwargs, __pyx_n_s_template, __pyx_n_s_inventory, __pyx_n_s_msg, __pyx_n_s_init_type, __pyx_n_s_obj_id, __pyx_n_s_serializer, __pyx_n_s_history_id, __pyx_n_s_rdata, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_execution, 914, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 914, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":951
 *         return Response(rdata.data, status.HTTP_201_CREATED)
 * 
 *     def execute_playbook(self, request):             # <<<<<<<<<<<<<<
 *         return self._execution("playbook", dict(request.data), request.user)
 * 
 */
  __pyx_tuple__140 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_request); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_execute_playbook, 951, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 951, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":954
 *         return self._execution("playbook", dict(request.data), request.user)
 * 
 *     def execute_module(self, request):             # <<<<<<<<<<<<<<
 *         return self._execution("module", dict(request.data), request.user)
 * 
 */
  __pyx_tuple__142 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_request); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);
  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_execute_module, 954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 954, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":961
 * 
 * 
 * def generate_fileds(ansible_type):             # <<<<<<<<<<<<<<
 *     if ansible_type is None:
 *         return OrderedDict()
 */
  __pyx_tuple__144 = PyTuple_Pack(8, __pyx_n_s_ansible_type, __pyx_n_s_fields, __pyx_n_s_ref, __pyx_n_s_settings, __pyx_n_s_ref_type, __pyx_n_s_kwargs, __pyx_n_s_field, __pyx_n_s_field_name); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_generate_fileds, 961, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 961, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":1007
 *     # pylint: disable=super-on-old-class
 *     @staticmethod
 *     def __new__(cls, name, bases, attrs):             # <<<<<<<<<<<<<<
 *         ansible_type = None
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):
 */
  __pyx_tuple__146 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_name, __pyx_n_s_bases, __pyx_n_s_attrs, __pyx_n_s_ansible_type); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_new, 1007, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 1007, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":1074
 * 
 *     @transaction.atomic()
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         parser = AnsibleInventoryParser()
 *         inv_json = parser.get_inventory_data(validated_data['raw_data'])
 */
  __pyx_tuple__148 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_validated_data, __pyx_n_s_parser, __pyx_n_s_inv_json, __pyx_n_s_inventory, __pyx_n_s_created_hosts, __pyx_n_s_created_groups, __pyx_n_s_host, __pyx_n_s_inv_host, __pyx_n_s_group, __pyx_n_s_children, __pyx_n_s_inv_group, __pyx_n_s_g_subs, __pyx_n_s_name); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(2, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_polemarch_api_v2_serializers_py, __pyx_n_s_create, 1074, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 1074, __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_get.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __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_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_409 = PyInt_FromLong(409); if (unlikely(!__pyx_int_409)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_15000 = PyInt_FromLong(15000L); if (unlikely(!__pyx_int_15000)) __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
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
  __pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals.tp_dictoffset && __pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals = &__pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct__with_signals;
  if (PyType_Ready(&__pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 214, __pyx_L1_error)
  __pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr.tp_dictoffset && __pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr = &__pyx_type_9polemarch_3api_2v2_11serializers___pyx_scope_struct_1_genexpr;
  __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;
}


#if PY_MAJOR_VERSION < 3
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC void
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#else
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initserializers(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initserializers(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_serializers(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_serializers(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) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        result = PyDict_SetItemString(moddict, to_name, value);
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static 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__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_serializers(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'serializers' 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_serializers(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("serializers", __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)
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_polemarch__api__v2__serializers) {
    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, "polemarch.api.v2.serializers")) {
      if (unlikely(PyDict_SetItemString(modules, "polemarch.api.v2.serializers", __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)) goto __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

  /* "polemarch/api/v2/serializers.py":3
 * # pylint: disable=no-member,unused-argument,too-many-lines
 * from __future__ import unicode_literals
 * import json             # <<<<<<<<<<<<<<
 * from collections import OrderedDict
 * import six
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":4
 * from __future__ import unicode_literals
 * import json
 * from collections import OrderedDict             # <<<<<<<<<<<<<<
 * import six
 * from django.contrib.auth.models import User
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_OrderedDict);
  __Pyx_GIVEREF(__pyx_n_s_OrderedDict);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OrderedDict);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __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_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":5
 * import json
 * from collections import OrderedDict
 * import six             # <<<<<<<<<<<<<<
 * from django.contrib.auth.models import User
 * from django.utils.functional import cached_property
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_six, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_six, __pyx_t_2) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":6
 * from collections import OrderedDict
 * import six
 * from django.contrib.auth.models import User             # <<<<<<<<<<<<<<
 * from django.utils.functional import cached_property
 * from django.db import transaction
 */
  __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_User);
  __Pyx_GIVEREF(__pyx_n_s_User);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_User);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_django_contrib_auth_models, __pyx_t_2, -1); 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_User); 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_User, __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;

  /* "polemarch/api/v2/serializers.py":7
 * import six
 * from django.contrib.auth.models import User
 * from django.utils.functional import cached_property             # <<<<<<<<<<<<<<
 * from django.db import transaction
 * from rest_framework import serializers, exceptions, status
 */
  __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_cached_property);
  __Pyx_GIVEREF(__pyx_n_s_cached_property);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_cached_property);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_django_utils_functional, __pyx_t_1, -1); 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_cached_property); 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_cached_property, __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;

  /* "polemarch/api/v2/serializers.py":8
 * from django.contrib.auth.models import User
 * from django.utils.functional import cached_property
 * from django.db import transaction             # <<<<<<<<<<<<<<
 * from rest_framework import serializers, exceptions, status
 * from rest_framework.exceptions import PermissionDenied
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_transaction);
  __Pyx_GIVEREF(__pyx_n_s_transaction);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_transaction);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_django_db, __pyx_t_2, -1); 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_transaction); 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_transaction, __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;

  /* "polemarch/api/v2/serializers.py":9
 * from django.utils.functional import cached_property
 * from django.db import transaction
 * from rest_framework import serializers, exceptions, status             # <<<<<<<<<<<<<<
 * from rest_framework.exceptions import PermissionDenied
 * from vstutils.api import serializers as vst_serializers, fields as vst_fields
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_serializers);
  __Pyx_GIVEREF(__pyx_n_s_serializers);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_serializers);
  __Pyx_INCREF(__pyx_n_s_exceptions);
  __Pyx_GIVEREF(__pyx_n_s_exceptions);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_exceptions);
  __Pyx_INCREF(__pyx_n_s_status);
  __Pyx_GIVEREF(__pyx_n_s_status);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_status);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_rest_framework, __pyx_t_1, -1); 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_serializers); 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_serializers, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_exceptions); 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_exceptions, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_status); 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_status, __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;

  /* "polemarch/api/v2/serializers.py":10
 * from django.db import transaction
 * from rest_framework import serializers, exceptions, status
 * from rest_framework.exceptions import PermissionDenied             # <<<<<<<<<<<<<<
 * from vstutils.api import serializers as vst_serializers, fields as vst_fields
 * from vstutils.api.serializers import DataSerializer, EmptySerializer
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_PermissionDenied);
  __Pyx_GIVEREF(__pyx_n_s_PermissionDenied);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PermissionDenied);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_rest_framework_exceptions, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __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_PermissionDenied); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PermissionDenied, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":11
 * from rest_framework import serializers, exceptions, status
 * from rest_framework.exceptions import PermissionDenied
 * from vstutils.api import serializers as vst_serializers, fields as vst_fields             # <<<<<<<<<<<<<<
 * from vstutils.api.serializers import DataSerializer, EmptySerializer
 * from vstutils.api.base import Response
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_serializers);
  __Pyx_GIVEREF(__pyx_n_s_serializers);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_serializers);
  __Pyx_INCREF(__pyx_n_s_fields);
  __Pyx_GIVEREF(__pyx_n_s_fields);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_fields);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_vstutils_api, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __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_serializers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vst_serializers, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vst_fields, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":12
 * from rest_framework.exceptions import PermissionDenied
 * from vstutils.api import serializers as vst_serializers, fields as vst_fields
 * from vstutils.api.serializers import DataSerializer, EmptySerializer             # <<<<<<<<<<<<<<
 * from vstutils.api.base import Response
 * from ...main.utils import AnsibleArgumentsReference, AnsibleInventoryParser
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_DataSerializer);
  __Pyx_GIVEREF(__pyx_n_s_DataSerializer);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DataSerializer);
  __Pyx_INCREF(__pyx_n_s_EmptySerializer);
  __Pyx_GIVEREF(__pyx_n_s_EmptySerializer);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_EmptySerializer);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_vstutils_api_serializers, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __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_DataSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataSerializer, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_EmptySerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EmptySerializer, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":13
 * from vstutils.api import serializers as vst_serializers, fields as vst_fields
 * from vstutils.api.serializers import DataSerializer, EmptySerializer
 * from vstutils.api.base import Response             # <<<<<<<<<<<<<<
 * from ...main.utils import AnsibleArgumentsReference, AnsibleInventoryParser
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Response);
  __Pyx_GIVEREF(__pyx_n_s_Response);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Response);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_vstutils_api_base, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __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_Response); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Response, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":14
 * from vstutils.api.serializers import DataSerializer, EmptySerializer
 * from vstutils.api.base import Response
 * from ...main.utils import AnsibleArgumentsReference, AnsibleInventoryParser             # <<<<<<<<<<<<<<
 * 
 * from ...main.models import Inventory
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_AnsibleArgumentsReference);
  __Pyx_GIVEREF(__pyx_n_s_AnsibleArgumentsReference);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_AnsibleArgumentsReference);
  __Pyx_INCREF(__pyx_n_s_AnsibleInventoryParser);
  __Pyx_GIVEREF(__pyx_n_s_AnsibleInventoryParser);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_AnsibleInventoryParser);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_main_utils, __pyx_t_2, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __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_AnsibleArgumentsReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AnsibleArgumentsReference, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_AnsibleInventoryParser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AnsibleInventoryParser, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":16
 * from ...main.utils import AnsibleArgumentsReference, AnsibleInventoryParser
 * 
 * from ...main.models import Inventory             # <<<<<<<<<<<<<<
 * from ...main import models
 * from ..signals import api_post_save, api_pre_save
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Inventory);
  __Pyx_GIVEREF(__pyx_n_s_Inventory);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Inventory);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_main_models, __pyx_t_1, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __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_Inventory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Inventory, __pyx_t_1) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":17
 * 
 * from ...main.models import Inventory
 * from ...main import models             # <<<<<<<<<<<<<<
 * from ..signals import api_post_save, api_pre_save
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_models);
  __Pyx_GIVEREF(__pyx_n_s_models);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_models);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_main_2, __pyx_t_2, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __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_models); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_models, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":18
 * from ...main.models import Inventory
 * from ...main import models
 * from ..signals import api_post_save, api_pre_save             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_api_post_save);
  __Pyx_GIVEREF(__pyx_n_s_api_post_save);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_api_post_save);
  __Pyx_INCREF(__pyx_n_s_api_pre_save);
  __Pyx_GIVEREF(__pyx_n_s_api_pre_save);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_api_pre_save);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_signals, __pyx_t_1, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __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_api_post_save); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_api_post_save, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_api_pre_save); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_api_pre_save, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":26
 * #
 * # Serializers field for usability
 * class ModelRelatedField(serializers.PrimaryKeyRelatedField):             # <<<<<<<<<<<<<<
 *     def __init__(self, **kwargs):  # nocv
 *         model = kwargs.pop("model", None)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_serializers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PrimaryKeyRelatedField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ModelRelatedField, __pyx_n_s_ModelRelatedField, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "polemarch/api/v2/serializers.py":27
 * # Serializers field for usability
 * class ModelRelatedField(serializers.PrimaryKeyRelatedField):
 *     def __init__(self, **kwargs):  # nocv             # <<<<<<<<<<<<<<
 *         model = kwargs.pop("model", None)
 *         assert not ((model is not None or self.queryset is not None) and
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_17ModelRelatedField_1__init__, 0, __pyx_n_s_ModelRelatedField___init, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":26
 * #
 * # Serializers field for usability
 * class ModelRelatedField(serializers.PrimaryKeyRelatedField):             # <<<<<<<<<<<<<<
 *     def __init__(self, **kwargs):  # nocv
 *         model = kwargs.pop("model", None)
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ModelRelatedField, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ModelRelatedField, __pyx_t_4) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":39
 * 
 * 
 * class DictField(serializers.CharField):             # <<<<<<<<<<<<<<
 * 
 *     def to_internal_value(self, data):  # nocv
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_serializers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CharField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DictField, __pyx_n_s_DictField, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "polemarch/api/v2/serializers.py":41
 * class DictField(serializers.CharField):
 * 
 *     def to_internal_value(self, data):  # nocv             # <<<<<<<<<<<<<<
 *         return (
 *             data
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_9DictField_1to_internal_value, 0, __pyx_n_s_DictField_to_internal_value, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_to_internal_value, __pyx_t_4) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":51
 *         )
 * 
 *     def to_representation(self, value):  # nocv             # <<<<<<<<<<<<<<
 *         return (
 *             json.loads(value)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_9DictField_3to_representation, 0, __pyx_n_s_DictField_to_representation, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_to_representation, __pyx_t_4) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":39
 * 
 * 
 * class DictField(serializers.CharField):             # <<<<<<<<<<<<<<
 * 
 *     def to_internal_value(self, data):  # nocv
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DictField, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DictField, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":59
 * 
 * 
 * class MultiTypeField(serializers.CharField):             # <<<<<<<<<<<<<<
 *     def to_internal_value(self, data):
 *         return data
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_serializers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CharField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MultiTypeField, __pyx_n_s_MultiTypeField, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "polemarch/api/v2/serializers.py":60
 * 
 * class MultiTypeField(serializers.CharField):
 *     def to_internal_value(self, data):             # <<<<<<<<<<<<<<
 *         return data
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_14MultiTypeField_1to_internal_value, 0, __pyx_n_s_MultiTypeField_to_internal_value, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_to_internal_value, __pyx_t_4) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":63
 *         return data
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return (
 *             value if not isinstance(value, six.class_types)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_14MultiTypeField_3to_representation, 0, __pyx_n_s_MultiTypeField_to_representation, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_to_representation, __pyx_t_4) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":59
 * 
 * 
 * class MultiTypeField(serializers.CharField):             # <<<<<<<<<<<<<<
 *     def to_internal_value(self, data):
 *         return data
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MultiTypeField, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MultiTypeField, __pyx_t_4) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":70
 * 
 * 
 * class InventoryDependEnumField(vst_fields.DependEnumField):             # <<<<<<<<<<<<<<
 *     def to_representation(self, value):
 *         if isinstance(value, models.Inventory):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DependEnumField); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_InventoryDependEnumField, __pyx_n_s_InventoryDependEnumField, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "polemarch/api/v2/serializers.py":71
 * 
 * class InventoryDependEnumField(vst_fields.DependEnumField):
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         if isinstance(value, models.Inventory):
 *             value = value.id  # nocv
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_24InventoryDependEnumField_1to_representation, 0, __pyx_n_s_InventoryDependEnumField_to_repr, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_to_representation, __pyx_t_4) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":70
 * 
 * 
 * class InventoryDependEnumField(vst_fields.DependEnumField):             # <<<<<<<<<<<<<<
 *     def to_representation(self, value):
 *         if isinstance(value, models.Inventory):
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_InventoryDependEnumField, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InventoryDependEnumField, __pyx_t_4) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":77
 * 
 * 
 * def with_signals(func):             # <<<<<<<<<<<<<<
 *     '''
 *     Decorator for send api_pre_save and api_post_save signals from serializers.
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_1with_signals, 0, __pyx_n_s_with_signals, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_with_signals, __pyx_t_2) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":98
 * 
 * # Serializers
 * class ActionResponseSerializer(DataSerializer, EmptySerializer):             # <<<<<<<<<<<<<<
 *     detail = vst_fields.VSTCharField()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_EmptySerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __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_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_ActionResponseSerializer, __pyx_n_s_ActionResponseSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":99
 * # Serializers
 * class ActionResponseSerializer(DataSerializer, EmptySerializer):
 *     detail = vst_fields.VSTCharField()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_detail, __pyx_t_4) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":98
 * 
 * # Serializers
 * class ActionResponseSerializer(DataSerializer, EmptySerializer):             # <<<<<<<<<<<<<<
 *     detail = vst_fields.VSTCharField()
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ActionResponseSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ActionResponseSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":102
 * 
 * 
 * class ExecuteResponseSerializer(ActionResponseSerializer):             # <<<<<<<<<<<<<<
 *     history_id = vst_fields.RedirectIntegerField(default=None, allow_null=True)
 *     executor = serializers.IntegerField(default=None, allow_null=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ActionResponseSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_ExecuteResponseSerializer, __pyx_n_s_ExecuteResponseSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":103
 * 
 * class ExecuteResponseSerializer(ActionResponseSerializer):
 *     history_id = vst_fields.RedirectIntegerField(default=None, allow_null=True)             # <<<<<<<<<<<<<<
 *     executor = serializers.IntegerField(default=None, allow_null=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_RedirectIntegerField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, Py_None) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allow_null, Py_True) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_history_id, __pyx_t_5) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":104
 * class ExecuteResponseSerializer(ActionResponseSerializer):
 *     history_id = vst_fields.RedirectIntegerField(default=None, allow_null=True)
 *     executor = serializers.IntegerField(default=None, allow_null=True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_default, Py_None) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_allow_null, Py_True) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_executor, __pyx_t_6) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":102
 * 
 * 
 * class ExecuteResponseSerializer(ActionResponseSerializer):             # <<<<<<<<<<<<<<
 *     history_id = vst_fields.RedirectIntegerField(default=None, allow_null=True)
 *     executor = serializers.IntegerField(default=None, allow_null=True)
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_ExecuteResponseSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExecuteResponseSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":107
 * 
 * 
 * class SetOwnerSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     user_id = vst_fields.Select2Field(required=True, select='User',
 *                                       label='New owner',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_SetOwnerSerializer, __pyx_n_s_SetOwnerSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":108
 * 
 * class SetOwnerSerializer(DataSerializer):
 *     user_id = vst_fields.Select2Field(required=True, select='User',             # <<<<<<<<<<<<<<
 *                                       label='New owner',
 *                                       autocomplete_represent='username')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Select2Field); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_select, __pyx_n_u_User) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_label, __pyx_kp_u_New_owner) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_autocomplete_represent, __pyx_n_u_username) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_user_id, __pyx_t_4) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":112
 *                                       autocomplete_represent='username')
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         if not self.instance.acl_handler.owned_by(self.current_user()):  # noce
 *             raise PermissionDenied(self.perms_msg)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_1update, 0, __pyx_n_s_SetOwnerSerializer_update, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_update, __pyx_t_4) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":119
 *         return user
 * 
 *     def get_user(self, validated_data):             # <<<<<<<<<<<<<<
 *         return User.objects.get(**validated_data)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_3get_user, 0, __pyx_n_s_SetOwnerSerializer_get_user, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_get_user, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":122
 *         return User.objects.get(**validated_data)
 * 
 *     def current_user(self):             # <<<<<<<<<<<<<<
 *         return self.context['request'].user
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_5current_user, 0, __pyx_n_s_SetOwnerSerializer_current_user, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_current_user, __pyx_t_4) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":125
 *         return self.context['request'].user
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return dict(user_id=value.id)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_7to_representation, 0, __pyx_n_s_SetOwnerSerializer_to_representa, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_to_representation, __pyx_t_4) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":128
 *         return dict(user_id=value.id)
 * 
 *     def to_internal_value(self, data):             # <<<<<<<<<<<<<<
 *         return dict(pk=data['user_id'])
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_18SetOwnerSerializer_9to_internal_value, 0, __pyx_n_s_SetOwnerSerializer_to_internal_v, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_to_internal_value, __pyx_t_4) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":107
 * 
 * 
 * class SetOwnerSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     user_id = vst_fields.Select2Field(required=True, select='User',
 *                                       label='New owner',
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SetOwnerSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SetOwnerSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":132
 * 
 * 
 * class ChangePasswordSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     old_password = serializers.CharField(required=True)
 *     password = serializers.CharField(required=True, label='New password')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_ChangePasswordSerializer, __pyx_n_s_ChangePasswordSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":133
 * 
 * class ChangePasswordSerializer(DataSerializer):
 *     old_password = serializers.CharField(required=True)             # <<<<<<<<<<<<<<
 *     password = serializers.CharField(required=True, label='New password')
 *     password2 = serializers.CharField(required=True, label='Confirm new password')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_serializers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_CharField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_old_password, __pyx_t_5) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":134
 * class ChangePasswordSerializer(DataSerializer):
 *     old_password = serializers.CharField(required=True)
 *     password = serializers.CharField(required=True, label='New password')             # <<<<<<<<<<<<<<
 *     password2 = serializers.CharField(required=True, label='Confirm new password')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_CharField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_label, __pyx_kp_u_New_password) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_password, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":135
 *     old_password = serializers.CharField(required=True)
 *     password = serializers.CharField(required=True, label='New password')
 *     password2 = serializers.CharField(required=True, label='Confirm new password')             # <<<<<<<<<<<<<<
 * 
 *     def update(self, instance, validated_data):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_CharField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_label, __pyx_kp_u_Confirm_new_password) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_password2, __pyx_t_4) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":137
 *     password2 = serializers.CharField(required=True, label='Confirm new password')
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         if not instance.check_password(validated_data['old_password']):
 *             raise exceptions.PermissionDenied('Password is not correct.')
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_1update, 0, __pyx_n_s_ChangePasswordSerializer_update, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_update, __pyx_t_4) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":146
 *         return instance
 * 
 *     def to_representation(self, value):             # <<<<<<<<<<<<<<
 *         return dict(
 *             old_password='***',
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_24ChangePasswordSerializer_3to_representation, 0, __pyx_n_s_ChangePasswordSerializer_to_repr, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_to_representation, __pyx_t_4) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":132
 * 
 * 
 * class ChangePasswordSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     old_password = serializers.CharField(required=True)
 *     password = serializers.CharField(required=True, label='New password')
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_ChangePasswordSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChangePasswordSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":154
 * 
 * 
 * class _SignalSerializer(serializers.ModelSerializer):             # <<<<<<<<<<<<<<
 *     @cached_property
 *     def _writable_fields(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_serializers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ModelSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_SignalSerializer, __pyx_n_s_SignalSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":155
 * 
 * class _SignalSerializer(serializers.ModelSerializer):
 *     @cached_property             # <<<<<<<<<<<<<<
 *     def _writable_fields(self):
 *         writable_fields = super(_SignalSerializer, self)._writable_fields
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_cached_property); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "polemarch/api/v2/serializers.py":156
 * class _SignalSerializer(serializers.ModelSerializer):
 *     @cached_property
 *     def _writable_fields(self):             # <<<<<<<<<<<<<<
 *         writable_fields = super(_SignalSerializer, self)._writable_fields
 *         fields = []
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_17_SignalSerializer_1_writable_fields, 0, __pyx_n_s_SignalSerializer__writable_fiel, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_writable_fields, __pyx_t_4) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":173
 *         return fields
 * 
 *     @with_signals             # <<<<<<<<<<<<<<
 *     def create(self, validated_data):
 *         return super(_SignalSerializer, self).create(validated_data)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_with_signals); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "polemarch/api/v2/serializers.py":174
 * 
 *     @with_signals
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         return super(_SignalSerializer, self).create(validated_data)
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_17_SignalSerializer_3create, 0, __pyx_n_s_SignalSerializer_create, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_create, __pyx_t_4) < 0) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":177
 *         return super(_SignalSerializer, self).create(validated_data)
 * 
 *     @with_signals             # <<<<<<<<<<<<<<
 *     def update(self, instance, validated_data):
 *         return super(_SignalSerializer, self).update(instance, validated_data)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_with_signals); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "polemarch/api/v2/serializers.py":178
 * 
 *     @with_signals
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return super(_SignalSerializer, self).update(instance, validated_data)
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_17_SignalSerializer_5update, 0, __pyx_n_s_SignalSerializer_update, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_update, __pyx_t_4) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":154
 * 
 * 
 * class _SignalSerializer(serializers.ModelSerializer):             # <<<<<<<<<<<<<<
 *     @cached_property
 *     def _writable_fields(self):
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SignalSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SignalSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":182
 * 
 * 
 * class _WithPermissionsSerializer(_SignalSerializer):             # <<<<<<<<<<<<<<
 *     perms_msg = "You do not have permission to perform this action."
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SignalSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_WithPermissionsSerializer, __pyx_n_s_WithPermissionsSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":183
 * 
 * class _WithPermissionsSerializer(_SignalSerializer):
 *     perms_msg = "You do not have permission to perform this action."             # <<<<<<<<<<<<<<
 * 
 *     def is_valid(self, *args, **kwargs):
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_perms_msg, __pyx_kp_u_You_do_not_have_permission_to_pe) < 0) __PYX_ERR(0, 183, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":185
 *     perms_msg = "You do not have permission to perform this action."
 * 
 *     def is_valid(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         result = super(_WithPermissionsSerializer, self).is_valid(*args, **kwargs)
 *         if not hasattr(self, 'instance'):  # nocv
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_1is_valid, 0, __pyx_n_s_WithPermissionsSerializer_is_va, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_is_valid, __pyx_t_4) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":193
 *         return result
 * 
 *     def current_user(self):             # <<<<<<<<<<<<<<
 *         return self.context['request'].user  # nocv
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_26_WithPermissionsSerializer_3current_user, 0, __pyx_n_s_WithPermissionsSerializer_curre, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_current_user, __pyx_t_4) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":182
 * 
 * 
 * class _WithPermissionsSerializer(_SignalSerializer):             # <<<<<<<<<<<<<<
 *     perms_msg = "You do not have permission to perform this action."
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_WithPermissionsSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WithPermissionsSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":197
 * 
 * 
 * class UserSerializer(vst_serializers.UserSerializer):             # <<<<<<<<<<<<<<
 *     is_staff = serializers.HiddenField(default=True, label='Staff')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_UserSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_UserSerializer, __pyx_n_s_UserSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":198
 * 
 * class UserSerializer(vst_serializers.UserSerializer):
 *     is_staff = serializers.HiddenField(default=True, label='Staff')             # <<<<<<<<<<<<<<
 * 
 *     @with_signals
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_serializers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_HiddenField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, Py_True) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_label, __pyx_n_u_Staff) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_is_staff, __pyx_t_5) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":200
 *     is_staff = serializers.HiddenField(default=True, label='Staff')
 * 
 *     @with_signals             # <<<<<<<<<<<<<<
 *     def create(self, data):
 *         return super(UserSerializer, self).create(data)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_with_signals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "polemarch/api/v2/serializers.py":201
 * 
 *     @with_signals
 *     def create(self, data):             # <<<<<<<<<<<<<<
 *         return super(UserSerializer, self).create(data)
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_14UserSerializer_1create, 0, __pyx_n_s_UserSerializer_create, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_create, __pyx_t_5) < 0) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":204
 *         return super(UserSerializer, self).create(data)
 * 
 *     @with_signals             # <<<<<<<<<<<<<<
 *     def update(self, instance, validated_data):
 *         return super(UserSerializer, self).update(instance, validated_data)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_with_signals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "polemarch/api/v2/serializers.py":205
 * 
 *     @with_signals
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return super(UserSerializer, self).update(instance, validated_data)
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_14UserSerializer_3update, 0, __pyx_n_s_UserSerializer_update, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_update, __pyx_t_5) < 0) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":197
 * 
 * 
 * class UserSerializer(vst_serializers.UserSerializer):             # <<<<<<<<<<<<<<
 *     is_staff = serializers.HiddenField(default=True, label='Staff')
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_UserSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_UserSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":209
 * 
 * 
 * class OneUserSerializer(UserSerializer):             # <<<<<<<<<<<<<<
 *     email = serializers.EmailField(required=False)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UserSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_OneUserSerializer, __pyx_n_s_OneUserSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":210
 * 
 * class OneUserSerializer(UserSerializer):
 *     email = serializers.EmailField(required=False)             # <<<<<<<<<<<<<<
 * 
 *     class Meta(vst_serializers.OneUserSerializer.Meta):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_EmailField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 210, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_email, __pyx_t_6) < 0) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":212
 *     email = serializers.EmailField(required=False)
 * 
 *     class Meta(vst_serializers.OneUserSerializer.Meta):             # <<<<<<<<<<<<<<
 *         fields = tuple(
 *             field for field in vst_serializers.OneUserSerializer.Meta.fields
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_OneUserSerializer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Meta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_5, __pyx_n_s_Meta, __pyx_n_s_OneUserSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "polemarch/api/v2/serializers.py":214
 *     class Meta(vst_serializers.OneUserSerializer.Meta):
 *         fields = tuple(
 *             field for field in vst_serializers.OneUserSerializer.Meta.fields             # <<<<<<<<<<<<<<
 *             if field not in ['password']
 *         )
 */
  __pyx_t_7 = __pyx_pf_9polemarch_3api_2v2_11serializers_4Meta_genexpr(NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "polemarch/api/v2/serializers.py":213
 * 
 *     class Meta(vst_serializers.OneUserSerializer.Meta):
 *         fields = tuple(             # <<<<<<<<<<<<<<
 *             field for field in vst_serializers.OneUserSerializer.Meta.fields
 *             if field not in ['password']
 */
  __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_fields, __pyx_t_8) < 0) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":212
 *     email = serializers.EmailField(required=False)
 * 
 *     class Meta(vst_serializers.OneUserSerializer.Meta):             # <<<<<<<<<<<<<<
 *         fields = tuple(
 *             field for field in vst_serializers.OneUserSerializer.Meta.fields
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_Meta, __pyx_t_5, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_8) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":209
 * 
 * 
 * class OneUserSerializer(UserSerializer):             # <<<<<<<<<<<<<<
 *     email = serializers.EmailField(required=False)
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_OneUserSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneUserSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":219
 * 
 * 
 * class CreateUserSerializer(OneUserSerializer):             # <<<<<<<<<<<<<<
 *     password = vst_fields.VSTCharField(write_only=True)
 *     password2 = vst_fields.VSTCharField(write_only=True, label='Repeat password')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_OneUserSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_CreateUserSerializer, __pyx_n_s_CreateUserSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":220
 * 
 * class CreateUserSerializer(OneUserSerializer):
 *     password = vst_fields.VSTCharField(write_only=True)             # <<<<<<<<<<<<<<
 *     password2 = vst_fields.VSTCharField(write_only=True, label='Repeat password')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_write_only, Py_True) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_password, __pyx_t_4) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":221
 * class CreateUserSerializer(OneUserSerializer):
 *     password = vst_fields.VSTCharField(write_only=True)
 *     password2 = vst_fields.VSTCharField(write_only=True, label='Repeat password')             # <<<<<<<<<<<<<<
 * 
 *     class Meta(OneUserSerializer.Meta):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_write_only, Py_True) < 0) __PYX_ERR(0, 221, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_label, __pyx_kp_u_Repeat_password) < 0) __PYX_ERR(0, 221, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_password2, __pyx_t_6) < 0) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":223
 *     password2 = vst_fields.VSTCharField(write_only=True, label='Repeat password')
 * 
 *     class Meta(OneUserSerializer.Meta):             # <<<<<<<<<<<<<<
 *         fields = list(OneUserSerializer.Meta.fields) + ['password', 'password2']
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_OneUserSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Meta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_6, __pyx_n_s_Meta, __pyx_n_s_CreateUserSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":224
 * 
 *     class Meta(OneUserSerializer.Meta):
 *         fields = list(OneUserSerializer.Meta.fields) + ['password', 'password2']             # <<<<<<<<<<<<<<
 * 
 *     def run_validation(self, data=serializers.empty):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_OneUserSerializer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Meta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_fields); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_n_u_password);
  __Pyx_GIVEREF(__pyx_n_u_password);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_u_password);
  __Pyx_INCREF(__pyx_n_u_password2);
  __Pyx_GIVEREF(__pyx_n_u_password2);
  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_n_u_password2);
  __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_fields, __pyx_t_9) < 0) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":223
 *     password2 = vst_fields.VSTCharField(write_only=True, label='Repeat password')
 * 
 *     class Meta(OneUserSerializer.Meta):             # <<<<<<<<<<<<<<
 *         fields = list(OneUserSerializer.Meta.fields) + ['password', 'password2']
 * 
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_Meta, __pyx_t_6, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_9) < 0) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":226
 *         fields = list(OneUserSerializer.Meta.fields) + ['password', 'password2']
 * 
 *     def run_validation(self, data=serializers.empty):             # <<<<<<<<<<<<<<
 *         validated_data = super(CreateUserSerializer, self).run_validation(data)
 *         if validated_data['password'] != validated_data.pop('password2', None):
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_20CreateUserSerializer_1run_validation, 0, __pyx_n_s_CreateUserSerializer_run_validat, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_serializers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_6)->__pyx_arg_data = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_9polemarch_3api_2v2_11serializers_6__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_run_validation, __pyx_t_6) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":219
 * 
 * 
 * class CreateUserSerializer(OneUserSerializer):             # <<<<<<<<<<<<<<
 *     password = vst_fields.VSTCharField(write_only=True)
 *     password2 = vst_fields.VSTCharField(write_only=True, label='Repeat password')
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CreateUserSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CreateUserSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":233
 * 
 * 
 * class ChartLineSettingSerializer(vst_serializers.JsonObjectSerializer):             # <<<<<<<<<<<<<<
 *     active = serializers.BooleanField(default=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_JsonObjectSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_ChartLineSettingSerializer, __pyx_n_s_ChartLineSettingSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":234
 * 
 * class ChartLineSettingSerializer(vst_serializers.JsonObjectSerializer):
 *     active = serializers.BooleanField(default=True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_BooleanField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_default, Py_True) < 0) __PYX_ERR(0, 234, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_active, __pyx_t_4) < 0) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":233
 * 
 * 
 * class ChartLineSettingSerializer(vst_serializers.JsonObjectSerializer):             # <<<<<<<<<<<<<<
 *     active = serializers.BooleanField(default=True)
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ChartLineSettingSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChartLineSettingSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":237
 * 
 * 
 * class ChartLineSettingsSerializer(vst_serializers.JsonObjectSerializer):             # <<<<<<<<<<<<<<
 *     # pylint: disable=invalid-name
 *     all_tasks = ChartLineSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_JsonObjectSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_ChartLineSettingsSerializer, __pyx_n_s_ChartLineSettingsSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":239
 * class ChartLineSettingsSerializer(vst_serializers.JsonObjectSerializer):
 *     # pylint: disable=invalid-name
 *     all_tasks = ChartLineSettingSerializer()             # <<<<<<<<<<<<<<
 *     delay = ChartLineSettingSerializer()
 *     ok = ChartLineSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ChartLineSettingSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_all_tasks, __pyx_t_4) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":240
 *     # pylint: disable=invalid-name
 *     all_tasks = ChartLineSettingSerializer()
 *     delay = ChartLineSettingSerializer()             # <<<<<<<<<<<<<<
 *     ok = ChartLineSettingSerializer()
 *     error = ChartLineSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ChartLineSettingSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_delay, __pyx_t_4) < 0) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":241
 *     all_tasks = ChartLineSettingSerializer()
 *     delay = ChartLineSettingSerializer()
 *     ok = ChartLineSettingSerializer()             # <<<<<<<<<<<<<<
 *     error = ChartLineSettingSerializer()
 *     interrupted = ChartLineSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ChartLineSettingSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ok, __pyx_t_4) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":242
 *     delay = ChartLineSettingSerializer()
 *     ok = ChartLineSettingSerializer()
 *     error = ChartLineSettingSerializer()             # <<<<<<<<<<<<<<
 *     interrupted = ChartLineSettingSerializer()
 *     offline = ChartLineSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ChartLineSettingSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_error, __pyx_t_4) < 0) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":243
 *     ok = ChartLineSettingSerializer()
 *     error = ChartLineSettingSerializer()
 *     interrupted = ChartLineSettingSerializer()             # <<<<<<<<<<<<<<
 *     offline = ChartLineSettingSerializer()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ChartLineSettingSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_interrupted, __pyx_t_4) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":244
 *     error = ChartLineSettingSerializer()
 *     interrupted = ChartLineSettingSerializer()
 *     offline = ChartLineSettingSerializer()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ChartLineSettingSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_offline, __pyx_t_4) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":237
 * 
 * 
 * class ChartLineSettingsSerializer(vst_serializers.JsonObjectSerializer):             # <<<<<<<<<<<<<<
 *     # pylint: disable=invalid-name
 *     all_tasks = ChartLineSettingSerializer()
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ChartLineSettingsSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChartLineSettingsSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":247
 * 
 * 
 * class WidgetSettingSerializer(vst_serializers.JsonObjectSerializer):             # <<<<<<<<<<<<<<
 *     active = serializers.BooleanField(default=True)
 *     collapse = serializers.BooleanField(default=False)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_JsonObjectSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_WidgetSettingSerializer, __pyx_n_s_WidgetSettingSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":248
 * 
 * class WidgetSettingSerializer(vst_serializers.JsonObjectSerializer):
 *     active = serializers.BooleanField(default=True)             # <<<<<<<<<<<<<<
 *     collapse = serializers.BooleanField(default=False)
 *     sort = serializers.IntegerField(default=0)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_serializers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_BooleanField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, Py_True) < 0) __PYX_ERR(0, 248, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_active, __pyx_t_5) < 0) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":249
 * class WidgetSettingSerializer(vst_serializers.JsonObjectSerializer):
 *     active = serializers.BooleanField(default=True)
 *     collapse = serializers.BooleanField(default=False)             # <<<<<<<<<<<<<<
 *     sort = serializers.IntegerField(default=0)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_BooleanField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_default, Py_False) < 0) __PYX_ERR(0, 249, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_collapse, __pyx_t_6) < 0) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":250
 *     active = serializers.BooleanField(default=True)
 *     collapse = serializers.BooleanField(default=False)
 *     sort = serializers.IntegerField(default=0)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_default, __pyx_int_0) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_sort, __pyx_t_4) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":247
 * 
 * 
 * class WidgetSettingSerializer(vst_serializers.JsonObjectSerializer):             # <<<<<<<<<<<<<<
 *     active = serializers.BooleanField(default=True)
 *     collapse = serializers.BooleanField(default=False)
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_WidgetSettingSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WidgetSettingSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":253
 * 
 * 
 * class CounterWidgetSettingSerializer(WidgetSettingSerializer):             # <<<<<<<<<<<<<<
 *     collapse = serializers.BooleanField(default=False, read_only=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_WidgetSettingSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_CounterWidgetSettingSerializer, __pyx_n_s_CounterWidgetSettingSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":254
 * 
 * class CounterWidgetSettingSerializer(WidgetSettingSerializer):
 *     collapse = serializers.BooleanField(default=False, read_only=True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_serializers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_BooleanField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, Py_False) < 0) __PYX_ERR(0, 254, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 254, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_collapse, __pyx_t_5) < 0) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":253
 * 
 * 
 * class CounterWidgetSettingSerializer(WidgetSettingSerializer):             # <<<<<<<<<<<<<<
 *     collapse = serializers.BooleanField(default=False, read_only=True)
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_CounterWidgetSettingSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CounterWidgetSettingSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":257
 * 
 * 
 * class WidgetSettingsSerializer(vst_serializers.JsonObjectSerializer):             # <<<<<<<<<<<<<<
 *     pmwUsersCounter = CounterWidgetSettingSerializer()
 *     pmwProjectsCounter = CounterWidgetSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_JsonObjectSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_WidgetSettingsSerializer, __pyx_n_s_WidgetSettingsSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":258
 * 
 * class WidgetSettingsSerializer(vst_serializers.JsonObjectSerializer):
 *     pmwUsersCounter = CounterWidgetSettingSerializer()             # <<<<<<<<<<<<<<
 *     pmwProjectsCounter = CounterWidgetSettingSerializer()
 *     pmwTemplatesCounter = CounterWidgetSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CounterWidgetSettingSerializer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_pmwUsersCounter, __pyx_t_5) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":259
 * class WidgetSettingsSerializer(vst_serializers.JsonObjectSerializer):
 *     pmwUsersCounter = CounterWidgetSettingSerializer()
 *     pmwProjectsCounter = CounterWidgetSettingSerializer()             # <<<<<<<<<<<<<<
 *     pmwTemplatesCounter = CounterWidgetSettingSerializer()
 *     pmwInventoriesCounter = CounterWidgetSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CounterWidgetSettingSerializer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_pmwProjectsCounter, __pyx_t_5) < 0) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":260
 *     pmwUsersCounter = CounterWidgetSettingSerializer()
 *     pmwProjectsCounter = CounterWidgetSettingSerializer()
 *     pmwTemplatesCounter = CounterWidgetSettingSerializer()             # <<<<<<<<<<<<<<
 *     pmwInventoriesCounter = CounterWidgetSettingSerializer()
 *     pmwGroupsCounter = CounterWidgetSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CounterWidgetSettingSerializer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_pmwTemplatesCounter, __pyx_t_5) < 0) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":261
 *     pmwProjectsCounter = CounterWidgetSettingSerializer()
 *     pmwTemplatesCounter = CounterWidgetSettingSerializer()
 *     pmwInventoriesCounter = CounterWidgetSettingSerializer()             # <<<<<<<<<<<<<<
 *     pmwGroupsCounter = CounterWidgetSettingSerializer()
 *     pmwHostsCounter = CounterWidgetSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CounterWidgetSettingSerializer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_pmwInventoriesCounter, __pyx_t_5) < 0) __PYX_ERR(0, 261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":262
 *     pmwTemplatesCounter = CounterWidgetSettingSerializer()
 *     pmwInventoriesCounter = CounterWidgetSettingSerializer()
 *     pmwGroupsCounter = CounterWidgetSettingSerializer()             # <<<<<<<<<<<<<<
 *     pmwHostsCounter = CounterWidgetSettingSerializer()
 *     pmwChartWidget = WidgetSettingSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CounterWidgetSettingSerializer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_pmwGroupsCounter, __pyx_t_5) < 0) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":263
 *     pmwInventoriesCounter = CounterWidgetSettingSerializer()
 *     pmwGroupsCounter = CounterWidgetSettingSerializer()
 *     pmwHostsCounter = CounterWidgetSettingSerializer()             # <<<<<<<<<<<<<<
 *     pmwChartWidget = WidgetSettingSerializer()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CounterWidgetSettingSerializer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_pmwHostsCounter, __pyx_t_5) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":264
 *     pmwGroupsCounter = CounterWidgetSettingSerializer()
 *     pmwHostsCounter = CounterWidgetSettingSerializer()
 *     pmwChartWidget = WidgetSettingSerializer()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_WidgetSettingSerializer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_pmwChartWidget, __pyx_t_5) < 0) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":257
 * 
 * 
 * class WidgetSettingsSerializer(vst_serializers.JsonObjectSerializer):             # <<<<<<<<<<<<<<
 *     pmwUsersCounter = CounterWidgetSettingSerializer()
 *     pmwProjectsCounter = CounterWidgetSettingSerializer()
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_WidgetSettingsSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WidgetSettingsSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":267
 * 
 * 
 * class UserSettingsSerializer(vst_serializers.JsonObjectSerializer):             # <<<<<<<<<<<<<<
 *     autoupdateInterval = serializers.IntegerField(default=15000)
 *     chartLineSettings = ChartLineSettingsSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_JsonObjectSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_UserSettingsSerializer, __pyx_n_s_UserSettingsSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":268
 * 
 * class UserSettingsSerializer(vst_serializers.JsonObjectSerializer):
 *     autoupdateInterval = serializers.IntegerField(default=15000)             # <<<<<<<<<<<<<<
 *     chartLineSettings = ChartLineSettingsSerializer()
 *     widgetSettings = WidgetSettingsSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_default, __pyx_int_15000) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_autoupdateInterval, __pyx_t_6) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":269
 * class UserSettingsSerializer(vst_serializers.JsonObjectSerializer):
 *     autoupdateInterval = serializers.IntegerField(default=15000)
 *     chartLineSettings = ChartLineSettingsSerializer()             # <<<<<<<<<<<<<<
 *     widgetSettings = WidgetSettingsSerializer()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ChartLineSettingsSerializer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_chartLineSettings, __pyx_t_6) < 0) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":270
 *     autoupdateInterval = serializers.IntegerField(default=15000)
 *     chartLineSettings = ChartLineSettingsSerializer()
 *     widgetSettings = WidgetSettingsSerializer()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_WidgetSettingsSerializer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_widgetSettings, __pyx_t_6) < 0) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":267
 * 
 * 
 * class UserSettingsSerializer(vst_serializers.JsonObjectSerializer):             # <<<<<<<<<<<<<<
 *     autoupdateInterval = serializers.IntegerField(default=15000)
 *     chartLineSettings = ChartLineSettingsSerializer()
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_UserSettingsSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_UserSettingsSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":273
 * 
 * 
 * class TeamSerializer(_WithPermissionsSerializer):             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WithPermissionsSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_TeamSerializer, __pyx_n_s_TeamSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":275
 * class TeamSerializer(_WithPermissionsSerializer):
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.UserGroup
 *         fields = (
 */
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_TeamSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "polemarch/api/v2/serializers.py":276
 * 
 *     class Meta:
 *         model = models.UserGroup             # <<<<<<<<<<<<<<
 *         fields = (
 *             'id',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_UserGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_model, __pyx_t_4) < 0) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":278
 *         model = models.UserGroup
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             "name",
 *         )
 */
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_fields, __pyx_tuple__67) < 0) __PYX_ERR(0, 277, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":275
 * class TeamSerializer(_WithPermissionsSerializer):
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.UserGroup
 *         fields = (
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_4) < 0) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":273
 * 
 * 
 * class TeamSerializer(_WithPermissionsSerializer):             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TeamSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TeamSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":283
 * 
 * 
 * class OneTeamSerializer(TeamSerializer):             # <<<<<<<<<<<<<<
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_TeamSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_OneTeamSerializer, __pyx_n_s_OneTeamSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":284
 * 
 * class OneTeamSerializer(TeamSerializer):
 *     owner = UserSerializer(read_only=True)             # <<<<<<<<<<<<<<
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_UserSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_owner, __pyx_t_5) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":285
 * class OneTeamSerializer(TeamSerializer):
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TextareaField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_notes, __pyx_t_6) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":287
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.UserGroup
 *         fields = (
 */
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_OneTeamSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "polemarch/api/v2/serializers.py":288
 * 
 *     class Meta:
 *         model = models.UserGroup             # <<<<<<<<<<<<<<
 *         fields = (
 *             'id',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_UserGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_model, __pyx_t_4) < 0) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":290
 *         model = models.UserGroup
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             "name",
 *             "notes",
 */
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_fields, __pyx_tuple__68) < 0) __PYX_ERR(0, 289, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":287
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.UserGroup
 *         fields = (
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_4) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":283
 * 
 * 
 * class OneTeamSerializer(TeamSerializer):             # <<<<<<<<<<<<<<
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_OneTeamSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneTeamSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":297
 * 
 * 
 * class HistorySerializer(_SignalSerializer):             # <<<<<<<<<<<<<<
 *     status = serializers.ChoiceField(choices=models.History.statuses, required=False)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SignalSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_HistorySerializer, __pyx_n_s_HistorySerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":298
 * 
 * class HistorySerializer(_SignalSerializer):
 *     status = serializers.ChoiceField(choices=models.History.statuses, required=False)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_History); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_statuses); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_choices, __pyx_t_5) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_status, __pyx_t_5) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":300
 *     status = serializers.ChoiceField(choices=models.History.statuses, required=False)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.History
 *         fields = (
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_HistorySerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":301
 * 
 *     class Meta:
 *         model = models.History             # <<<<<<<<<<<<<<
 *         fields = (
 *             "id",
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_models); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_History); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_model, __pyx_t_4) < 0) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":303
 *         model = models.History
 *         fields = (
 *             "id",             # <<<<<<<<<<<<<<
 *             "start_time",
 *             "executor",
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_fields, __pyx_tuple__69) < 0) __PYX_ERR(0, 302, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":300
 *     status = serializers.ChoiceField(choices=models.History.statuses, required=False)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.History
 *         fields = (
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_4) < 0) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":297
 * 
 * 
 * class HistorySerializer(_SignalSerializer):             # <<<<<<<<<<<<<<
 *     status = serializers.ChoiceField(choices=models.History.statuses, required=False)
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HistorySerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HistorySerializer, __pyx_t_5) < 0) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":318
 * 
 * 
 * class ProjectHistorySerializer(HistorySerializer):             # <<<<<<<<<<<<<<
 *     class Meta(HistorySerializer.Meta):
 *         fields = (
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_HistorySerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_ProjectHistorySerializer, __pyx_n_s_ProjectHistorySerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":319
 * 
 * class ProjectHistorySerializer(HistorySerializer):
 *     class Meta(HistorySerializer.Meta):             # <<<<<<<<<<<<<<
 *         fields = (
 *             "id",
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_HistorySerializer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Meta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_5, __pyx_n_s_Meta, __pyx_n_s_ProjectHistorySerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "polemarch/api/v2/serializers.py":321
 *     class Meta(HistorySerializer.Meta):
 *         fields = (
 *             "id",             # <<<<<<<<<<<<<<
 *             "start_time",
 *             "executor",
 */
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_fields, __pyx_tuple__70) < 0) __PYX_ERR(0, 320, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":319
 * 
 * class ProjectHistorySerializer(HistorySerializer):
 *     class Meta(HistorySerializer.Meta):             # <<<<<<<<<<<<<<
 *         fields = (
 *             "id",
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_Meta, __pyx_t_5, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_9) < 0) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":318
 * 
 * 
 * class ProjectHistorySerializer(HistorySerializer):             # <<<<<<<<<<<<<<
 *     class Meta(HistorySerializer.Meta):
 *         fields = (
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_ProjectHistorySerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProjectHistorySerializer, __pyx_t_5) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":336
 * 
 * 
 * class OneHistorySerializer(_SignalSerializer):             # <<<<<<<<<<<<<<
 *     status = serializers.ChoiceField(choices=models.History.statuses, required=False)
 *     raw_stdout = serializers.SerializerMethodField(read_only=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SignalSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_OneHistorySerializer, __pyx_n_s_OneHistorySerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":337
 * 
 * class OneHistorySerializer(_SignalSerializer):
 *     status = serializers.ChoiceField(choices=models.History.statuses, required=False)             # <<<<<<<<<<<<<<
 *     raw_stdout = serializers.SerializerMethodField(read_only=True)
 *     execution_time = vst_fields.UptimeField()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_models); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_History); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_statuses); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_choices, __pyx_t_6) < 0) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 337, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_status, __pyx_t_6) < 0) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":338
 * class OneHistorySerializer(_SignalSerializer):
 *     status = serializers.ChoiceField(choices=models.History.statuses, required=False)
 *     raw_stdout = serializers.SerializerMethodField(read_only=True)             # <<<<<<<<<<<<<<
 *     execution_time = vst_fields.UptimeField()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_SerializerMethodField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 338, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_raw_stdout, __pyx_t_4) < 0) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":339
 *     status = serializers.ChoiceField(choices=models.History.statuses, required=False)
 *     raw_stdout = serializers.SerializerMethodField(read_only=True)
 *     execution_time = vst_fields.UptimeField()             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_UptimeField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_execution_time, __pyx_t_4) < 0) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":341
 *     execution_time = vst_fields.UptimeField()
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.History
 *         fields = ("id",
 */
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_OneHistorySerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "polemarch/api/v2/serializers.py":342
 * 
 *     class Meta:
 *         model = models.History             # <<<<<<<<<<<<<<
 *         fields = ("id",
 *                   "status",
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_History); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_model, __pyx_t_6) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":343
 *     class Meta:
 *         model = models.History
 *         fields = ("id",             # <<<<<<<<<<<<<<
 *                   "status",
 *                   "executor",
 */
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_fields, __pyx_tuple__71) < 0) __PYX_ERR(0, 343, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":341
 *     execution_time = vst_fields.UptimeField()
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.History
 *         fields = ("id",
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_6) < 0) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":362
 *                   "raw_inventory",)
 * 
 *     def get_raw(self, request):             # <<<<<<<<<<<<<<
 *         return self.instance.get_raw(request.query_params.get("color", "no") == "yes")
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_1get_raw, 0, __pyx_n_s_OneHistorySerializer_get_raw, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_get_raw, __pyx_t_4) < 0) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":365
 *         return self.instance.get_raw(request.query_params.get("color", "no") == "yes")
 * 
 *     def get_raw_stdout(self, obj):             # <<<<<<<<<<<<<<
 *         return self.context.get('request').build_absolute_uri("raw/")
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_3get_raw_stdout, 0, __pyx_n_s_OneHistorySerializer_get_raw_std, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_get_raw_stdout, __pyx_t_4) < 0) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":368
 *         return self.context.get('request').build_absolute_uri("raw/")
 * 
 *     def get_facts(self, request):             # <<<<<<<<<<<<<<
 *         return self.instance.facts
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_20OneHistorySerializer_5get_facts, 0, __pyx_n_s_OneHistorySerializer_get_facts, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_get_facts, __pyx_t_4) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":336
 * 
 * 
 * class OneHistorySerializer(_SignalSerializer):             # <<<<<<<<<<<<<<
 *     status = serializers.ChoiceField(choices=models.History.statuses, required=False)
 *     raw_stdout = serializers.SerializerMethodField(read_only=True)
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OneHistorySerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneHistorySerializer, __pyx_t_4) < 0) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":372
 * 
 * 
 * class HistoryLinesSerializer(_SignalSerializer):             # <<<<<<<<<<<<<<
 *     class Meta:
 *         model = models.HistoryLines
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SignalSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_HistoryLinesSerializer, __pyx_n_s_HistoryLinesSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":373
 * 
 * class HistoryLinesSerializer(_SignalSerializer):
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.HistoryLines
 *         fields = ("line_number",
 */
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_HistoryLinesSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "polemarch/api/v2/serializers.py":374
 * class HistoryLinesSerializer(_SignalSerializer):
 *     class Meta:
 *         model = models.HistoryLines             # <<<<<<<<<<<<<<
 *         fields = ("line_number",
 *                   "line_gnumber",
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_models); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_HistoryLines); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_model, __pyx_t_5) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":375
 *     class Meta:
 *         model = models.HistoryLines
 *         fields = ("line_number",             # <<<<<<<<<<<<<<
 *                   "line_gnumber",
 *                   "line",)
 */
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_fields, __pyx_tuple__78) < 0) __PYX_ERR(0, 375, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":373
 * 
 * class HistoryLinesSerializer(_SignalSerializer):
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.HistoryLines
 *         fields = ("line_number",
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_5) < 0) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":372
 * 
 * 
 * class HistoryLinesSerializer(_SignalSerializer):             # <<<<<<<<<<<<<<
 *     class Meta:
 *         model = models.HistoryLines
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_HistoryLinesSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HistoryLinesSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":380
 * 
 * 
 * class HookSerializer(serializers.ModelSerializer):             # <<<<<<<<<<<<<<
 *     when = serializers.ChoiceField(
 *         choices=list(models.Hook.handlers.when_types_names.items()),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_serializers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ModelSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_HookSerializer, __pyx_n_s_HookSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":381
 * 
 * class HookSerializer(serializers.ModelSerializer):
 *     when = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=list(models.Hook.handlers.when_types_names.items()),
 *         required=False, allow_blank=True, default=None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_serializers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":382
 * class HookSerializer(serializers.ModelSerializer):
 *     when = serializers.ChoiceField(
 *         choices=list(models.Hook.handlers.when_types_names.items()),             # <<<<<<<<<<<<<<
 *         required=False, allow_blank=True, default=None
 *     )
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_models); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_Hook); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_handlers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_when_types_names); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_items); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PySequence_List(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_choices, __pyx_t_9) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":383
 *     when = serializers.ChoiceField(
 *         choices=list(models.Hook.handlers.when_types_names.items()),
 *         required=False, allow_blank=True, default=None             # <<<<<<<<<<<<<<
 *     )
 *     type = serializers.ChoiceField(
 */
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, Py_None) < 0) __PYX_ERR(0, 382, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":381
 * 
 * class HookSerializer(serializers.ModelSerializer):
 *     when = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=list(models.Hook.handlers.when_types_names.items()),
 *         required=False, allow_blank=True, default=None
 */
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_when, __pyx_t_9) < 0) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":385
 *         required=False, allow_blank=True, default=None
 *     )
 *     type = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=[(type, type) for type in models.Hook.handlers.list()]
 *     )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_serializers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":386
 *     )
 *     type = serializers.ChoiceField(
 *         choices=[(type, type) for type in models.Hook.handlers.list()]             # <<<<<<<<<<<<<<
 *     )
 * 
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_models); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Hook); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_handlers); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_list); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 386, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_7))) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 386, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 386, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_11(__pyx_t_7);
      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, 386, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_type, __pyx_t_6) < 0) __PYX_ERR(0, 386, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_type);
    if (unlikely(!__pyx_t_6)) {
      PyErr_Clear();
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_type);
    }
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_type);
    if (unlikely(!__pyx_t_8)) {
      PyErr_Clear();
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_type);
    }
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_8);
    __pyx_t_6 = 0;
    __pyx_t_8 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 386, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_choices, __pyx_t_5) < 0) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":385
 *         required=False, allow_blank=True, default=None
 *     )
 *     type = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=[(type, type) for type in models.Hook.handlers.list()]
 *     )
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_type, __pyx_t_5) < 0) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":389
 *     )
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Hook
 *         fields = (
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_HookSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":390
 * 
 *     class Meta:
 *         model = models.Hook             # <<<<<<<<<<<<<<
 *         fields = (
 *             'id',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_models); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_Hook); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_model, __pyx_t_4) < 0) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":392
 *         model = models.Hook
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'name',
 *             'type',
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_fields, __pyx_tuple__79) < 0) __PYX_ERR(0, 391, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":389
 *     )
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Hook
 *         fields = (
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_4) < 0) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":380
 * 
 * 
 * class HookSerializer(serializers.ModelSerializer):             # <<<<<<<<<<<<<<
 *     when = serializers.ChoiceField(
 *         choices=list(models.Hook.handlers.when_types_names.items()),
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_HookSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HookSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":401
 * 
 * 
 * class VariableSerializer(_SignalSerializer):             # <<<<<<<<<<<<<<
 *     value = MultiTypeField(default="", allow_blank=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SignalSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_VariableSerializer, __pyx_n_s_VariableSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":402
 * 
 * class VariableSerializer(_SignalSerializer):
 *     value = MultiTypeField(default="", allow_blank=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_MultiTypeField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_kp_u__10) < 0) __PYX_ERR(0, 402, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 402, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_value, __pyx_t_9) < 0) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":404
 *     value = MultiTypeField(default="", allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Variable
 *         fields = (
 */
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_VariableSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "polemarch/api/v2/serializers.py":405
 * 
 *     class Meta:
 *         model = models.Variable             # <<<<<<<<<<<<<<
 *         fields = (
 *             'id',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_models); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Variable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_model, __pyx_t_5) < 0) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":407
 *         model = models.Variable
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'key',
 *             'value',
 */
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_fields, __pyx_tuple__80) < 0) __PYX_ERR(0, 406, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":404
 *     value = MultiTypeField(default="", allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Variable
 *         fields = (
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_5) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":412
 *         )
 * 
 *     def to_representation(self, instance):             # <<<<<<<<<<<<<<
 *         result = super(VariableSerializer, self).to_representation(instance)
 *         if instance.key in getattr(instance.content_object, 'HIDDEN_VARS', []):
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_18VariableSerializer_1to_representation, 0, __pyx_n_s_VariableSerializer_to_representa, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_to_representation, __pyx_t_9) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":401
 * 
 * 
 * class VariableSerializer(_SignalSerializer):             # <<<<<<<<<<<<<<
 *     value = MultiTypeField(default="", allow_blank=True)
 * 
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_VariableSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VariableSerializer, __pyx_t_9) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":421
 * 
 * 
 * class InventoryVariableSerializer(VariableSerializer):             # <<<<<<<<<<<<<<
 *     key = vst_fields.AutoCompletionField(autocomplete=models.Variable.variables_keys)
 *     value = vst_fields.DependEnumField(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_VariableSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_InventoryVariableSerializer, __pyx_n_s_InventoryVariableSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":422
 * 
 * class InventoryVariableSerializer(VariableSerializer):
 *     key = vst_fields.AutoCompletionField(autocomplete=models.Variable.variables_keys)             # <<<<<<<<<<<<<<
 *     value = vst_fields.DependEnumField(
 *         allow_blank=True, field='key',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_AutoCompletionField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_models); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_variables_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_autocomplete, __pyx_t_4) < 0) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_key, __pyx_t_4) < 0) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":423
 * class InventoryVariableSerializer(VariableSerializer):
 *     key = vst_fields.AutoCompletionField(autocomplete=models.Variable.variables_keys)
 *     value = vst_fields.DependEnumField(             # <<<<<<<<<<<<<<
 *         allow_blank=True, field='key',
 *         types={
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DependEnumField); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":424
 *     key = vst_fields.AutoCompletionField(autocomplete=models.Variable.variables_keys)
 *     value = vst_fields.DependEnumField(
 *         allow_blank=True, field='key',             # <<<<<<<<<<<<<<
 *         types={
 *             'ansible_ssh_pass': 'password',
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 424, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_field, __pyx_n_u_key) < 0) __PYX_ERR(0, 424, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":426
 *         allow_blank=True, field='key',
 *         types={
 *             'ansible_ssh_pass': 'password',             # <<<<<<<<<<<<<<
 *             'ansible_ssh_private_key_file': 'secretfile',
 *             'ansible_become': 'boolean',
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_ansible_ssh_pass, __pyx_n_u_password) < 0) __PYX_ERR(0, 426, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_ansible_ssh_private_key_file, __pyx_n_u_secretfile) < 0) __PYX_ERR(0, 426, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_ansible_become, __pyx_n_u_boolean) < 0) __PYX_ERR(0, 426, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_ansible_port, __pyx_n_u_integer) < 0) __PYX_ERR(0, 426, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_ansible_become_pass, __pyx_n_u_password) < 0) __PYX_ERR(0, 426, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_types, __pyx_t_5) < 0) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":423
 * class InventoryVariableSerializer(VariableSerializer):
 *     key = vst_fields.AutoCompletionField(autocomplete=models.Variable.variables_keys)
 *     value = vst_fields.DependEnumField(             # <<<<<<<<<<<<<<
 *         allow_blank=True, field='key',
 *         types={
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_value, __pyx_t_5) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":421
 * 
 * 
 * class InventoryVariableSerializer(VariableSerializer):             # <<<<<<<<<<<<<<
 *     key = vst_fields.AutoCompletionField(autocomplete=models.Variable.variables_keys)
 *     value = vst_fields.DependEnumField(
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_InventoryVariableSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InventoryVariableSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":435
 * 
 * 
 * class PeriodicTaskVariableSerializer(VariableSerializer):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_VariableSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_PeriodicTaskVariableSerializer, __pyx_n_s_PeriodicTaskVariableSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PeriodicTaskVariableSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PeriodicTaskVariableSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":439
 * 
 * 
 * class ProjectVariableSerializer(VariableSerializer):             # <<<<<<<<<<<<<<
 *     project_keys = (
 *         ('repo_type', 'Types of repo. Default="MANUAL".'),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_VariableSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_ProjectVariableSerializer, __pyx_n_s_ProjectVariableSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":441
 * class ProjectVariableSerializer(VariableSerializer):
 *     project_keys = (
 *         ('repo_type', 'Types of repo. Default="MANUAL".'),             # <<<<<<<<<<<<<<
 *         ('repo_sync_on_run', "Sync project by every execution."),
 *         ('repo_branch', "[Only for GIT repos] Checkout branch on sync."),
 */
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_project_keys, __pyx_tuple__88) < 0) __PYX_ERR(0, 440, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":447
 *         ('repo_key', "[Only for GIT repos] Key to fetch access."),
 *     )
 *     key = serializers.ChoiceField(choices=project_keys)             # <<<<<<<<<<<<<<
 *     value = vst_fields.DependEnumField(allow_blank=True, field='key', choices={
 *         'repo_type': list(models.Project.repo_handlers.keys()),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_project_keys);
  if (unlikely(!__pyx_t_9)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_project_keys);
  }
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_choices, __pyx_t_9) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_key, __pyx_t_9) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":448
 *     )
 *     key = serializers.ChoiceField(choices=project_keys)
 *     value = vst_fields.DependEnumField(allow_blank=True, field='key', choices={             # <<<<<<<<<<<<<<
 *         'repo_type': list(models.Project.repo_handlers.keys()),
 *         'repo_sync_on_run': [True, False]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DependEnumField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_field, __pyx_n_u_key) < 0) __PYX_ERR(0, 448, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":449
 *     key = serializers.ChoiceField(choices=project_keys)
 *     value = vst_fields.DependEnumField(allow_blank=True, field='key', choices={
 *         'repo_type': list(models.Project.repo_handlers.keys()),             # <<<<<<<<<<<<<<
 *         'repo_sync_on_run': [True, False]
 *     }, types={
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_models); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_Project); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_repo_handlers); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_7 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PySequence_List(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_repo_type, __pyx_t_8) < 0) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":450
 *     value = vst_fields.DependEnumField(allow_blank=True, field='key', choices={
 *         'repo_type': list(models.Project.repo_handlers.keys()),
 *         'repo_sync_on_run': [True, False]             # <<<<<<<<<<<<<<
 *     }, types={
 *         'repo_password': 'password',
 */
  __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  PyList_SET_ITEM(__pyx_t_8, 0, Py_True);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  PyList_SET_ITEM(__pyx_t_8, 1, Py_False);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_repo_sync_on_run, __pyx_t_8) < 0) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_choices, __pyx_t_4) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":452
 *         'repo_sync_on_run': [True, False]
 *     }, types={
 *         'repo_password': 'password',             # <<<<<<<<<<<<<<
 *         'repo_key': 'secretfile'
 *     })
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_repo_password, __pyx_n_u_password) < 0) __PYX_ERR(0, 452, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_u_repo_key, __pyx_n_u_secretfile) < 0) __PYX_ERR(0, 452, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_types, __pyx_t_4) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":448
 *     )
 *     key = serializers.ChoiceField(choices=project_keys)
 *     value = vst_fields.DependEnumField(allow_blank=True, field='key', choices={             # <<<<<<<<<<<<<<
 *         'repo_type': list(models.Project.repo_handlers.keys()),
 *         'repo_sync_on_run': [True, False]
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_value, __pyx_t_4) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":439
 * 
 * 
 * class ProjectVariableSerializer(VariableSerializer):             # <<<<<<<<<<<<<<
 *     project_keys = (
 *         ('repo_type', 'Types of repo. Default="MANUAL".'),
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_ProjectVariableSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProjectVariableSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":457
 * 
 * 
 * class _WithVariablesSerializer(_WithPermissionsSerializer):             # <<<<<<<<<<<<<<
 *     @transaction.atomic
 *     def _do_with_vars(self, method_name, *args, **kwargs):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WithPermissionsSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_WithVariablesSerializer, __pyx_n_s_WithVariablesSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":458
 * 
 * class _WithVariablesSerializer(_WithPermissionsSerializer):
 *     @transaction.atomic             # <<<<<<<<<<<<<<
 *     def _do_with_vars(self, method_name, *args, **kwargs):
 *         method = getattr(super(_WithVariablesSerializer, self), method_name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_transaction); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_atomic); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":459
 * class _WithVariablesSerializer(_WithPermissionsSerializer):
 *     @transaction.atomic
 *     def _do_with_vars(self, method_name, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         method = getattr(super(_WithVariablesSerializer, self), method_name)
 *         instance = method(*args, **kwargs)
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_1_do_with_vars, 0, __pyx_n_s_WithVariablesSerializer__do_wit, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_do_with_vars, __pyx_t_4) < 0) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":464
 *         return instance
 * 
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         return self._do_with_vars("create", validated_data=validated_data)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_3create, 0, __pyx_n_s_WithVariablesSerializer_create, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_create, __pyx_t_4) < 0) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":467
 *         return self._do_with_vars("create", validated_data=validated_data)
 * 
 *     def update(self, instance, validated_data):             # <<<<<<<<<<<<<<
 *         return self._do_with_vars("update", instance, validated_data=validated_data)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_5update, 0, __pyx_n_s_WithVariablesSerializer_update, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_update, __pyx_t_4) < 0) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":470
 *         return self._do_with_vars("update", instance, validated_data=validated_data)
 * 
 *     def get_vars(self, representation):             # <<<<<<<<<<<<<<
 *         return representation.get('vars', None)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_7get_vars, 0, __pyx_n_s_WithVariablesSerializer_get_var, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_get_vars, __pyx_t_4) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":473
 *         return representation.get('vars', None)
 * 
 *     def to_representation(self, instance, hidden_vars=None):             # <<<<<<<<<<<<<<
 *         rep = super(_WithVariablesSerializer, self).to_representation(instance)
 *         hv = hidden_vars
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_24_WithVariablesSerializer_9to_representation, 0, __pyx_n_s_WithVariablesSerializer_to_repr, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__99);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_to_representation, __pyx_t_4) < 0) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":457
 * 
 * 
 * class _WithVariablesSerializer(_WithPermissionsSerializer):             # <<<<<<<<<<<<<<
 *     @transaction.atomic
 *     def _do_with_vars(self, method_name, *args, **kwargs):
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_WithVariablesSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WithVariablesSerializer, __pyx_t_4) < 0) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":485
 * 
 * 
 * class HostSerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     type = serializers.ChoiceField(
 *         choices=list(dict(HOST='One host.', RANGE='Range of hosts.').items()),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_WithVariablesSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_HostSerializer, __pyx_n_s_HostSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":486
 * 
 * class HostSerializer(_WithVariablesSerializer):
 *     type = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=list(dict(HOST='One host.', RANGE='Range of hosts.').items()),
 *         required=False,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_serializers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":487
 * class HostSerializer(_WithVariablesSerializer):
 *     type = serializers.ChoiceField(
 *         choices=list(dict(HOST='One host.', RANGE='Range of hosts.').items()),             # <<<<<<<<<<<<<<
 *         required=False,
 *         default='HOST'
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_HOST, __pyx_kp_u_One_host) < 0) __PYX_ERR(0, 487, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_RANGE, __pyx_kp_u_Range_of_hosts) < 0) __PYX_ERR(0, 487, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyDict_Items(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_choices, __pyx_t_9) < 0) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":488
 *     type = serializers.ChoiceField(
 *         choices=list(dict(HOST='One host.', RANGE='Range of hosts.').items()),
 *         required=False,             # <<<<<<<<<<<<<<
 *         default='HOST'
 *     )
 */
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 487, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_n_u_HOST) < 0) __PYX_ERR(0, 487, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":486
 * 
 * class HostSerializer(_WithVariablesSerializer):
 *     type = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=list(dict(HOST='One host.', RANGE='Range of hosts.').items()),
 *         required=False,
 */
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_type, __pyx_t_9) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":492
 *     )
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Host
 *         fields = ('id',
 */
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_HostSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "polemarch/api/v2/serializers.py":493
 * 
 *     class Meta:
 *         model = models.Host             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_models); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Host); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_model, __pyx_t_5) < 0) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":494
 *     class Meta:
 *         model = models.Host
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'type',)
 */
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_fields, __pyx_tuple__100) < 0) __PYX_ERR(0, 494, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":492
 *     )
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Host
 *         fields = ('id',
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_5) < 0) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":485
 * 
 * 
 * class HostSerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     type = serializers.ChoiceField(
 *         choices=list(dict(HOST='One host.', RANGE='Range of hosts.').items()),
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_HostSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HostSerializer, __pyx_t_9) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":499
 * 
 * 
 * class OneHostSerializer(HostSerializer):             # <<<<<<<<<<<<<<
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_HostSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_OneHostSerializer, __pyx_n_s_OneHostSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":500
 * 
 * class OneHostSerializer(HostSerializer):
 *     owner = UserSerializer(read_only=True)             # <<<<<<<<<<<<<<
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_UserSerializer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_owner, __pyx_t_4) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":501
 * class OneHostSerializer(HostSerializer):
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TextareaField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_notes, __pyx_t_9) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":503
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Host
 *         fields = ('id',
 */
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_OneHostSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "polemarch/api/v2/serializers.py":504
 * 
 *     class Meta:
 *         model = models.Host             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_models); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Host); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_model, __pyx_t_5) < 0) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":505
 *     class Meta:
 *         model = models.Host
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'notes',
 */
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_fields, __pyx_tuple__101) < 0) __PYX_ERR(0, 505, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":503
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Host
 *         fields = ('id',
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_5) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":499
 * 
 * 
 * class OneHostSerializer(HostSerializer):             # <<<<<<<<<<<<<<
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OneHostSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneHostSerializer, __pyx_t_9) < 0) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":512
 * 
 * 
 * class PlaybookSerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     class Meta:
 *         model = models.Task
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_WithVariablesSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_PlaybookSerializer, __pyx_n_s_PlaybookSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":513
 * 
 * class PlaybookSerializer(_WithVariablesSerializer):
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Task
 *         fields = ('id',
 */
  __pyx_t_9 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_PlaybookSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "polemarch/api/v2/serializers.py":514
 * class PlaybookSerializer(_WithVariablesSerializer):
 *     class Meta:
 *         model = models.Task             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Task); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_model, __pyx_t_4) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":515
 *     class Meta:
 *         model = models.Task
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'playbook',)
 */
  if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_fields, __pyx_tuple__102) < 0) __PYX_ERR(0, 515, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":513
 * 
 * class PlaybookSerializer(_WithVariablesSerializer):
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Task
 *         fields = ('id',
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_9, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_4) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":512
 * 
 * 
 * class PlaybookSerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     class Meta:
 *         model = models.Task
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PlaybookSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PlaybookSerializer, __pyx_t_9) < 0) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":520
 * 
 * 
 * class OnePlaybookSerializer(PlaybookSerializer):             # <<<<<<<<<<<<<<
 *     playbook = vst_fields.VSTCharField(read_only=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PlaybookSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_OnePlaybookSerializer, __pyx_n_s_OnePlaybookSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":521
 * 
 * class OnePlaybookSerializer(PlaybookSerializer):
 *     playbook = vst_fields.VSTCharField(read_only=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_playbook, __pyx_t_5) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":523
 *     playbook = vst_fields.VSTCharField(read_only=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Task
 *         fields = ('id',
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_OnePlaybookSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":524
 * 
 *     class Meta:
 *         model = models.Task             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_models); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_Task); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_model, __pyx_t_4) < 0) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":525
 *     class Meta:
 *         model = models.Task
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'playbook',)
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_fields, __pyx_tuple__102) < 0) __PYX_ERR(0, 525, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":523
 *     playbook = vst_fields.VSTCharField(read_only=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Task
 *         fields = ('id',
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_4) < 0) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":520
 * 
 * 
 * class OnePlaybookSerializer(PlaybookSerializer):             # <<<<<<<<<<<<<<
 *     playbook = vst_fields.VSTCharField(read_only=True)
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OnePlaybookSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OnePlaybookSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":530
 * 
 * 
 * class ModuleSerializer(vst_serializers.VSTSerializer):             # <<<<<<<<<<<<<<
 *     class Meta:
 *         model = models.Module
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_VSTSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_ModuleSerializer, __pyx_n_s_ModuleSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":531
 * 
 * class ModuleSerializer(vst_serializers.VSTSerializer):
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Module
 *         fields = (
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_ModuleSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":532
 * class ModuleSerializer(vst_serializers.VSTSerializer):
 *     class Meta:
 *         model = models.Module             # <<<<<<<<<<<<<<
 *         fields = (
 *             'id',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_models); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Module); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_model, __pyx_t_9) < 0) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":534
 *         model = models.Module
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'path',
 *             'name',
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_fields, __pyx_tuple__103) < 0) __PYX_ERR(0, 533, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":531
 * 
 * class ModuleSerializer(vst_serializers.VSTSerializer):
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Module
 *         fields = (
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_9) < 0) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":530
 * 
 * 
 * class ModuleSerializer(vst_serializers.VSTSerializer):             # <<<<<<<<<<<<<<
 *     class Meta:
 *         model = models.Module
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ModuleSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ModuleSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":540
 * 
 * 
 * class OneModuleSerializer(ModuleSerializer):             # <<<<<<<<<<<<<<
 *     data = DataSerializer()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ModuleSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_OneModuleSerializer, __pyx_n_s_OneModuleSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":541
 * 
 * class OneModuleSerializer(ModuleSerializer):
 *     data = DataSerializer()             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_data, __pyx_t_5) < 0) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":543
 *     data = DataSerializer()
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Module
 *         fields = (
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_OneModuleSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":544
 * 
 *     class Meta:
 *         model = models.Module             # <<<<<<<<<<<<<<
 *         fields = (
 *             'id',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_models); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_Module); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_model, __pyx_t_4) < 0) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":546
 *         model = models.Module
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'path',
 *             'name',
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_fields, __pyx_tuple__104) < 0) __PYX_ERR(0, 545, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":543
 *     data = DataSerializer()
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Module
 *         fields = (
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_4) < 0) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":540
 * 
 * 
 * class OneModuleSerializer(ModuleSerializer):             # <<<<<<<<<<<<<<
 *     data = DataSerializer()
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_OneModuleSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneModuleSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":553
 * 
 * 
 * class PeriodictaskSerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     kind = serializers.ChoiceField(
 *         choices=[(k, k) for k in models.PeriodicTask.kinds],
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WithVariablesSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_PeriodictaskSerializer, __pyx_n_s_PeriodictaskSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":554
 * 
 * class PeriodictaskSerializer(_WithVariablesSerializer):
 *     kind = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=[(k, k) for k in models.PeriodicTask.kinds],
 *         required=False,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":555
 * class PeriodictaskSerializer(_WithVariablesSerializer):
 *     kind = serializers.ChoiceField(
 *         choices=[(k, k) for k in models.PeriodicTask.kinds],             # <<<<<<<<<<<<<<
 *         required=False,
 *         default=models.PeriodicTask.kinds[0],
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_models); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_PeriodicTask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_kinds); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
    __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 555, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_7))) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 555, __pyx_L1_error)
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 555, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      } else {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 555, __pyx_L1_error)
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 555, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
      }
    } else {
      __pyx_t_8 = __pyx_t_11(__pyx_t_7);
      if (unlikely(!__pyx_t_8)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 555, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_8);
    }
    if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_k, __pyx_t_8) < 0) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_k);
    if (unlikely(!__pyx_t_8)) {
      PyErr_Clear();
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_k);
    }
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_12 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_k);
    if (unlikely(!__pyx_t_12)) {
      PyErr_Clear();
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_k);
    }
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_12);
    __pyx_t_8 = 0;
    __pyx_t_12 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_choices, __pyx_t_9) < 0) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":556
 *     kind = serializers.ChoiceField(
 *         choices=[(k, k) for k in models.PeriodicTask.kinds],
 *         required=False,             # <<<<<<<<<<<<<<
 *         default=models.PeriodicTask.kinds[0],
 *         label='Task type'
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 555, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":557
 *         choices=[(k, k) for k in models.PeriodicTask.kinds],
 *         required=False,
 *         default=models.PeriodicTask.kinds[0],             # <<<<<<<<<<<<<<
 *         label='Task type'
 *     )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_models); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_PeriodicTask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_kinds); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_default, __pyx_t_7) < 0) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_label, __pyx_kp_u_Task_type) < 0) __PYX_ERR(0, 555, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":554
 * 
 * class PeriodictaskSerializer(_WithVariablesSerializer):
 *     kind = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=[(k, k) for k in models.PeriodicTask.kinds],
 *         required=False,
 */
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_kind, __pyx_t_7) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "polemarch/api/v2/serializers.py":560
 *         label='Task type'
 *     )
 *     type = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=[(k, k) for k in models.PeriodicTask.types],
 *         required=False,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_serializers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "polemarch/api/v2/serializers.py":561
 *     )
 *     type = serializers.ChoiceField(
 *         choices=[(k, k) for k in models.PeriodicTask.types],             # <<<<<<<<<<<<<<
 *         required=False,
 *         default=models.PeriodicTask.types[0],
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_models); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_PeriodicTask); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_types); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
    __pyx_t_6 = __pyx_t_9; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 561, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 561, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 561, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_11(__pyx_t_6);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 561, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_k, __pyx_t_9) < 0) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_k);
    if (unlikely(!__pyx_t_9)) {
      PyErr_Clear();
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_k);
    }
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_12 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_k);
    if (unlikely(!__pyx_t_12)) {
      PyErr_Clear();
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_k);
    }
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_12);
    __pyx_t_9 = 0;
    __pyx_t_12 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 561, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_choices, __pyx_t_4) < 0) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "polemarch/api/v2/serializers.py":562
 *     type = serializers.ChoiceField(
 *         choices=[(k, k) for k in models.PeriodicTask.types],
 *         required=False,             # <<<<<<<<<<<<<<
 *         default=models.PeriodicTask.types[0],
 *         label='Interval type'
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 561, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":563
 *         choices=[(k, k) for k in models.PeriodicTask.types],
 *         required=False,
 *         default=models.PeriodicTask.types[0],             # <<<<<<<<<<<<<<
 *         label='Interval type'
 *     )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_models); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PeriodicTask); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_default, __pyx_t_6) < 0) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_label, __pyx_kp_u_Interval_type) < 0) __PYX_ERR(0, 561, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":560
 *         label='Task type'
 *     )
 *     type = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=[(k, k) for k in models.PeriodicTask.types],
 *         required=False,
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_type, __pyx_t_6) < 0) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":567
 *     )
 * 
 *     template_opt = vst_fields.DependEnumField(             # <<<<<<<<<<<<<<
 *         allow_blank=True, required=False, field='kind', types={
 *             'PLAYBOOK': 'hidden',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_DependEnumField); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":568
 * 
 *     template_opt = vst_fields.DependEnumField(
 *         allow_blank=True, required=False, field='kind', types={             # <<<<<<<<<<<<<<
 *             'PLAYBOOK': 'hidden',
 *             'MODULE': 'hidden',
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 568, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 568, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_field, __pyx_n_u_kind) < 0) __PYX_ERR(0, 568, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":569
 *     template_opt = vst_fields.DependEnumField(
 *         allow_blank=True, required=False, field='kind', types={
 *             'PLAYBOOK': 'hidden',             # <<<<<<<<<<<<<<
 *             'MODULE': 'hidden',
 *             'TEMPLATE': 'autocomplete',
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_PLAYBOOK, __pyx_n_u_hidden) < 0) __PYX_ERR(0, 569, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_MODULE, __pyx_n_u_hidden) < 0) __PYX_ERR(0, 569, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_TEMPLATE, __pyx_n_u_autocomplete) < 0) __PYX_ERR(0, 569, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_types, __pyx_t_5) < 0) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":567
 *     )
 * 
 *     template_opt = vst_fields.DependEnumField(             # <<<<<<<<<<<<<<
 *         allow_blank=True, required=False, field='kind', types={
 *             'PLAYBOOK': 'hidden',
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_template_opt, __pyx_t_5) < 0) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":575
 *     )
 * 
 *     schedule = vst_fields.DependEnumField(             # <<<<<<<<<<<<<<
 *         allow_blank=True, field='type', types={
 *             'CRONTAB': 'crontab',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DependEnumField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":576
 * 
 *     schedule = vst_fields.DependEnumField(
 *         allow_blank=True, field='type', types={             # <<<<<<<<<<<<<<
 *             'CRONTAB': 'crontab',
 *             'INTERVAL': 'integer',
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 576, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_field, __pyx_n_u_type) < 0) __PYX_ERR(0, 576, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":577
 *     schedule = vst_fields.DependEnumField(
 *         allow_blank=True, field='type', types={
 *             'CRONTAB': 'crontab',             # <<<<<<<<<<<<<<
 *             'INTERVAL': 'integer',
 *         }
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_CRONTAB, __pyx_n_u_crontab) < 0) __PYX_ERR(0, 577, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_INTERVAL, __pyx_n_u_integer) < 0) __PYX_ERR(0, 577, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_types, __pyx_t_7) < 0) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "polemarch/api/v2/serializers.py":575
 *     )
 * 
 *     schedule = vst_fields.DependEnumField(             # <<<<<<<<<<<<<<
 *         allow_blank=True, field='type', types={
 *             'CRONTAB': 'crontab',
 */
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_schedule, __pyx_t_7) < 0) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "polemarch/api/v2/serializers.py":582
 *     )
 * 
 *     mode = vst_fields.DependEnumField(             # <<<<<<<<<<<<<<
 *         allow_blank=True, required=False, field='kind', types={
 *             'PLAYBOOK': 'autocomplete',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DependEnumField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "polemarch/api/v2/serializers.py":583
 * 
 *     mode = vst_fields.DependEnumField(
 *         allow_blank=True, required=False, field='kind', types={             # <<<<<<<<<<<<<<
 *             'PLAYBOOK': 'autocomplete',
 *             'MODULE': 'autocomplete',
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 583, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 583, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_field, __pyx_n_u_kind) < 0) __PYX_ERR(0, 583, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":584
 *     mode = vst_fields.DependEnumField(
 *         allow_blank=True, required=False, field='kind', types={
 *             'PLAYBOOK': 'autocomplete',             # <<<<<<<<<<<<<<
 *             'MODULE': 'autocomplete',
 *             'TEMPLATE': 'hidden',
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_PLAYBOOK, __pyx_n_u_autocomplete) < 0) __PYX_ERR(0, 584, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_MODULE, __pyx_n_u_autocomplete) < 0) __PYX_ERR(0, 584, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_TEMPLATE, __pyx_n_u_hidden) < 0) __PYX_ERR(0, 584, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_types, __pyx_t_6) < 0) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":582
 *     )
 * 
 *     mode = vst_fields.DependEnumField(             # <<<<<<<<<<<<<<
 *         allow_blank=True, required=False, field='kind', types={
 *             'PLAYBOOK': 'autocomplete',
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_mode, __pyx_t_6) < 0) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":590
 *     )
 * 
 *     inventory = InventoryDependEnumField(             # <<<<<<<<<<<<<<
 *         allow_blank=True, required=False, field='kind', types={
 *             'PLAYBOOK': 'select2',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_InventoryDependEnumField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "polemarch/api/v2/serializers.py":591
 * 
 *     inventory = InventoryDependEnumField(
 *         allow_blank=True, required=False, field='kind', types={             # <<<<<<<<<<<<<<
 *             'PLAYBOOK': 'select2',
 *             'MODULE': 'select2',
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 591, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 591, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_field, __pyx_n_u_kind) < 0) __PYX_ERR(0, 591, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":592
 *     inventory = InventoryDependEnumField(
 *         allow_blank=True, required=False, field='kind', types={
 *             'PLAYBOOK': 'select2',             # <<<<<<<<<<<<<<
 *             'MODULE': 'select2',
 *             'TEMPLATE': 'hidden',
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_PLAYBOOK, __pyx_n_u_select2) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_MODULE, __pyx_n_u_select2) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_TEMPLATE, __pyx_n_u_hidden) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_types, __pyx_t_5) < 0) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":590
 *     )
 * 
 *     inventory = InventoryDependEnumField(             # <<<<<<<<<<<<<<
 *         allow_blank=True, required=False, field='kind', types={
 *             'PLAYBOOK': 'select2',
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_inventory, __pyx_t_5) < 0) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":598
 *     )
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.PeriodicTask
 *         fields = ('id',
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_PeriodictaskSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":599
 * 
 *     class Meta:
 *         model = models.PeriodicTask             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_models); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_PeriodicTask); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_model, __pyx_t_6) < 0) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":600
 *     class Meta:
 *         model = models.PeriodicTask
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'kind',
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_fields, __pyx_tuple__105) < 0) __PYX_ERR(0, 600, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":598
 *     )
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.PeriodicTask
 *         fields = ('id',
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_6) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":612
 *                   'schedule',)
 * 
 *     @transaction.atomic             # <<<<<<<<<<<<<<
 *     def _do_with_vars(self, *args, **kwargs):
 *         kw = kwargs['validated_data']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_transaction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_atomic); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":613
 * 
 *     @transaction.atomic
 *     def _do_with_vars(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         kw = kwargs['validated_data']
 *         if kw.get('kind', None) == 'TEMPLATE':
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_22PeriodictaskSerializer_1_do_with_vars, 0, __pyx_n_s_PeriodictaskSerializer__do_with, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_do_with_vars, __pyx_t_5) < 0) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":553
 * 
 * 
 * class PeriodictaskSerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     kind = serializers.ChoiceField(
 *         choices=[(k, k) for k in models.PeriodicTask.kinds],
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PeriodictaskSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PeriodictaskSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":622
 * 
 * 
 * class OnePeriodictaskSerializer(PeriodictaskSerializer):             # <<<<<<<<<<<<<<
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PeriodictaskSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_OnePeriodictaskSerializer, __pyx_n_s_OnePeriodictaskSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":623
 * 
 * class OnePeriodictaskSerializer(PeriodictaskSerializer):
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TextareaField); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 623, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 623, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_notes, __pyx_t_6) < 0) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":625
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.PeriodicTask
 *         fields = ('id',
 */
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_OnePeriodictaskSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "polemarch/api/v2/serializers.py":626
 * 
 *     class Meta:
 *         model = models.PeriodicTask             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_PeriodicTask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_model, __pyx_t_7) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "polemarch/api/v2/serializers.py":627
 *     class Meta:
 *         model = models.PeriodicTask
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'kind',
 */
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_fields, __pyx_tuple__108) < 0) __PYX_ERR(0, 627, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":625
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.PeriodicTask
 *         fields = ('id',
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_7) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":640
 *                   'notes',)
 * 
 *     def execute(self):             # <<<<<<<<<<<<<<
 *         inventory = self.instance.inventory
 *         rdata = ExecuteResponseSerializer(data=dict(
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_25OnePeriodictaskSerializer_1execute, 0, __pyx_n_s_OnePeriodictaskSerializer_execut, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_execute, __pyx_t_6) < 0) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":622
 * 
 * 
 * class OnePeriodictaskSerializer(PeriodictaskSerializer):             # <<<<<<<<<<<<<<
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_OnePeriodictaskSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OnePeriodictaskSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":650
 * 
 * 
 * class TemplateSerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     data = DataSerializer(required=True, write_only=True)
 *     options = DataSerializer(write_only=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WithVariablesSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_TemplateSerializer, __pyx_n_s_TemplateSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":651
 * 
 * class TemplateSerializer(_WithVariablesSerializer):
 *     data = DataSerializer(required=True, write_only=True)             # <<<<<<<<<<<<<<
 *     options = DataSerializer(write_only=True)
 *     options_list = serializers.ListField(read_only=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 651, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_write_only, Py_True) < 0) __PYX_ERR(0, 651, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_data, __pyx_t_5) < 0) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":652
 * class TemplateSerializer(_WithVariablesSerializer):
 *     data = DataSerializer(required=True, write_only=True)
 *     options = DataSerializer(write_only=True)             # <<<<<<<<<<<<<<
 *     options_list = serializers.ListField(read_only=True)
 *     kind = serializers.ChoiceField(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_write_only, Py_True) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_options, __pyx_t_6) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":653
 *     data = DataSerializer(required=True, write_only=True)
 *     options = DataSerializer(write_only=True)
 *     options_list = serializers.ListField(read_only=True)             # <<<<<<<<<<<<<<
 *     kind = serializers.ChoiceField(
 *         choices=[(k, k) for k in models.Template.kinds],
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ListField); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_options_list, __pyx_t_5) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":654
 *     options = DataSerializer(write_only=True)
 *     options_list = serializers.ListField(read_only=True)
 *     kind = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=[(k, k) for k in models.Template.kinds],
 *         required=False,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":655
 *     options_list = serializers.ListField(read_only=True)
 *     kind = serializers.ChoiceField(
 *         choices=[(k, k) for k in models.Template.kinds],             # <<<<<<<<<<<<<<
 *         required=False,
 *         default=models.Template.kinds[0],
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_models); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Template); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_kinds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 655, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_8))) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 655, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 655, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_11(__pyx_t_8);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 655, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_k, __pyx_t_4) < 0) __PYX_ERR(0, 655, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_k);
    if (unlikely(!__pyx_t_4)) {
      PyErr_Clear();
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_k);
    }
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_k);
    if (unlikely(!__pyx_t_12)) {
      PyErr_Clear();
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_k);
    }
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_12);
    __pyx_t_4 = 0;
    __pyx_t_12 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 655, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_choices, __pyx_t_7) < 0) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "polemarch/api/v2/serializers.py":656
 *     kind = serializers.ChoiceField(
 *         choices=[(k, k) for k in models.Template.kinds],
 *         required=False,             # <<<<<<<<<<<<<<
 *         default=models.Template.kinds[0],
 *         label='Type'
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 655, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":657
 *         choices=[(k, k) for k in models.Template.kinds],
 *         required=False,
 *         default=models.Template.kinds[0],             # <<<<<<<<<<<<<<
 *         label='Type'
 *     )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_models); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Template); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_kinds); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_default, __pyx_t_8) < 0) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_label, __pyx_n_u_Type) < 0) __PYX_ERR(0, 655, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":654
 *     options = DataSerializer(write_only=True)
 *     options_list = serializers.ListField(read_only=True)
 *     kind = serializers.ChoiceField(             # <<<<<<<<<<<<<<
 *         choices=[(k, k) for k in models.Template.kinds],
 *         required=False,
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_kind, __pyx_t_8) < 0) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":661
 *     )
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Template
 *         fields = (
 */
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_TemplateSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "polemarch/api/v2/serializers.py":662
 * 
 *     class Meta:
 *         model = models.Template             # <<<<<<<<<<<<<<
 *         fields = (
 *             'id',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Template); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_model, __pyx_t_6) < 0) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":664
 *         model = models.Template
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'name',
 *             'kind',
 */
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_fields, __pyx_tuple__111) < 0) __PYX_ERR(0, 663, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":661
 *     )
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Template
 *         fields = (
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_6) < 0) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":672
 *         )
 * 
 *     def get_vars(self, representation):             # <<<<<<<<<<<<<<
 *         try:
 *             return representation['data']['vars']
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_18TemplateSerializer_1get_vars, 0, __pyx_n_s_TemplateSerializer_get_vars, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_get_vars, __pyx_t_8) < 0) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":678
 *             return None
 * 
 *     def set_opts_vars(self, rep, hidden_vars):             # <<<<<<<<<<<<<<
 *         if not rep.get('vars', None):
 *             return rep
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_18TemplateSerializer_3set_opts_vars, 0, __pyx_n_s_TemplateSerializer_set_opts_vars, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_set_opts_vars, __pyx_t_8) < 0) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":687
 *         return rep
 * 
 *     def repr_options(self, instance, data, hidden_vars):             # <<<<<<<<<<<<<<
 *         hv = hidden_vars
 *         hv = instance.HIDDEN_VARS if hv is None else hv
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_18TemplateSerializer_5repr_options, 0, __pyx_n_s_TemplateSerializer_repr_options, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_repr_options, __pyx_t_8) < 0) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":693
 *             data['options'][name] = self.set_opts_vars(rep, hv)
 * 
 *     def to_representation(self, instance):             # <<<<<<<<<<<<<<
 *         data = OrderedDict()
 *         if instance.kind in ["Task", "Module"]:
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_18TemplateSerializer_7to_representation, 0, __pyx_n_s_TemplateSerializer_to_representa, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_to_representation, __pyx_t_8) < 0) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":650
 * 
 * 
 * class TemplateSerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     data = DataSerializer(required=True, write_only=True)
 *     options = DataSerializer(write_only=True)
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TemplateSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateSerializer, __pyx_t_8) < 0) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":704
 * 
 * 
 * class OneTemplateSerializer(TemplateSerializer):             # <<<<<<<<<<<<<<
 *     data = DataSerializer(required=True)
 *     options = DataSerializer(required=False)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_TemplateSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_OneTemplateSerializer, __pyx_n_s_OneTemplateSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":705
 * 
 * class OneTemplateSerializer(TemplateSerializer):
 *     data = DataSerializer(required=True)             # <<<<<<<<<<<<<<
 *     options = DataSerializer(required=False)
 *     options_list = serializers.ListField(read_only=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_data, __pyx_t_5) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":706
 * class OneTemplateSerializer(TemplateSerializer):
 *     data = DataSerializer(required=True)
 *     options = DataSerializer(required=False)             # <<<<<<<<<<<<<<
 *     options_list = serializers.ListField(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 706, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_options, __pyx_t_8) < 0) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":707
 *     data = DataSerializer(required=True)
 *     options = DataSerializer(required=False)
 *     options_list = serializers.ListField(read_only=True)             # <<<<<<<<<<<<<<
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_serializers); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ListField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 707, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_options_list, __pyx_t_5) < 0) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":708
 *     options = DataSerializer(required=False)
 *     options_list = serializers.ListField(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TextareaField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_notes, __pyx_t_6) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":710
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Template
 *         fields = (
 */
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_OneTemplateSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "polemarch/api/v2/serializers.py":711
 * 
 *     class Meta:
 *         model = models.Template             # <<<<<<<<<<<<<<
 *         fields = (
 *             'id',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Template); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_model, __pyx_t_8) < 0) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":713
 *         model = models.Template
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'name',
 *             'notes',
 */
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_fields, __pyx_tuple__120) < 0) __PYX_ERR(0, 712, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":710
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Template
 *         fields = (
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_8) < 0) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":722
 *         )
 * 
 *     def execute(self, request):             # <<<<<<<<<<<<<<
 *         serializer = OneProjectSerializer(self.instance.project)
 *         return self.instance.execute(
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_21OneTemplateSerializer_1execute, 0, __pyx_n_s_OneTemplateSerializer_execute, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_execute, __pyx_t_6) < 0) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":704
 * 
 * 
 * class OneTemplateSerializer(TemplateSerializer):             # <<<<<<<<<<<<<<
 *     data = DataSerializer(required=True)
 *     options = DataSerializer(required=False)
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_OneTemplateSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneTemplateSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":729
 * 
 * 
 * class TemplateExecSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     option = vst_fields.VSTCharField(
 *         help_text='Option name from template options.',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_TemplateExecSerializer, __pyx_n_s_TemplateExecSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":730
 * 
 * class TemplateExecSerializer(DataSerializer):
 *     option = vst_fields.VSTCharField(             # <<<<<<<<<<<<<<
 *         help_text='Option name from template options.',
 *         min_length=0, allow_blank=True,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":731
 * class TemplateExecSerializer(DataSerializer):
 *     option = vst_fields.VSTCharField(
 *         help_text='Option name from template options.',             # <<<<<<<<<<<<<<
 *         min_length=0, allow_blank=True,
 *         required=False
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_help_text, __pyx_kp_u_Option_name_from_template_option) < 0) __PYX_ERR(0, 731, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_min_length, __pyx_int_0) < 0) __PYX_ERR(0, 731, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":732
 *     option = vst_fields.VSTCharField(
 *         help_text='Option name from template options.',
 *         min_length=0, allow_blank=True,             # <<<<<<<<<<<<<<
 *         required=False
 *     )
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 731, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":733
 *         help_text='Option name from template options.',
 *         min_length=0, allow_blank=True,
 *         required=False             # <<<<<<<<<<<<<<
 *     )
 * 
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 731, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":730
 * 
 * class TemplateExecSerializer(DataSerializer):
 *     option = vst_fields.VSTCharField(             # <<<<<<<<<<<<<<
 *         help_text='Option name from template options.',
 *         min_length=0, allow_blank=True,
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_option, __pyx_t_5) < 0) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":729
 * 
 * 
 * class TemplateExecSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     option = vst_fields.VSTCharField(
 *         help_text='Option name from template options.',
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TemplateExecSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateExecSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":740
 * # Subclasses for operations
 * # with hosts and groups
 * class _InventoryOperations(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_WithVariablesSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_InventoryOperations, __pyx_n_s_InventoryOperations, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_InventoryOperations, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InventoryOperations, __pyx_t_5) < 0) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":746
 * ###################################
 * 
 * class GroupSerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     children = serializers.BooleanField(read_only=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WithVariablesSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_GroupSerializer, __pyx_n_s_GroupSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":747
 * 
 * class GroupSerializer(_WithVariablesSerializer):
 *     children = serializers.BooleanField(read_only=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_BooleanField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 747, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_children, __pyx_t_8) < 0) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":749
 *     children = serializers.BooleanField(read_only=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Group
 *         fields = ('id',
 */
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_GroupSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "polemarch/api/v2/serializers.py":750
 * 
 *     class Meta:
 *         model = models.Group             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Group); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_model, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":751
 *     class Meta:
 *         model = models.Group
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'children',)
 */
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_fields, __pyx_tuple__123) < 0) __PYX_ERR(0, 751, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":749
 *     children = serializers.BooleanField(read_only=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Group
 *         fields = ('id',
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_6) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":746
 * ###################################
 * 
 * class GroupSerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 *     children = serializers.BooleanField(read_only=True)
 * 
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_GroupSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_GroupSerializer, __pyx_t_8) < 0) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":756
 * 
 * 
 * class OneGroupSerializer(GroupSerializer, _InventoryOperations):             # <<<<<<<<<<<<<<
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_GroupSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_InventoryOperations); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __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_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_OneGroupSerializer, __pyx_n_s_OneGroupSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "polemarch/api/v2/serializers.py":757
 * 
 * class OneGroupSerializer(GroupSerializer, _InventoryOperations):
 *     owner = UserSerializer(read_only=True)             # <<<<<<<<<<<<<<
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UserSerializer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_owner, __pyx_t_5) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":758
 * class OneGroupSerializer(GroupSerializer, _InventoryOperations):
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TextareaField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 758, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 758, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_notes, __pyx_t_8) < 0) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":760
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Group
 *         fields = ('id',
 */
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_OneGroupSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "polemarch/api/v2/serializers.py":761
 * 
 *     class Meta:
 *         model = models.Group             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Group); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_model, __pyx_t_6) < 0) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":762
 *     class Meta:
 *         model = models.Group
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'notes',
 */
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_fields, __pyx_tuple__124) < 0) __PYX_ERR(0, 762, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":760
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Group
 *         fields = ('id',
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_Meta, __pyx_t_6) < 0) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":768
 *                   'owner',)
 * 
 *     class ValidationException(exceptions.ValidationError):             # <<<<<<<<<<<<<<
 *         status_code = 409
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_exceptions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ValidationError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_8, __pyx_n_s_ValidationException, __pyx_n_s_OneGroupSerializer_ValidationExc, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":769
 * 
 *     class ValidationException(exceptions.ValidationError):
 *         status_code = 409             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_status_code, __pyx_int_409) < 0) __PYX_ERR(0, 769, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":768
 *                   'owner',)
 * 
 *     class ValidationException(exceptions.ValidationError):             # <<<<<<<<<<<<<<
 *         status_code = 409
 * 
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_ValidationException, __pyx_t_8, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ValidationException, __pyx_t_7) < 0) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":756
 * 
 * 
 * class OneGroupSerializer(GroupSerializer, _InventoryOperations):             # <<<<<<<<<<<<<<
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OneGroupSerializer, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneGroupSerializer, __pyx_t_8) < 0) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":772
 * 
 * 
 * class GroupCreateMasterSerializer(OneGroupSerializer):             # <<<<<<<<<<<<<<
 *     children = serializers.BooleanField(write_only=True,
 *                                         label='Contains groups',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OneGroupSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_GroupCreateMasterSerializer, __pyx_n_s_GroupCreateMasterSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "polemarch/api/v2/serializers.py":773
 * 
 * class GroupCreateMasterSerializer(OneGroupSerializer):
 *     children = serializers.BooleanField(write_only=True,             # <<<<<<<<<<<<<<
 *                                         label='Contains groups',
 *                                         default=False)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_serializers); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_BooleanField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_write_only, Py_True) < 0) __PYX_ERR(0, 773, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_label, __pyx_kp_u_Contains_groups) < 0) __PYX_ERR(0, 773, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":775
 *     children = serializers.BooleanField(write_only=True,
 *                                         label='Contains groups',
 *                                         default=False)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_default, Py_False) < 0) __PYX_ERR(0, 773, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":773
 * 
 * class GroupCreateMasterSerializer(OneGroupSerializer):
 *     children = serializers.BooleanField(write_only=True,             # <<<<<<<<<<<<<<
 *                                         label='Contains groups',
 *                                         default=False)
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_children, __pyx_t_5) < 0) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":772
 * 
 * 
 * class GroupCreateMasterSerializer(OneGroupSerializer):             # <<<<<<<<<<<<<<
 *     children = serializers.BooleanField(write_only=True,
 *                                         label='Contains groups',
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_GroupCreateMasterSerializer, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_GroupCreateMasterSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":778
 * 
 * 
 * class InventorySerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WithVariablesSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_InventorySerializer, __pyx_n_s_InventorySerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "polemarch/api/v2/serializers.py":780
 * class InventorySerializer(_WithVariablesSerializer):
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Inventory
 *         fields = ('id',
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_InventorySerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":781
 * 
 *     class Meta:
 *         model = models.Inventory             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_models); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Inventory); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_model, __pyx_t_6) < 0) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":782
 *     class Meta:
 *         model = models.Inventory
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',)
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_fields, __pyx_tuple__67) < 0) __PYX_ERR(0, 782, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":780
 * class InventorySerializer(_WithVariablesSerializer):
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Inventory
 *         fields = ('id',
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_Meta, __pyx_t_6) < 0) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":778
 * 
 * 
 * class InventorySerializer(_WithVariablesSerializer):             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_InventorySerializer, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InventorySerializer, __pyx_t_5) < 0) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":786
 * 
 * 
 * class OneInventorySerializer(InventorySerializer, _InventoryOperations):             # <<<<<<<<<<<<<<
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_InventorySerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_InventoryOperations); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __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_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_OneInventorySerializer, __pyx_n_s_OneInventorySerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":787
 * 
 * class OneInventorySerializer(InventorySerializer, _InventoryOperations):
 *     owner = UserSerializer(read_only=True)             # <<<<<<<<<<<<<<
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_UserSerializer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 787, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_owner, __pyx_t_8) < 0) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":788
 * class OneInventorySerializer(InventorySerializer, _InventoryOperations):
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TextareaField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 788, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 788, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_notes, __pyx_t_5) < 0) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":790
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Inventory
 *         fields = ('id',
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_OneInventorySerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":791
 * 
 *     class Meta:
 *         model = models.Inventory             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_models); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Inventory); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_model, __pyx_t_6) < 0) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":792
 *     class Meta:
 *         model = models.Inventory
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'notes',
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_fields, __pyx_tuple__68) < 0) __PYX_ERR(0, 792, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":790
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Inventory
 *         fields = ('id',
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_6) < 0) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":786
 * 
 * 
 * class OneInventorySerializer(InventorySerializer, _InventoryOperations):             # <<<<<<<<<<<<<<
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OneInventorySerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneInventorySerializer, __pyx_t_5) < 0) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":798
 * 
 * 
 * def list_to_choices(items_list):             # <<<<<<<<<<<<<<
 *     def handler(item):
 *         return (item, item)
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_3list_to_choices, 0, __pyx_n_s_list_to_choices, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_to_choices, __pyx_t_3) < 0) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":805
 * 
 * 
 * class ProjectCreateMasterSerializer(vst_serializers.VSTSerializer):             # <<<<<<<<<<<<<<
 *     types = list_to_choices(models.Project.repo_handlers.keys())
 *     auth_types = list_to_choices(['NONE', 'KEY', 'PASSWORD'])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_VSTSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_ProjectCreateMasterSerializer, __pyx_n_s_ProjectCreateMasterSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":806
 * 
 * class ProjectCreateMasterSerializer(vst_serializers.VSTSerializer):
 *     types = list_to_choices(models.Project.repo_handlers.keys())             # <<<<<<<<<<<<<<
 *     auth_types = list_to_choices(['NONE', 'KEY', 'PASSWORD'])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_list_to_choices); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_models); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Project); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_repo_handlers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_keys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_types, __pyx_t_5) < 0) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":807
 * class ProjectCreateMasterSerializer(vst_serializers.VSTSerializer):
 *     types = list_to_choices(models.Project.repo_handlers.keys())
 *     auth_types = list_to_choices(['NONE', 'KEY', 'PASSWORD'])             # <<<<<<<<<<<<<<
 * 
 *     status = vst_fields.VSTCharField(read_only=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_list_to_choices); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_n_u_NONE);
  __Pyx_GIVEREF(__pyx_n_u_NONE);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_u_NONE);
  __Pyx_INCREF(__pyx_n_u_KEY);
  __Pyx_GIVEREF(__pyx_n_u_KEY);
  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_n_u_KEY);
  __Pyx_INCREF(__pyx_n_u_PASSWORD);
  __Pyx_GIVEREF(__pyx_n_u_PASSWORD);
  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_n_u_PASSWORD);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_auth_types, __pyx_t_5) < 0) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":809
 *     auth_types = list_to_choices(['NONE', 'KEY', 'PASSWORD'])
 * 
 *     status = vst_fields.VSTCharField(read_only=True)             # <<<<<<<<<<<<<<
 *     type = serializers.ChoiceField(choices=types, default='MANUAL', label='Repo type')
 *     repository = vst_fields.VSTCharField(default='MANUAL', label='Repo url')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 809, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_status, __pyx_t_8) < 0) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":810
 * 
 *     status = vst_fields.VSTCharField(read_only=True)
 *     type = serializers.ChoiceField(choices=types, default='MANUAL', label='Repo type')             # <<<<<<<<<<<<<<
 *     repository = vst_fields.VSTCharField(default='MANUAL', label='Repo url')
 *     repo_auth = serializers.ChoiceField(choices=auth_types,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_serializers); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_types);
  if (unlikely(!__pyx_t_6)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_types);
  }
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_choices, __pyx_t_6) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_default, __pyx_n_u_MANUAL) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_label, __pyx_kp_u_Repo_type) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_type, __pyx_t_6) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":811
 *     status = vst_fields.VSTCharField(read_only=True)
 *     type = serializers.ChoiceField(choices=types, default='MANUAL', label='Repo type')
 *     repository = vst_fields.VSTCharField(default='MANUAL', label='Repo url')             # <<<<<<<<<<<<<<
 *     repo_auth = serializers.ChoiceField(choices=auth_types,
 *                                         default='NONE',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_default, __pyx_n_u_MANUAL) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_label, __pyx_kp_u_Repo_url) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_repository, __pyx_t_5) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":812
 *     type = serializers.ChoiceField(choices=types, default='MANUAL', label='Repo type')
 *     repository = vst_fields.VSTCharField(default='MANUAL', label='Repo url')
 *     repo_auth = serializers.ChoiceField(choices=auth_types,             # <<<<<<<<<<<<<<
 *                                         default='NONE',
 *                                         label='Repo auth type',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_n_s_auth_types);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_auth_types);
  }
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_choices, __pyx_t_8) < 0) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_default, __pyx_n_u_NONE) < 0) __PYX_ERR(0, 812, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_label, __pyx_kp_u_Repo_auth_type) < 0) __PYX_ERR(0, 812, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":815
 *                                         default='NONE',
 *                                         label='Repo auth type',
 *                                         write_only=True)             # <<<<<<<<<<<<<<
 *     auth_data = vst_fields.DependEnumField(allow_blank=True,
 *                                            write_only=True,
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_write_only, Py_True) < 0) __PYX_ERR(0, 812, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":812
 *     type = serializers.ChoiceField(choices=types, default='MANUAL', label='Repo type')
 *     repository = vst_fields.VSTCharField(default='MANUAL', label='Repo url')
 *     repo_auth = serializers.ChoiceField(choices=auth_types,             # <<<<<<<<<<<<<<
 *                                         default='NONE',
 *                                         label='Repo auth type',
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_repo_auth, __pyx_t_8) < 0) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":816
 *                                         label='Repo auth type',
 *                                         write_only=True)
 *     auth_data = vst_fields.DependEnumField(allow_blank=True,             # <<<<<<<<<<<<<<
 *                                            write_only=True,
 *                                            default='',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DependEnumField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 816, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":817
 *                                         write_only=True)
 *     auth_data = vst_fields.DependEnumField(allow_blank=True,
 *                                            write_only=True,             # <<<<<<<<<<<<<<
 *                                            default='',
 *                                            field='repo_auth',
 */
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_write_only, Py_True) < 0) __PYX_ERR(0, 816, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_default, __pyx_kp_u__10) < 0) __PYX_ERR(0, 816, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_field, __pyx_n_u_repo_auth) < 0) __PYX_ERR(0, 816, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_label, __pyx_kp_u_Repo_auth_data) < 0) __PYX_ERR(0, 816, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":822
 *                                            label='Repo auth data',
 *                                            types={
 *                                                'KEY': 'secretfile',             # <<<<<<<<<<<<<<
 *                                                'PASSWORD': 'password',
 *                                                'NONE': 'disabled'
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_KEY, __pyx_n_u_secretfile) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_PASSWORD, __pyx_n_u_password) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_NONE, __pyx_n_u_disabled) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_types, __pyx_t_6) < 0) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":816
 *                                         label='Repo auth type',
 *                                         write_only=True)
 *     auth_data = vst_fields.DependEnumField(allow_blank=True,             # <<<<<<<<<<<<<<
 *                                            write_only=True,
 *                                            default='',
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_auth_data, __pyx_t_6) < 0) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":827
 *                                            })
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Project
 *         fields = (
 */
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_ProjectCreateMasterSerializer_Me, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "polemarch/api/v2/serializers.py":828
 * 
 *     class Meta:
 *         model = models.Project             # <<<<<<<<<<<<<<
 *         fields = (
 *             'id',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_models); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Project); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_model, __pyx_t_5) < 0) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":830
 *         model = models.Project
 *         fields = (
 *             'id',             # <<<<<<<<<<<<<<
 *             'name',
 *             'status',
 */
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_fields, __pyx_tuple__127) < 0) __PYX_ERR(0, 829, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":839
 *         )
 *         extra_kwargs = {
 *             'name': {'required': True}             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_required, Py_True) < 0) __PYX_ERR(0, 839, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_name, __pyx_t_8) < 0) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_extra_kwargs, __pyx_t_5) < 0) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":827
 *                                            })
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Project
 *         fields = (
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_5) < 0) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":842
 *         }
 * 
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         repo_type = validated_data.pop('type')
 *         repo_auth_type = validated_data.pop('repo_auth')
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_29ProjectCreateMasterSerializer_1create, 0, __pyx_n_s_ProjectCreateMasterSerializer_cr, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_create, __pyx_t_6) < 0) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":805
 * 
 * 
 * class ProjectCreateMasterSerializer(vst_serializers.VSTSerializer):             # <<<<<<<<<<<<<<
 *     types = list_to_choices(models.Project.repo_handlers.keys())
 *     auth_types = list_to_choices(['NONE', 'KEY', 'PASSWORD'])
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ProjectCreateMasterSerializer, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProjectCreateMasterSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":855
 * 
 * 
 * class ProjectSerializer(_InventoryOperations):             # <<<<<<<<<<<<<<
 *     status = serializers.ChoiceField(read_only=True, choices=models.Project.STATUSES)
 *     type   = vst_fields.VSTCharField(read_only=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_InventoryOperations); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_ProjectSerializer, __pyx_n_s_ProjectSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "polemarch/api/v2/serializers.py":856
 * 
 * class ProjectSerializer(_InventoryOperations):
 *     status = serializers.ChoiceField(read_only=True, choices=models.Project.STATUSES)             # <<<<<<<<<<<<<<
 *     type   = vst_fields.VSTCharField(read_only=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ChoiceField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_models); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Project); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_STATUSES); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_choices, __pyx_t_8) < 0) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_status, __pyx_t_8) < 0) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":857
 * class ProjectSerializer(_InventoryOperations):
 *     status = serializers.ChoiceField(read_only=True, choices=models.Project.STATUSES)
 *     type   = vst_fields.VSTCharField(read_only=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 857, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_type, __pyx_t_5) < 0) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":859
 *     type   = vst_fields.VSTCharField(read_only=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Project
 *         fields = ('id',
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_ProjectSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "polemarch/api/v2/serializers.py":860
 * 
 *     class Meta:
 *         model = models.Project             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_models); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Project); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_model, __pyx_t_6) < 0) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":861
 *     class Meta:
 *         model = models.Project
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'type',
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_fields, __pyx_tuple__130) < 0) __PYX_ERR(0, 861, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":859
 *     type   = vst_fields.VSTCharField(read_only=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Project
 *         fields = ('id',
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Meta, __pyx_t_6) < 0) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":866
 *                   'status',)
 * 
 *     @transaction.atomic             # <<<<<<<<<<<<<<
 *     def _do_with_vars(self, *args, **kw):
 *         instance = super(ProjectSerializer, self)._do_with_vars(*args, **kw)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_transaction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_atomic); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":867
 * 
 *     @transaction.atomic
 *     def _do_with_vars(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         instance = super(ProjectSerializer, self)._do_with_vars(*args, **kw)
 *         return instance if instance.repo_class else None
 */
  __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_17ProjectSerializer_1_do_with_vars, 0, __pyx_n_s_ProjectSerializer__do_with_vars, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_do_with_vars, __pyx_t_5) < 0) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":855
 * 
 * 
 * class ProjectSerializer(_InventoryOperations):             # <<<<<<<<<<<<<<
 *     status = serializers.ChoiceField(read_only=True, choices=models.Project.STATUSES)
 *     type   = vst_fields.VSTCharField(read_only=True)
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_ProjectSerializer, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProjectSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "polemarch/api/v2/serializers.py":872
 * 
 * 
 * class OneProjectSerializer(ProjectSerializer, _InventoryOperations):             # <<<<<<<<<<<<<<
 *     repository  = vst_fields.VSTCharField(default='MANUAL')
 *     owner = UserSerializer(read_only=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProjectSerializer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_InventoryOperations); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __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_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_OneProjectSerializer, __pyx_n_s_OneProjectSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":873
 * 
 * class OneProjectSerializer(ProjectSerializer, _InventoryOperations):
 *     repository  = vst_fields.VSTCharField(default='MANUAL')             # <<<<<<<<<<<<<<
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_default, __pyx_n_u_MANUAL) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_repository, __pyx_t_6) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":874
 * class OneProjectSerializer(ProjectSerializer, _InventoryOperations):
 *     repository  = vst_fields.VSTCharField(default='MANUAL')
 *     owner = UserSerializer(read_only=True)             # <<<<<<<<<<<<<<
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 *     readme_content = vst_fields.HtmlField(read_only=True, label='Information')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_UserSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 874, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_owner, __pyx_t_8) < 0) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":875
 *     repository  = vst_fields.VSTCharField(default='MANUAL')
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)             # <<<<<<<<<<<<<<
 *     readme_content = vst_fields.HtmlField(read_only=True, label='Information')
 *     execute_view_data = vst_serializers.DataSerializer(read_only=True, allow_null=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TextareaField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_required, Py_False) < 0) __PYX_ERR(0, 875, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_allow_blank, Py_True) < 0) __PYX_ERR(0, 875, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_notes, __pyx_t_6) < 0) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":876
 *     owner = UserSerializer(read_only=True)
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 *     readme_content = vst_fields.HtmlField(read_only=True, label='Information')             # <<<<<<<<<<<<<<
 *     execute_view_data = vst_serializers.DataSerializer(read_only=True, allow_null=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_HtmlField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 876, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_label, __pyx_n_u_Information) < 0) __PYX_ERR(0, 876, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_readme_content, __pyx_t_5) < 0) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":877
 *     notes = vst_fields.TextareaField(required=False, allow_blank=True)
 *     readme_content = vst_fields.HtmlField(read_only=True, label='Information')
 *     execute_view_data = vst_serializers.DataSerializer(read_only=True, allow_null=True)             # <<<<<<<<<<<<<<
 * 
 *     class Meta:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_read_only, Py_True) < 0) __PYX_ERR(0, 877, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_allow_null, Py_True) < 0) __PYX_ERR(0, 877, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_execute_view_data, __pyx_t_8) < 0) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":879
 *     execute_view_data = vst_serializers.DataSerializer(read_only=True, allow_null=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Project
 *         fields = ('id',
 */
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Meta, __pyx_n_s_OneProjectSerializer_Meta, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "polemarch/api/v2/serializers.py":880
 * 
 *     class Meta:
 *         model = models.Project             # <<<<<<<<<<<<<<
 *         fields = ('id',
 *                   'name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_models); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Project); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_model, __pyx_t_6) < 0) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":881
 *     class Meta:
 *         model = models.Project
 *         fields = ('id',             # <<<<<<<<<<<<<<
 *                   'name',
 *                   'repository',
 */
  if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_fields, __pyx_tuple__133) < 0) __PYX_ERR(0, 881, __pyx_L1_error)

  /* "polemarch/api/v2/serializers.py":879
 *     execute_view_data = vst_serializers.DataSerializer(read_only=True, allow_null=True)
 * 
 *     class Meta:             # <<<<<<<<<<<<<<
 *         model = models.Project
 *         fields = ('id',
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Meta, __pyx_empty_tuple, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_Meta, __pyx_t_6) < 0) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":892
 *                   'execute_view_data',)
 * 
 *     @transaction.atomic()             # <<<<<<<<<<<<<<
 *     def sync(self):
 *         self.instance.start_repo_task("sync")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_transaction); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_atomic); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":893
 * 
 *     @transaction.atomic()
 *     def sync(self):             # <<<<<<<<<<<<<<
 *         self.instance.start_repo_task("sync")
 *         serializer = ActionResponseSerializer(
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_1sync, 0, __pyx_n_s_OneProjectSerializer_sync, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_sync, __pyx_t_8) < 0) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":901
 *         return Response(serializer.data, status.HTTP_200_OK)
 * 
 *     def _get_execution_inventory(self, template, inventory, user):             # <<<<<<<<<<<<<<
 *         if template or inventory is None:
 *             return inventory
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_3_get_execution_inventory, 0, __pyx_n_s_OneProjectSerializer__get_execut, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_get_execution_inventory, __pyx_t_8) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":914
 *         return inventory
 * 
 *     def _execution(self, kind, data, user, **kwargs):             # <<<<<<<<<<<<<<
 *         template = kwargs.pop("template", None)
 *         inventory = self._get_execution_inventory(
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_5_execution, 0, __pyx_n_s_OneProjectSerializer__execution, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_execution, __pyx_t_8) < 0) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":951
 *         return Response(rdata.data, status.HTTP_201_CREATED)
 * 
 *     def execute_playbook(self, request):             # <<<<<<<<<<<<<<
 *         return self._execution("playbook", dict(request.data), request.user)
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_7execute_playbook, 0, __pyx_n_s_OneProjectSerializer_execute_pla, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_execute_playbook, __pyx_t_8) < 0) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":954
 *         return self._execution("playbook", dict(request.data), request.user)
 * 
 *     def execute_module(self, request):             # <<<<<<<<<<<<<<
 *         return self._execution("module", dict(request.data), request.user)
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_20OneProjectSerializer_9execute_module, 0, __pyx_n_s_OneProjectSerializer_execute_mod, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_execute_module, __pyx_t_8) < 0) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":872
 * 
 * 
 * class OneProjectSerializer(ProjectSerializer, _InventoryOperations):             # <<<<<<<<<<<<<<
 *     repository  = vst_fields.VSTCharField(default='MANUAL')
 *     owner = UserSerializer(read_only=True)
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_OneProjectSerializer, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneProjectSerializer, __pyx_t_8) < 0) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":958
 * 
 * 
 * ansible_reference = AnsibleArgumentsReference()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AnsibleArgumentsReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ansible_reference, __pyx_t_3) < 0) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":961
 * 
 * 
 * def generate_fileds(ansible_type):             # <<<<<<<<<<<<<<
 *     if ansible_type is None:
 *         return OrderedDict()
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_5generate_fileds, 0, __pyx_n_s_generate_fileds, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_fileds, __pyx_t_3) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1004
 * 
 * 
 * class AnsibleSerializerMetaclass(serializers.SerializerMetaclass):             # <<<<<<<<<<<<<<
 *     # pylint: disable=super-on-old-class
 *     @staticmethod
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_serializers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SerializerMetaclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_AnsibleSerializerMetaclass, __pyx_n_s_AnsibleSerializerMetaclass, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1007
 *     # pylint: disable=super-on-old-class
 *     @staticmethod
 *     def __new__(cls, name, bases, attrs):             # <<<<<<<<<<<<<<
 *         ansible_type = None
 *         if isinstance(attrs.get('playbook', None), serializers.CharField):
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_26AnsibleSerializerMetaclass_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_AnsibleSerializerMetaclass___new, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "polemarch/api/v2/serializers.py":1006
 * class AnsibleSerializerMetaclass(serializers.SerializerMetaclass):
 *     # pylint: disable=super-on-old-class
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def __new__(cls, name, bases, attrs):
 *         ansible_type = None
 */
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_new, __pyx_t_6) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1004
 * 
 * 
 * class AnsibleSerializerMetaclass(serializers.SerializerMetaclass):             # <<<<<<<<<<<<<<
 *     # pylint: disable=super-on-old-class
 *     @staticmethod
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AnsibleSerializerMetaclass, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AnsibleSerializerMetaclass, __pyx_t_6) < 0) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1018
 * 
 * @six.add_metaclass(AnsibleSerializerMetaclass)
 * class _AnsibleSerializer(serializers.Serializer):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_serializers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Serializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_AnsibleSerializer, __pyx_n_s_AnsibleSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1017
 * 
 * 
 * @six.add_metaclass(AnsibleSerializerMetaclass)             # <<<<<<<<<<<<<<
 * class _AnsibleSerializer(serializers.Serializer):
 *     pass
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_six); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_add_metaclass); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_AnsibleSerializerMetaclass); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":1018
 * 
 * @six.add_metaclass(AnsibleSerializerMetaclass)
 * class _AnsibleSerializer(serializers.Serializer):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AnsibleSerializer, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AnsibleSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1022
 * 
 * 
 * class AnsiblePlaybookSerializer(_AnsibleSerializer):             # <<<<<<<<<<<<<<
 *     playbook = vst_fields.AutoCompletionField(required=True, autocomplete='Playbook',
 *                                               autocomplete_property='playbook')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_AnsibleSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_AnsiblePlaybookSerializer, __pyx_n_s_AnsiblePlaybookSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1023
 * 
 * class AnsiblePlaybookSerializer(_AnsibleSerializer):
 *     playbook = vst_fields.AutoCompletionField(required=True, autocomplete='Playbook',             # <<<<<<<<<<<<<<
 *                                               autocomplete_property='playbook')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_AutoCompletionField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 1023, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_autocomplete, __pyx_n_u_Playbook) < 0) __PYX_ERR(0, 1023, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_autocomplete_property, __pyx_n_u_playbook) < 0) __PYX_ERR(0, 1023, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_playbook, __pyx_t_5) < 0) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":1022
 * 
 * 
 * class AnsiblePlaybookSerializer(_AnsibleSerializer):             # <<<<<<<<<<<<<<
 *     playbook = vst_fields.AutoCompletionField(required=True, autocomplete='Playbook',
 *                                               autocomplete_property='playbook')
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_AnsiblePlaybookSerializer, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AnsiblePlaybookSerializer, __pyx_t_5) < 0) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":1027
 * 
 * 
 * class AnsibleModuleSerializer(_AnsibleSerializer):             # <<<<<<<<<<<<<<
 *     module = vst_fields.AutoCompletionField(required=True, autocomplete='Module',
 *                                             autocomplete_property='name',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_AnsibleSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_AnsibleModuleSerializer, __pyx_n_s_AnsibleModuleSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1028
 * 
 * class AnsibleModuleSerializer(_AnsibleSerializer):
 *     module = vst_fields.AutoCompletionField(required=True, autocomplete='Module',             # <<<<<<<<<<<<<<
 *                                             autocomplete_property='name',
 *                                             autocomplete_represent='path')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_AutoCompletionField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 1028, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_autocomplete, __pyx_n_u_Module) < 0) __PYX_ERR(0, 1028, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_autocomplete_property, __pyx_n_u_name) < 0) __PYX_ERR(0, 1028, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_autocomplete_represent, __pyx_n_u_path) < 0) __PYX_ERR(0, 1028, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_module, __pyx_t_8) < 0) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1027
 * 
 * 
 * class AnsibleModuleSerializer(_AnsibleSerializer):             # <<<<<<<<<<<<<<
 *     module = vst_fields.AutoCompletionField(required=True, autocomplete='Module',
 *                                             autocomplete_property='name',
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AnsibleModuleSerializer, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AnsibleModuleSerializer, __pyx_t_8) < 0) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1033
 * 
 * 
 * class BaseDashboardJobSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     status = serializers.CharField()
 *     sum = serializers.IntegerField()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_BaseDashboardJobSerializer, __pyx_n_s_BaseDashboardJobSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1034
 * 
 * class BaseDashboardJobSerializer(DataSerializer):
 *     status = serializers.CharField()             # <<<<<<<<<<<<<<
 *     sum = serializers.IntegerField()
 *     all = serializers.IntegerField()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_CharField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_status, __pyx_t_8) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1035
 * class BaseDashboardJobSerializer(DataSerializer):
 *     status = serializers.CharField()
 *     sum = serializers.IntegerField()             # <<<<<<<<<<<<<<
 *     all = serializers.IntegerField()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_8 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_sum, __pyx_t_8) < 0) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1036
 *     status = serializers.CharField()
 *     sum = serializers.IntegerField()
 *     all = serializers.IntegerField()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_all, __pyx_t_8) < 0) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1033
 * 
 * 
 * class BaseDashboardJobSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     status = serializers.CharField()
 *     sum = serializers.IntegerField()
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_BaseDashboardJobSerializer, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BaseDashboardJobSerializer, __pyx_t_8) < 0) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":1039
 * 
 * 
 * class DayDashboardJobSerializer(BaseDashboardJobSerializer):             # <<<<<<<<<<<<<<
 *     day = serializers.DateTimeField()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseDashboardJobSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_DayDashboardJobSerializer, __pyx_n_s_DayDashboardJobSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1040
 * 
 * class DayDashboardJobSerializer(BaseDashboardJobSerializer):
 *     day = serializers.DateTimeField()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_DateTimeField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_8 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_day, __pyx_t_8) < 0) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1039
 * 
 * 
 * class DayDashboardJobSerializer(BaseDashboardJobSerializer):             # <<<<<<<<<<<<<<
 *     day = serializers.DateTimeField()
 * 
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DayDashboardJobSerializer, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DayDashboardJobSerializer, __pyx_t_8) < 0) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1043
 * 
 * 
 * class MonthDashboardJobSerializer(BaseDashboardJobSerializer):             # <<<<<<<<<<<<<<
 *     month = serializers.DateTimeField()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_BaseDashboardJobSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_MonthDashboardJobSerializer, __pyx_n_s_MonthDashboardJobSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1044
 * 
 * class MonthDashboardJobSerializer(BaseDashboardJobSerializer):
 *     month = serializers.DateTimeField()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_DateTimeField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_month, __pyx_t_8) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1043
 * 
 * 
 * class MonthDashboardJobSerializer(BaseDashboardJobSerializer):             # <<<<<<<<<<<<<<
 *     month = serializers.DateTimeField()
 * 
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_MonthDashboardJobSerializer, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MonthDashboardJobSerializer, __pyx_t_8) < 0) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":1047
 * 
 * 
 * class YearDashboardJobSerializer(BaseDashboardJobSerializer):             # <<<<<<<<<<<<<<
 *     year = serializers.DateTimeField()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BaseDashboardJobSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_YearDashboardJobSerializer, __pyx_n_s_YearDashboardJobSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1048
 * 
 * class YearDashboardJobSerializer(BaseDashboardJobSerializer):
 *     year = serializers.DateTimeField()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_serializers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_DateTimeField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_8 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_year, __pyx_t_8) < 0) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1047
 * 
 * 
 * class YearDashboardJobSerializer(BaseDashboardJobSerializer):             # <<<<<<<<<<<<<<
 *     year = serializers.DateTimeField()
 * 
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_YearDashboardJobSerializer, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_YearDashboardJobSerializer, __pyx_t_8) < 0) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1051
 * 
 * 
 * class DashboardJobsSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     day = DayDashboardJobSerializer(many=True)
 *     month = MonthDashboardJobSerializer(many=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_DashboardJobsSerializer, __pyx_n_s_DashboardJobsSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1052
 * 
 * class DashboardJobsSerializer(DataSerializer):
 *     day = DayDashboardJobSerializer(many=True)             # <<<<<<<<<<<<<<
 *     month = MonthDashboardJobSerializer(many=True)
 *     year = YearDashboardJobSerializer(many=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_DayDashboardJobSerializer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_many, Py_True) < 0) __PYX_ERR(0, 1052, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_day, __pyx_t_6) < 0) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1053
 * class DashboardJobsSerializer(DataSerializer):
 *     day = DayDashboardJobSerializer(many=True)
 *     month = MonthDashboardJobSerializer(many=True)             # <<<<<<<<<<<<<<
 *     year = YearDashboardJobSerializer(many=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_MonthDashboardJobSerializer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_many, Py_True) < 0) __PYX_ERR(0, 1053, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_month, __pyx_t_8) < 0) __PYX_ERR(0, 1053, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1054
 *     day = DayDashboardJobSerializer(many=True)
 *     month = MonthDashboardJobSerializer(many=True)
 *     year = YearDashboardJobSerializer(many=True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_YearDashboardJobSerializer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_many, Py_True) < 0) __PYX_ERR(0, 1054, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_year, __pyx_t_6) < 0) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1051
 * 
 * 
 * class DashboardJobsSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     day = DayDashboardJobSerializer(many=True)
 *     month = MonthDashboardJobSerializer(many=True)
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_DashboardJobsSerializer, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DashboardJobsSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":1057
 * 
 * 
 * class DashboardStatisticSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     projects = serializers.IntegerField()
 *     templates = serializers.IntegerField()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_DashboardStatisticSerializer, __pyx_n_s_DashboardStatisticSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1058
 * 
 * class DashboardStatisticSerializer(DataSerializer):
 *     projects = serializers.IntegerField()             # <<<<<<<<<<<<<<
 *     templates = serializers.IntegerField()
 *     inventories = serializers.IntegerField()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_projects, __pyx_t_6) < 0) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1059
 * class DashboardStatisticSerializer(DataSerializer):
 *     projects = serializers.IntegerField()
 *     templates = serializers.IntegerField()             # <<<<<<<<<<<<<<
 *     inventories = serializers.IntegerField()
 *     groups = serializers.IntegerField()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_serializers); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_templates, __pyx_t_6) < 0) __PYX_ERR(0, 1059, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1060
 *     projects = serializers.IntegerField()
 *     templates = serializers.IntegerField()
 *     inventories = serializers.IntegerField()             # <<<<<<<<<<<<<<
 *     groups = serializers.IntegerField()
 *     hosts = serializers.IntegerField()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_inventories, __pyx_t_6) < 0) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1061
 *     templates = serializers.IntegerField()
 *     inventories = serializers.IntegerField()
 *     groups = serializers.IntegerField()             # <<<<<<<<<<<<<<
 *     hosts = serializers.IntegerField()
 *     teams = serializers.IntegerField()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_serializers); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_groups, __pyx_t_6) < 0) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1062
 *     inventories = serializers.IntegerField()
 *     groups = serializers.IntegerField()
 *     hosts = serializers.IntegerField()             # <<<<<<<<<<<<<<
 *     teams = serializers.IntegerField()
 *     users = serializers.IntegerField()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_hosts, __pyx_t_6) < 0) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1063
 *     groups = serializers.IntegerField()
 *     hosts = serializers.IntegerField()
 *     teams = serializers.IntegerField()             # <<<<<<<<<<<<<<
 *     users = serializers.IntegerField()
 *     jobs = DashboardJobsSerializer()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_serializers); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_teams, __pyx_t_6) < 0) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1064
 *     hosts = serializers.IntegerField()
 *     teams = serializers.IntegerField()
 *     users = serializers.IntegerField()             # <<<<<<<<<<<<<<
 *     jobs = DashboardJobsSerializer()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_IntegerField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_users, __pyx_t_6) < 0) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1065
 *     teams = serializers.IntegerField()
 *     users = serializers.IntegerField()
 *     jobs = DashboardJobsSerializer()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_DashboardJobsSerializer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_jobs, __pyx_t_6) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "polemarch/api/v2/serializers.py":1057
 * 
 * 
 * class DashboardStatisticSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     projects = serializers.IntegerField()
 *     templates = serializers.IntegerField()
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DashboardStatisticSerializer, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DashboardStatisticSerializer, __pyx_t_6) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "polemarch/api/v2/serializers.py":1068
 * 
 * 
 * class InventoryImportSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     inventory_id = vst_fields.RedirectIntegerField(default=None, allow_null=True)
 *     name = serializers.CharField(required=True)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DataSerializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_InventoryImportSerializer, __pyx_n_s_InventoryImportSerializer, (PyObject *) NULL, __pyx_n_s_polemarch_api_v2_serializers, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "polemarch/api/v2/serializers.py":1069
 * 
 * class InventoryImportSerializer(DataSerializer):
 *     inventory_id = vst_fields.RedirectIntegerField(default=None, allow_null=True)             # <<<<<<<<<<<<<<
 *     name = serializers.CharField(required=True)
 *     raw_data = vst_fields.VSTCharField()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_RedirectIntegerField); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_default, Py_None) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_allow_null, Py_True) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_inventory_id, __pyx_t_5) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "polemarch/api/v2/serializers.py":1070
 * class InventoryImportSerializer(DataSerializer):
 *     inventory_id = vst_fields.RedirectIntegerField(default=None, allow_null=True)
 *     name = serializers.CharField(required=True)             # <<<<<<<<<<<<<<
 *     raw_data = vst_fields.VSTCharField()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_serializers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_CharField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_required, Py_True) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_name, __pyx_t_8) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1071
 *     inventory_id = vst_fields.RedirectIntegerField(default=None, allow_null=True)
 *     name = serializers.CharField(required=True)
 *     raw_data = vst_fields.VSTCharField()             # <<<<<<<<<<<<<<
 * 
 *     @transaction.atomic()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_vst_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_VSTCharField); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_raw_data, __pyx_t_8) < 0) __PYX_ERR(0, 1071, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1073
 *     raw_data = vst_fields.VSTCharField()
 * 
 *     @transaction.atomic()             # <<<<<<<<<<<<<<
 *     def create(self, validated_data):
 *         parser = AnsibleInventoryParser()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_transaction); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_atomic); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "polemarch/api/v2/serializers.py":1074
 * 
 *     @transaction.atomic()
 *     def create(self, validated_data):             # <<<<<<<<<<<<<<
 *         parser = AnsibleInventoryParser()
 *         inv_json = parser.get_inventory_data(validated_data['raw_data'])
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9polemarch_3api_2v2_11serializers_25InventoryImportSerializer_1create, 0, __pyx_n_s_InventoryImportSerializer_create, NULL, __pyx_n_s_polemarch_api_v2_serializers, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_create, __pyx_t_8) < 0) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "polemarch/api/v2/serializers.py":1068
 * 
 * 
 * class InventoryImportSerializer(DataSerializer):             # <<<<<<<<<<<<<<
 *     inventory_id = vst_fields.RedirectIntegerField(default=None, allow_null=True)
 *     name = serializers.CharField(required=True)
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_InventoryImportSerializer, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InventoryImportSerializer, __pyx_t_8) < 0) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "polemarch/api/v2/serializers.py":1
 * # pylint: disable=no-member,unused-argument,too-many-lines             # <<<<<<<<<<<<<<
 * from __future__ import unicode_literals
 * import json
 */
  __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);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init polemarch.api.v2.serializers", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init polemarch.api.v2.serializers");
  }
  __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;
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

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

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

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

/* py_dict_pop */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3
    if ((1)) {
        return _PyDict_Pop(d, key, default_value);
    } else
#endif
    if (default_value) {
        return __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_pop, d, key, default_value);
    } else {
        return __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_pop, d, key);
    }
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* 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, int nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

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

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

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

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

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

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

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

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

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

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

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunction */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

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

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* MergeKeywords */
static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) {
    PyObject *iter, *key = NULL, *value = NULL;
    int source_is_dict, result;
    Py_ssize_t orig_length, ppos = 0;
    iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict);
    if (unlikely(!iter)) {
        PyObject *args;
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        args = PyTuple_Pack(1, source_mapping);
        if (likely(args)) {
            PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL);
            Py_DECREF(args);
            if (likely(fallback)) {
                iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict);
                Py_DECREF(fallback);
            }
        }
        if (unlikely(!iter)) goto bad;
    }
    while (1) {
        result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict);
        if (unlikely(result < 0)) goto bad;
        if (!result) break;
        if (unlikely(PyDict_Contains(kwdict, key))) {
            __Pyx_RaiseDoubleKeywordsError("function", key);
            result = -1;
        } else {
            result = PyDict_SetItem(kwdict, key, value);
        }
        Py_DECREF(key);
        Py_DECREF(value);
        if (unlikely(result < 0)) goto bad;
    }
    Py_XDECREF(iter);
    return 0;
bad:
    Py_XDECREF(iter);
    return -1;
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

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

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

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

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module_2, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CallUnboundCMethod0 */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* py_dict_items */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
    else
        return PyDict_Items(d);
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

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

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

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

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

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if (0) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if (0) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
