/* Generated by Cython 0.29.32 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "chorde.decorators",
        "sources": [
            "lib/chorde/decorators.py"
        ]
    },
    "module_name": "chorde.decorators"
}
END: Cython Metadata */

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

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

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

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

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

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

#define __PYX_HAVE__chorde__decorators
#define __PYX_HAVE_API__chorde__decorators
/* Early includes */
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

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


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

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


static const char *__pyx_f[] = {
  "lib/chorde/decorators.py",
  "lib/chorde/decorators.pxd",
  "stringsource",
};

/*--- Type declarations ---*/
struct __pyx_obj_6chorde_10decorators_CacheStats;
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps;
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred;
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached;
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor;
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f;
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f;
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f;
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f;
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults1;
typedef struct __pyx_defaults1 __pyx_defaults1;
struct __pyx_defaults2;
typedef struct __pyx_defaults2 __pyx_defaults2;
struct __pyx_defaults {
  PyObject *__pyx_arg_key;
  PyObject *__pyx_arg_lazy_kwargs;
  PyObject *__pyx_arg_async_lazy_recheck_kwargs;
};
struct __pyx_defaults1 {
  PyObject *__pyx_arg_key;
  PyObject *__pyx_arg_lazy_kwargs;
  PyObject *__pyx_arg_async_lazy_recheck_kwargs;
};
struct __pyx_defaults2 {
  PyObject *__pyx_arg_r;
};

/* "chorde/decorators.pxd":4
 * 
 * @cython.no_gc
 * cdef class CacheStats(object):             # <<<<<<<<<<<<<<
 *     cdef public long long hits
 *     cdef public long long misses
 */
struct __pyx_obj_6chorde_10decorators_CacheStats {
  PyObject_HEAD
  struct __pyx_vtabstruct_6chorde_10decorators_CacheStats *__pyx_vtab;
  PY_LONG_LONG hits;
  PY_LONG_LONG misses;
  PY_LONG_LONG errors;
  PY_LONG_LONG sync_misses;
  PY_LONG_LONG sync_errors;
  double min_miss_time;
  double max_miss_time;
  double sum_miss_time;
  double sum_miss_time_sq;
  double wait_time;
  PyObject *miss_time_histogram;
  double miss_time_histogram_max;
  long miss_time_histogram_bins;
};


/* "chorde/decorators.py":45
 *             return 1
 * 
 * def wraps(wrapped):             # <<<<<<<<<<<<<<
 *     w = _wraps(wrapped)
 *     def decor(wrapper):
 */
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps {
  PyObject_HEAD
  PyObject *__pyx_v_w;
  PyObject *__pyx_v_wrapped;
};


/* "chorde/decorators.py":92
 *     return client.put(key, defer, ttl)
 * 
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):             # <<<<<<<<<<<<<<
 *     return client.put_coherently(key, ttl,
 *         lambda : not shared.contains(key, async_ttl),
 */
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred {
  PyObject_HEAD
  PyObject *__pyx_v_async_ttl;
  PyObject *__pyx_v_key;
  PyObject *__pyx_v_shared;
};


/* "chorde/decorators.py":133
 * decorated_functions = weakref.WeakSet()
 * 
 * def cached(client, ttl,             # <<<<<<<<<<<<<<
 *         key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *         namespace = None,
 */
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached {
  PyObject_HEAD
  PyObject *__pyx_v_EMPTY_KWARGS;
  PyObject *__pyx_v_Future;
  PyObject *__pyx_v__NONE_;
  PyObject *__pyx_v__eff_async_ttl;
  PyObject *__pyx_v__fput_deferred;
  PyObject *__pyx_v__lazy_recheck_put_deferred;
  PyObject *__pyx_v__put_deferred;
  PyObject *__pyx_v_async_client;
  PyObject *__pyx_v_async_expire;
  PyObject *__pyx_v_async_lazy_recheck;
  PyObject *__pyx_v_async_processor;
  PyObject *__pyx_v_async_processor_kwargs;
  PyObject *__pyx_v_async_processor_workers;
  PyObject *__pyx_v_async_ttl;
  PyObject *__pyx_v_async_writer_kwargs;
  PyObject *__pyx_v_async_writer_queue_size;
  PyObject *__pyx_v_async_writer_workers;
  PyObject *__pyx_v_autonamespace_version_salt;
  PyObject *__pyx_v_client;
  PyObject *__pyx_v_decorate;
  PyObject *__pyx_v_easync_lazy_recheck_kwargs;
  PyObject *__pyx_v_eff_ttl;
  PyObject *__pyx_v_eget_async_lazy_recheck_kwargs;
  PyObject *__pyx_v_elazy_kwargs;
  PyObject *__pyx_v_future_sync_check;
  PyObject *__pyx_v_initialize;
  PyObject *__pyx_v_key;
  PyObject *__pyx_v_lazy_kwargs;
  PyObject *__pyx_v_namespace;
  PyObject *__pyx_v_renew_time;
  PyTypeObject *__pyx_v_spread_type;
  PyObject *__pyx_v_timings;
  PyObject *__pyx_v_ttl;
  PyObject *__pyx_v_ttl_spread;
};


/* "chorde/decorators.py":428
 *     Future = asyncache.Future
 * 
 *     def decor(f):             # <<<<<<<<<<<<<<
 *         if namespace is None:
 *             salt2 = repr((ttl,))
 */
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor {
  PyObject_HEAD
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *__pyx_outer_scope;
  PyObject *__pyx_v__initialize;
  PyObject *__pyx_v__promote_callback;
  PyObject *__pyx_v__value_callback;
  PyObject *__pyx_v_aclient;
  PyObject *__pyx_v_af;
  PyObject *__pyx_v_async_cached_f;
  PyObject *__pyx_v_async_f;
  PyObject *__pyx_v_eff_async_ttl;
  PyObject *__pyx_v_f;
  PyObject *__pyx_v_fclient;
  PyObject *__pyx_v_future_cached_f;
  PyObject *__pyx_v_get_kwargs;
  PyObject *__pyx_v_nclient;
  PyObject *__pyx_v_of;
  PyObject *__pyx_v_placeholder_value_fn_cell;
  PyObject *__pyx_v_promote_callbacks;
  struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_stats;
  PyObject *__pyx_v_value_callbacks;
};


/* "chorde/decorators.py":627
 * 
 *         @wraps(of)
 *         def future_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f {
  PyObject_HEAD
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v___NONE;
  PyObject *__pyx_v_callkey;
  PyObject *__pyx_v_client;
  PyObject *__pyx_v_frv;
  PyObject *__pyx_v_kw;
  PyObject *__pyx_v_p;
  PyObject *__pyx_v_rv;
};


/* "chorde/decorators.py":723
 * 
 *         @wraps(of)
 *         def future_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f {
  PyObject_HEAD
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v___NONE;
  PyObject *__pyx_v_callkey;
  PyObject *__pyx_v_client;
  PyObject *__pyx_v_frv;
  PyObject *__pyx_v_kw;
  PyObject *__pyx_v_p;
  PyObject *__pyx_v_rv;
};


/* "chorde/decorators.py":806
 * 
 *         @wraps(of)
 *         def future_peek_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f {
  PyObject_HEAD
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_frv;
};


/* "chorde/decorators.py":992
 * 
 *         @wraps(of)
 *         def async_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f {
  PyObject_HEAD
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v___NONE;
  PyObject *__pyx_v_callkey;
  PyObject *__pyx_v_client;
};


/* "chorde/decorators.py":1245
 * if not no_coherence:
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,             # <<<<<<<<<<<<<<
 *             key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *             tiered_ = None,
 */
struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached {
  PyObject_HEAD
  PyObject *__pyx_v_async_expire;
  PyObject *__pyx_v_async_lazy_recheck;
  PyObject *__pyx_v_async_lazy_recheck_kwargs;
  PyObject *__pyx_v_async_processor;
  PyObject *__pyx_v_async_processor_kwargs;
  PyObject *__pyx_v_async_processor_threadpool;
  PyObject *__pyx_v_async_processor_workers;
  PyObject *__pyx_v_async_ttl;
  PyObject *__pyx_v_async_writer_kwargs;
  PyObject *__pyx_v_async_writer_queue_size;
  PyObject *__pyx_v_async_writer_threadpool;
  PyObject *__pyx_v_async_writer_workers;
  PyObject *__pyx_v_autonamespace_version_salt;
  PyObject *__pyx_v_coherence_encoding;
  PyObject *__pyx_v_coherence_kwargs;
  PyObject *__pyx_v_coherence_namespace;
  PyObject *__pyx_v_coherence_timeout;
  PyObject *__pyx_v_decorate;
  PyObject *__pyx_v_future_sync_check;
  PyObject *__pyx_v_initialize;
  PyObject *__pyx_v_ipsub;
  PyObject *__pyx_v_key;
  PyObject *__pyx_v_lazy_kwargs;
  PyObject *__pyx_v_namespace;
  PyObject *__pyx_v_private;
  PyObject *__pyx_v_renew_time;
  PyObject *__pyx_v_shared;
  PyObject *__pyx_v_tiered_;
  PyObject *__pyx_v_tiered_opts;
  PyObject *__pyx_v_ttl;
  PyObject *__pyx_v_ttl_spread;
  PyObject *__pyx_v_value_deserialization_function;
  PyObject *__pyx_v_value_serialization_function;
  PyObject *__pyx_v_wait_time;
};



/* "chorde/decorators.py":98
 *         f, *p, **kw)
 * 
 * class CacheStats(object):             # <<<<<<<<<<<<<<
 *     __slots__ = (
 *         'hits', 'misses', 'errors',
 */

struct __pyx_vtabstruct_6chorde_10decorators_CacheStats {
  PyObject *(*add_histo)(struct __pyx_obj_6chorde_10decorators_CacheStats *, double, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6chorde_10decorators_CacheStats *__pyx_vtabptr_6chorde_10decorators_CacheStats;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

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

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

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

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

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

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

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

/* dict_setdefault.proto */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type);

/* SliceObject.proto */
#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
    __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

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

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_SubtractObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_SubtractObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* py_abs.proto */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
#define __Pyx_PyNumber_Absolute(x)\
    ((likely(PyLong_CheckExact(x))) ?\
         (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\
         PyNumber_Absolute(x))
#else
#define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);

/* CIntFromPy.proto */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *);

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

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

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

static PyObject *__pyx_f_6chorde_10decorators_10CacheStats_add_histo(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, double __pyx_v_time, int __pyx_skip_dispatch); /* proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'chorde.decorators' */
static PyTypeObject *__pyx_ptype_6chorde_10decorators_CacheStats = 0;
static PyTypeObject *__pyx_ptype_6chorde_10decorators___pyx_scope_struct__wraps = 0;
static PyTypeObject *__pyx_ptype_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred = 0;
static PyTypeObject *__pyx_ptype_6chorde_10decorators___pyx_scope_struct_2_cached = 0;
static PyTypeObject *__pyx_ptype_6chorde_10decorators___pyx_scope_struct_3_decor = 0;
static PyTypeObject *__pyx_ptype_6chorde_10decorators___pyx_scope_struct_4_future_cached_f = 0;
static PyTypeObject *__pyx_ptype_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f = 0;
static PyTypeObject *__pyx_ptype_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f = 0;
static PyTypeObject *__pyx_ptype_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f = 0;
static PyTypeObject *__pyx_ptype_6chorde_10decorators___pyx_scope_struct_8_coherent_cached = 0;
static PyObject *__pyx_f_6chorde_10decorators___pyx_unpickle_CacheStats__set_state(struct __pyx_obj_6chorde_10decorators_CacheStats *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "chorde.decorators"
extern int __pyx_module_is_main_chorde__decorators;
int __pyx_module_is_main_chorde__decorators = 0;

/* Implementation of 'chorde.decorators' */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_filter;
static const char __pyx_k_[] = "\n";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_f[] = "f";
static const char __pyx_k_p[] = "p";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_w[] = "w";
static const char __pyx_k__6[] = "";
static const char __pyx_k__7[] = "=\n";
static const char __pyx_k_af[] = "af";
static const char __pyx_k_bg[] = "bg";
static const char __pyx_k_cb[] = "cb";
static const char __pyx_k_fn[] = "fn";
static const char __pyx_k_kw[] = "kw";
static const char __pyx_k_mq[] = "mq";
static const char __pyx_k_of[] = "of";
static const char __pyx_k_rv[] = "rv";
static const char __pyx_k_t0[] = "t0";
static const char __pyx_k_t1[] = "t1";
static const char __pyx_k_add[] = "add";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_exc[] = "exc";
static const char __pyx_k_frv[] = "frv";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_md5[] = "md5";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_put[] = "put";
static const char __pyx_k_ref[] = "ref";
static const char __pyx_k_s_d[] = "%s:%d";
static const char __pyx_k_set[] = "set";
static const char __pyx_k_ttl[] = "ttl";
static const char __pyx_k_NONE[] = "NONE";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_bins[] = "bins";
static const char __pyx_k_code[] = "__code__";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_hits[] = "hits";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_lazy[] = "lazy";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_miss[] = "miss";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_peek[] = "peek";
static const char __pyx_k_salt[] = "salt";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_utf8[] = "utf8";
static const char __pyx_k_wait[] = "wait";
static const char __pyx_k_Defer[] = "Defer";
static const char __pyx_k_bound[] = "bound";
static const char __pyx_k_clear[] = "clear";
static const char __pyx_k_decor[] = "decor";
static const char __pyx_k_defer[] = "defer";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_fcode[] = "fcode";
static const char __pyx_k_fname[] = "fname";
static const char __pyx_k_fpath[] = "fpath";
static const char __pyx_k_ipsub[] = "ipsub";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_mname[] = "mname";
static const char __pyx_k_put_f[] = "put_f";
static const char __pyx_k_pydoc[] = "pydoc";
static const char __pyx_k_pyobj[] = "pyobj";
static const char __pyx_k_renew[] = "renew";
static const char __pyx_k_rvttl[] = "rvttl";
static const char __pyx_k_s_s_s[] = "%s.%s#%s";
static const char __pyx_k_salt2[] = "salt2";
static const char __pyx_k_slots[] = "__slots__";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_stats[] = "stats";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_wraps[] = "_wraps";
static const char __pyx_k_Future[] = "Future";
static const char __pyx_k_NONE_2[] = "__NONE";
static const char __pyx_k_NONE_3[] = "_NONE";
static const char __pyx_k_NONE_4[] = "_NONE_";
static const char __pyx_k_base64[] = "base64";
static const char __pyx_k_cached[] = "cached";
static const char __pyx_k_chorde[] = "chorde";
static const char __pyx_k_client[] = "client";
static const char __pyx_k_delete[] = "delete";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_digest[] = "digest";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_errors[] = "errors";
static const char __pyx_k_expire[] = "expire";
static const char __pyx_k_filter[] = "filter";
static const char __pyx_k_future[] = "future";
static const char __pyx_k_getTtl[] = "getTtl";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_misses[] = "misses";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_on_any[] = "on_any";
static const char __pyx_k_on_exc[] = "on_exc";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_random[] = "random";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_rstrip[] = "rstrip";
static const char __pyx_k_shared[] = "shared";
static const char __pyx_k_tiered[] = "tiered_";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_WeakSet[] = "WeakSet";
static const char __pyx_k_aclient[] = "aclient";
static const char __pyx_k_async_f[] = "async_f";
static const char __pyx_k_callkey[] = "callkey";
static const char __pyx_k_clientf[] = "clientf";
static const char __pyx_k_clients[] = "clients";
static const char __pyx_k_co_code[] = "co_code";
static const char __pyx_k_cy_noop[] = "_cy_noop";
static const char __pyx_k_eff_ttl[] = "eff_ttl";
static const char __pyx_k_fclient[] = "fclient";
static const char __pyx_k_get_ttl[] = "get_ttl";
static const char __pyx_k_hashlib[] = "hashlib";
static const char __pyx_k_im_func[] = "im_func";
static const char __pyx_k_logging[] = "logging";
static const char __pyx_k_maxtime[] = "maxtime";
static const char __pyx_k_nclient[] = "nclient";
static const char __pyx_k_nshared[] = "nshared";
static const char __pyx_k_ntiered[] = "ntiered";
static const char __pyx_k_on_miss[] = "on_miss";
static const char __pyx_k_partial[] = "partial";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_private[] = "private";
static const char __pyx_k_promote[] = "promote";
static const char __pyx_k_refresh[] = "refresh";
static const char __pyx_k_shareds[] = "shareds";
static const char __pyx_k_sharedt[] = "sharedt";
static const char __pyx_k_timings[] = "timings";
static const char __pyx_k_weakref[] = "weakref";
static const char __pyx_k_wrapped[] = "wrapped";
static const char __pyx_k_wrapper[] = "wrapper";
static const char __pyx_k_wraps_2[] = "wraps";
static const char __pyx_k_cached_f[] = "cached_f";
static const char __pyx_k_cached_s[] = "cached %s:";
static const char __pyx_k_callback[] = "callback";
static const char __pyx_k_client_2[] = "_client";
static const char __pyx_k_coherent[] = "coherent";
static const char __pyx_k_contains[] = "contains";
static const char __pyx_k_decorate[] = "decorate";
static const char __pyx_k_do_async[] = "do_async";
static const char __pyx_k_encoding[] = "encoding";
static const char __pyx_k_exc_info[] = "exc_info";
static const char __pyx_k_expire_f[] = "expire_f";
static const char __pyx_k_future_f[] = "future_f";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_is_async[] = "is_async";
static const char __pyx_k_nprivate[] = "nprivate";
static const char __pyx_k_on_value[] = "on_value";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_tiered_2[] = "tiered";
static const char __pyx_k_ttl_skip[] = "ttl_skip";
static const char __pyx_k_uncached[] = "uncached";
static const char __pyx_k_add_histo[] = "add_histo";
static const char __pyx_k_async_ttl[] = "async_ttl";
static const char __pyx_k_asyncache[] = "asyncache";
static const char __pyx_k_b64encode[] = "b64encode";
static const char __pyx_k_cache_put[] = "_cache_put";
static const char __pyx_k_coherence[] = "coherence";
static const char __pyx_k_cpu_count[] = "cpu_count";
static const char __pyx_k_func_code[] = "func_code";
static const char __pyx_k_func_name[] = "func_name";
static const char __pyx_k_functools[] = "functools";
static const char __pyx_k_getLogger[] = "getLogger";
static const char __pyx_k_get_ttl_f[] = "get_ttl_f";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_namespace[] = "namespace";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_refresh_f[] = "refresh_f";
static const char __pyx_k_touch_key[] = "touch_key";
static const char __pyx_k_wait_time[] = "wait_time";
static const char __pyx_k_CacheStats[] = "CacheStats";
static const char __pyx_k_get_kwargs[] = "get_kwargs";
static const char __pyx_k_initialize[] = "initialize";
static const char __pyx_k_invalidate[] = "invalidate";
static const char __pyx_k_on_promote[] = "on_promote";
static const char __pyx_k_on_value_f[] = "on_value_f";
static const char __pyx_k_put_kwargs[] = "put_kwargs";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_render_doc[] = "render_doc";
static const char __pyx_k_renew_time[] = "renew_time";
static const char __pyx_k_setdefault[] = "setdefault";
static const char __pyx_k_threadpool[] = "threadpool";
static const char __pyx_k_ttl_spread[] = "ttl_spread";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_async_put_f[] = "async_put_f";
static const char __pyx_k_body_digest[] = "body_digest";
static const char __pyx_k_co_filename[] = "co_filename";
static const char __pyx_k_expired_ttl[] = "expired_ttl";
static const char __pyx_k_lazy_kwargs[] = "lazy_kwargs";
static const char __pyx_k_namespace_2[] = "_namespace";
static const char __pyx_k_on_any_once[] = "on_any_once";
static const char __pyx_k_placeholder[] = "placeholder";
static const char __pyx_k_spread_type[] = "spread_type";
static const char __pyx_k_sync_errors[] = "sync_errors";
static const char __pyx_k_sync_misses[] = "sync_misses";
static const char __pyx_k_tiered_opts[] = "tiered_opts";
static const char __pyx_k_EMPTY_KWARGS[] = "EMPTY_KWARGS";
static const char __pyx_k_NO_NAMESPACE[] = "NO_NAMESPACE";
static const char __pyx_k_async_client[] = "async_client";
static const char __pyx_k_async_expire[] = "async_expire";
static const char __pyx_k_clients_base[] = "clients.base";
static const char __pyx_k_elazy_kwargs[] = "elazy_kwargs";
static const char __pyx_k_future_put_f[] = "future_put_f";
static const char __pyx_k_initialize_2[] = "_initialize";
static const char __pyx_k_invalidate_f[] = "invalidate_f";
static const char __pyx_k_no_coherence[] = "no_coherence";
static const char __pyx_k_on_promote_f[] = "on_promote_f";
static const char __pyx_k_put_deferred[] = "_put_deferred";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_eff_async_ttl[] = "_eff_async_ttl";
static const char __pyx_k_fput_deferred[] = "_fput_deferred";
static const char __pyx_k_lazy_cached_f[] = "lazy_cached_f";
static const char __pyx_k_max_miss_time[] = "max_miss_time";
static const char __pyx_k_min_miss_time[] = "min_miss_time";
static const char __pyx_k_nasync_client[] = "nasync_client";
static const char __pyx_k_peek_cached_f[] = "peek_cached_f";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_set_nothreads[] = "_set_nothreads";
static const char __pyx_k_sum_miss_time[] = "sum_miss_time";
static const char __pyx_k_CacheMissError[] = "CacheMissError";
static const char __pyx_k_async_cached_f[] = "async_cached_f";
static const char __pyx_k_async_expire_f[] = "async_expire_f";
static const char __pyx_k_co_firstlineno[] = "co_firstlineno";
static const char __pyx_k_expire_private[] = "expire_private";
static const char __pyx_k_make_namespace[] = "_make_namespace";
static const char __pyx_k_miss_nothreads[] = "_miss_nothreads";
static const char __pyx_k_put_coherently[] = "put_coherently";
static const char __pyx_k_value_callback[] = "_value_callback";
static const char __pyx_k_async_processor[] = "async_processor";
static const char __pyx_k_async_refresh_f[] = "async_refresh_f";
static const char __pyx_k_coherent_cached[] = "coherent_cached";
static const char __pyx_k_eff_async_ttl_2[] = "eff_async_ttl";
static const char __pyx_k_future_cached_f[] = "future_cached_f";
static const char __pyx_k_future_expire_f[] = "future_expire_f";
static const char __pyx_k_multiprocessing[] = "multiprocessing";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_value_callbacks[] = "_value_callbacks";
static const char __pyx_k_value_decorator[] = "value_decorator";
static const char __pyx_k_CacheStats_clear[] = "CacheStats.clear";
static const char __pyx_k_CoherenceManager[] = "CoherenceManager";
static const char __pyx_k_DecoratedWrapper[] = "DecoratedWrapper";
static const char __pyx_k_NamespaceWrapper[] = "NamespaceWrapper";
static const char __pyx_k_cache_put_kwargs[] = "_cache_put_kwargs";
static const char __pyx_k_coherence_kwargs[] = "coherence_kwargs";
static const char __pyx_k_future_get_ttl_f[] = "future_get_ttl_f";
static const char __pyx_k_future_refresh_f[] = "future_refresh_f";
static const char __pyx_k_promote_callback[] = "promote_callback";
static const char __pyx_k_sum_miss_time_sq[] = "sum_miss_time_sq";
static const char __pyx_k_chorde_decorators[] = "chorde.decorators";
static const char __pyx_k_coherence_manager[] = "coherence_manager";
static const char __pyx_k_coherence_timeout[] = "coherence_timeout";
static const char __pyx_k_future_sync_check[] = "future_sync_check";
static const char __pyx_k_placeholder_value[] = "placeholder_value";
static const char __pyx_k_promote_callbacks[] = "_promote_callbacks";
static const char __pyx_k_stop_initializing[] = "stop_initializing";
static const char __pyx_k_value_callbacks_2[] = "value_callbacks";
static const char __pyx_k_value_undecorator[] = "value_undecorator";
static const char __pyx_k_async_lazy_recheck[] = "async_lazy_recheck";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_coherence_encoding[] = "coherence_encoding";
static const char __pyx_k_promote_callback_2[] = "_promote_callback";
static const char __pyx_k_set_histogram_bins[] = "set_histogram_bins";
static const char __pyx_k_wraps_locals_decor[] = "wraps.<locals>.decor";
static const char __pyx_k_AsyncCacheProcessor[] = "AsyncCacheProcessor";
static const char __pyx_k_async_lazy_cached_f[] = "async_lazy_cached_f";
static const char __pyx_k_async_writer_kwargs[] = "async_writer_kwargs";
static const char __pyx_k_cached_locals_decor[] = "cached.<locals>.decor";
static const char __pyx_k_coherence_namespace[] = "coherence_namespace";
static const char __pyx_k_decorated_functions[] = "decorated_functions";
static const char __pyx_k_future_invalidate_f[] = "future_invalidate_f";
static const char __pyx_k_miss_time_histogram[] = "miss_time_histogram";
static const char __pyx_k_placeholder_value_f[] = "placeholder_value_f";
static const char __pyx_k_promote_callbacks_2[] = "promote_callbacks";
static const char __pyx_k_simple_put_deferred[] = "_simple_put_deferred";
static const char __pyx_k_CacheStats_add_histo[] = "CacheStats.add_histo";
static const char __pyx_k_async_writer_workers[] = "async_writer_workers";
static const char __pyx_k_cached_locals_lambda[] = "cached.<locals>.<lambda>";
static const char __pyx_k_future_lazy_cached_f[] = "future_lazy_cached_f";
static const char __pyx_k_future_peek_cached_f[] = "future_peek_cached_f";
static const char __pyx_k_AsyncWriteCacheClient[] = "AsyncWriteCacheClient";
static const char __pyx_k_CoherentWrapperClient[] = "CoherentWrapperClient";
static const char __pyx_k_TieredInclusiveClient[] = "TieredInclusiveClient";
static const char __pyx_k_coherence_namespace_2[] = "_coherence_namespace";
static const char __pyx_k_coherent_put_deferred[] = "_coherent_put_deferred";
static const char __pyx_k_NamespaceMirrorWrapper[] = "NamespaceMirrorWrapper";
static const char __pyx_k_async_processor_kwargs[] = "async_processor_kwargs";
static const char __pyx_k_Error_on_value_callback[] = "Error on value callback";
static const char __pyx_k_async_processor_workers[] = "async_processor_workers";
static const char __pyx_k_async_writer_queue_size[] = "async_writer_queue_size";
static const char __pyx_k_async_writer_threadpool[] = "async_writer_threadpool";
static const char __pyx_k_miss_time_histogram_max[] = "miss_time_histogram_max";
static const char __pyx_k_pyx_unpickle_CacheStats[] = "__pyx_unpickle_CacheStats";
static const char __pyx_k_Error_evaluating_callkey[] = "Error evaluating callkey";
static const char __pyx_k_lib_chorde_decorators_py[] = "lib/chorde/decorators.py";
static const char __pyx_k_miss_time_histogram_bins[] = "miss_time_histogram_bins";
static const char __pyx_k_async_lazy_recheck_kwargs[] = "async_lazy_recheck_kwargs";
static const char __pyx_k_lazy_recheck_put_deferred[] = "_lazy_recheck_put_deferred";
static const char __pyx_k_multiprocessing_cpu_count[] = "multiprocessing.cpu_count";
static const char __pyx_k_placeholder_value_fn_cell[] = "placeholder_value_fn_cell";
static const char __pyx_k_CacheStats___reduce_cython[] = "CacheStats.__reduce_cython__";
static const char __pyx_k_async_processor_threadpool[] = "async_processor_threadpool";
static const char __pyx_k_autonamespace_version_salt[] = "autonamespace_version_salt";
static const char __pyx_k_easync_lazy_recheck_kwargs[] = "easync_lazy_recheck_kwargs";
static const char __pyx_k_flazy_recheck_put_deferred[] = "_flazy_recheck_put_deferred";
static const char __pyx_k_CacheStats___setstate_cython[] = "CacheStats.__setstate_cython__";
static const char __pyx_k_cached_locals_decor_locals_f[] = "cached.<locals>.decor.<locals>.f";
static const char __pyx_k_coherent_cached_locals_decor[] = "coherent_cached.<locals>.decor";
static const char __pyx_k_value_serialization_function[] = "value_serialization_function";
static const char __pyx_k_CacheStats_set_histogram_bins[] = "CacheStats.set_histogram_bins";
static const char __pyx_k_cached_locals_decor_locals_af[] = "cached.<locals>.decor.<locals>.af";
static const char __pyx_k_coherent_cached_locals_lambda[] = "coherent_cached.<locals>.<lambda>";
static const char __pyx_k_eget_async_lazy_recheck_kwargs[] = "eget_async_lazy_recheck_kwargs";
static const char __pyx_k_value_deserialization_function[] = "value_deserialization_function";
static const char __pyx_k_cached_locals_decor_locals_lazy[] = "cached.<locals>.decor.<locals>.lazy_cached_f";
static const char __pyx_k_coherent_put_deferred_locals_la[] = "_coherent_put_deferred.<locals>.<lambda>";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xeb39541, 0xdcc4bd9, 0xae59ab5) = (errors, hits, max_miss_time, min_miss_time, miss_time_histogram, miss_time_histogram_bins, miss_time_histogram_max, misses, sum_miss_time, sum_miss_time_sq, sync_errors, sync_misses, wait_time))";
static const char __pyx_k_cached_locals_decor_locals__init[] = "cached.<locals>.decor.<locals>._initialize";
static const char __pyx_k_cached_locals_decor_locals__prom[] = "cached.<locals>.decor.<locals>._promote_callback";
static const char __pyx_k_cached_locals_decor_locals__valu[] = "cached.<locals>.decor.<locals>._value_callback";
static const char __pyx_k_cached_locals_decor_locals_async[] = "cached.<locals>.decor.<locals>.async_lazy_cached_f.<locals>.touch_key";
static const char __pyx_k_cached_locals_decor_locals_cache[] = "cached.<locals>.decor.<locals>.cached_f";
static const char __pyx_k_cached_locals_decor_locals_expir[] = "cached.<locals>.decor.<locals>.expire_f";
static const char __pyx_k_cached_locals_decor_locals_futur[] = "cached.<locals>.decor.<locals>.future_cached_f.<locals>.on_value";
static const char __pyx_k_cached_locals_decor_locals_get_t[] = "cached.<locals>.decor.<locals>.get_ttl_f";
static const char __pyx_k_cached_locals_decor_locals_inval[] = "cached.<locals>.decor.<locals>.invalidate_f";
static const char __pyx_k_cached_locals_decor_locals_lambd[] = "cached.<locals>.decor.<locals>.<lambda>";
static const char __pyx_k_cached_locals_decor_locals_on_pr[] = "cached.<locals>.decor.<locals>.on_promote_f";
static const char __pyx_k_cached_locals_decor_locals_on_va[] = "cached.<locals>.decor.<locals>.on_value_f";
static const char __pyx_k_cached_locals_decor_locals_place[] = "cached.<locals>.decor.<locals>.placeholder_value_f";
static const char __pyx_k_cached_locals_decor_locals_put_f[] = "cached.<locals>.decor.<locals>.put_f";
static const char __pyx_k_cached_locals_decor_locals_refre[] = "cached.<locals>.decor.<locals>.refresh_f";
static const char __pyx_k_cached_locals_decor_locals_async_2[] = "cached.<locals>.decor.<locals>.async_cached_f";
static const char __pyx_k_cached_locals_decor_locals_async_3[] = "cached.<locals>.decor.<locals>.async_expire_f";
static const char __pyx_k_cached_locals_decor_locals_async_4[] = "cached.<locals>.decor.<locals>.async_put_f";
static const char __pyx_k_cached_locals_decor_locals_async_5[] = "cached.<locals>.decor.<locals>.async_lazy_cached_f";
static const char __pyx_k_cached_locals_decor_locals_async_6[] = "cached.<locals>.decor.<locals>.async_refresh_f";
static const char __pyx_k_cached_locals_decor_locals_async_7[] = "cached.<locals>.decor.<locals>.async_f";
static const char __pyx_k_cached_locals_decor_locals_futur_2[] = "cached.<locals>.decor.<locals>.future_cached_f.<locals>.on_miss";
static const char __pyx_k_cached_locals_decor_locals_futur_3[] = "cached.<locals>.decor.<locals>.future_cached_f.<locals>.on_exc";
static const char __pyx_k_cached_locals_decor_locals_futur_4[] = "cached.<locals>.decor.<locals>.future_lazy_cached_f.<locals>.on_value";
static const char __pyx_k_cached_locals_decor_locals_futur_5[] = "cached.<locals>.decor.<locals>.future_lazy_cached_f.<locals>.on_miss";
static const char __pyx_k_cached_locals_decor_locals_futur_6[] = "cached.<locals>.decor.<locals>.future_lazy_cached_f.<locals>.on_exc";
static const char __pyx_k_cached_locals_decor_locals_futur_7[] = "cached.<locals>.decor.<locals>.future_peek_cached_f.<locals>.on_value";
static const char __pyx_k_cached_locals_decor_locals_futur_8[] = "cached.<locals>.decor.<locals>.future_peek_cached_f.<locals>.on_miss";
static const char __pyx_k_cached_locals_decor_locals_futur_9[] = "cached.<locals>.decor.<locals>.future_peek_cached_f.<locals>.on_exc";
static const char __pyx_k_cached_locals_decor_locals_futur_10[] = "cached.<locals>.decor.<locals>.future_cached_f";
static const char __pyx_k_cached_locals_decor_locals_futur_11[] = "cached.<locals>.decor.<locals>.future_lazy_cached_f";
static const char __pyx_k_cached_locals_decor_locals_futur_12[] = "cached.<locals>.decor.<locals>.future_peek_cached_f";
static const char __pyx_k_cached_locals_decor_locals_futur_13[] = "cached.<locals>.decor.<locals>.future_get_ttl_f";
static const char __pyx_k_cached_locals_decor_locals_futur_14[] = "cached.<locals>.decor.<locals>.future_invalidate_f";
static const char __pyx_k_cached_locals_decor_locals_futur_15[] = "cached.<locals>.decor.<locals>.future_expire_f";
static const char __pyx_k_cached_locals_decor_locals_futur_16[] = "cached.<locals>.decor.<locals>.future_put_f";
static const char __pyx_k_cached_locals_decor_locals_futur_17[] = "cached.<locals>.decor.<locals>.future_refresh_f";
static const char __pyx_k_cached_locals_decor_locals_futur_18[] = "cached.<locals>.decor.<locals>.future_f";
static PyObject *__pyx_kp_s_;
static PyObject *__pyx_n_s_AsyncCacheProcessor;
static PyObject *__pyx_n_s_AsyncWriteCacheClient;
static PyObject *__pyx_n_s_CacheMissError;
static PyObject *__pyx_n_s_CacheStats;
static PyObject *__pyx_n_s_CacheStats___reduce_cython;
static PyObject *__pyx_n_s_CacheStats___setstate_cython;
static PyObject *__pyx_n_s_CacheStats_add_histo;
static PyObject *__pyx_n_s_CacheStats_clear;
static PyObject *__pyx_n_s_CacheStats_set_histogram_bins;
static PyObject *__pyx_n_s_CoherenceManager;
static PyObject *__pyx_n_s_CoherentWrapperClient;
static PyObject *__pyx_n_s_DecoratedWrapper;
static PyObject *__pyx_n_s_Defer;
static PyObject *__pyx_n_s_EMPTY_KWARGS;
static PyObject *__pyx_kp_s_Error_evaluating_callkey;
static PyObject *__pyx_kp_s_Error_on_value_callback;
static PyObject *__pyx_n_s_Future;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
static PyObject *__pyx_n_s_NONE;
static PyObject *__pyx_n_s_NONE_2;
static PyObject *__pyx_n_s_NONE_3;
static PyObject *__pyx_n_s_NONE_4;
static PyObject *__pyx_n_s_NO_NAMESPACE;
static PyObject *__pyx_n_s_NamespaceMirrorWrapper;
static PyObject *__pyx_n_s_NamespaceWrapper;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_TieredInclusiveClient;
static PyObject *__pyx_n_s_WeakSet;
static PyObject *__pyx_kp_b__6;
static PyObject *__pyx_kp_s__6;
static PyObject *__pyx_kp_b__7;
static PyObject *__pyx_n_s_aclient;
static PyObject *__pyx_n_s_add;
static PyObject *__pyx_n_s_add_histo;
static PyObject *__pyx_n_s_af;
static PyObject *__pyx_n_s_async_cached_f;
static PyObject *__pyx_n_s_async_client;
static PyObject *__pyx_n_s_async_expire;
static PyObject *__pyx_n_s_async_expire_f;
static PyObject *__pyx_n_s_async_f;
static PyObject *__pyx_n_s_async_lazy_cached_f;
static PyObject *__pyx_n_s_async_lazy_recheck;
static PyObject *__pyx_n_s_async_lazy_recheck_kwargs;
static PyObject *__pyx_n_s_async_processor;
static PyObject *__pyx_n_s_async_processor_kwargs;
static PyObject *__pyx_n_s_async_processor_threadpool;
static PyObject *__pyx_n_s_async_processor_workers;
static PyObject *__pyx_n_s_async_put_f;
static PyObject *__pyx_n_s_async_refresh_f;
static PyObject *__pyx_n_s_async_ttl;
static PyObject *__pyx_n_s_async_writer_kwargs;
static PyObject *__pyx_n_s_async_writer_queue_size;
static PyObject *__pyx_n_s_async_writer_threadpool;
static PyObject *__pyx_n_s_async_writer_workers;
static PyObject *__pyx_n_s_asyncache;
static PyObject *__pyx_n_s_autonamespace_version_salt;
static PyObject *__pyx_n_s_b64encode;
static PyObject *__pyx_n_s_base;
static PyObject *__pyx_n_s_base64;
static PyObject *__pyx_n_s_bg;
static PyObject *__pyx_n_s_bins;
static PyObject *__pyx_n_s_body_digest;
static PyObject *__pyx_n_s_bound;
static PyObject *__pyx_n_s_cache_put;
static PyObject *__pyx_n_s_cache_put_kwargs;
static PyObject *__pyx_n_s_cached;
static PyObject *__pyx_n_s_cached_f;
static PyObject *__pyx_n_s_cached_locals_decor;
static PyObject *__pyx_n_s_cached_locals_decor_locals__init;
static PyObject *__pyx_n_s_cached_locals_decor_locals__prom;
static PyObject *__pyx_n_s_cached_locals_decor_locals__valu;
static PyObject *__pyx_n_s_cached_locals_decor_locals_af;
static PyObject *__pyx_n_s_cached_locals_decor_locals_async;
static PyObject *__pyx_n_s_cached_locals_decor_locals_async_2;
static PyObject *__pyx_n_s_cached_locals_decor_locals_async_3;
static PyObject *__pyx_n_s_cached_locals_decor_locals_async_4;
static PyObject *__pyx_n_s_cached_locals_decor_locals_async_5;
static PyObject *__pyx_n_s_cached_locals_decor_locals_async_6;
static PyObject *__pyx_n_s_cached_locals_decor_locals_async_7;
static PyObject *__pyx_n_s_cached_locals_decor_locals_cache;
static PyObject *__pyx_n_s_cached_locals_decor_locals_expir;
static PyObject *__pyx_n_s_cached_locals_decor_locals_f;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_10;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_11;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_12;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_13;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_14;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_15;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_16;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_17;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_18;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_2;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_3;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_4;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_5;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_6;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_7;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_8;
static PyObject *__pyx_n_s_cached_locals_decor_locals_futur_9;
static PyObject *__pyx_n_s_cached_locals_decor_locals_get_t;
static PyObject *__pyx_n_s_cached_locals_decor_locals_inval;
static PyObject *__pyx_n_s_cached_locals_decor_locals_lambd;
static PyObject *__pyx_n_s_cached_locals_decor_locals_lazy;
static PyObject *__pyx_n_s_cached_locals_decor_locals_on_pr;
static PyObject *__pyx_n_s_cached_locals_decor_locals_on_va;
static PyObject *__pyx_n_s_cached_locals_decor_locals_place;
static PyObject *__pyx_n_s_cached_locals_decor_locals_put_f;
static PyObject *__pyx_n_s_cached_locals_decor_locals_refre;
static PyObject *__pyx_n_s_cached_locals_lambda;
static PyObject *__pyx_kp_s_cached_s;
static PyObject *__pyx_n_s_callback;
static PyObject *__pyx_n_s_callkey;
static PyObject *__pyx_n_s_cb;
static PyObject *__pyx_n_s_chorde;
static PyObject *__pyx_n_s_chorde_decorators;
static PyObject *__pyx_n_s_clear;
static PyObject *__pyx_n_s_client;
static PyObject *__pyx_n_s_client_2;
static PyObject *__pyx_n_s_clientf;
static PyObject *__pyx_n_s_clients;
static PyObject *__pyx_n_s_clients_base;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_co_code;
static PyObject *__pyx_n_s_co_filename;
static PyObject *__pyx_n_s_co_firstlineno;
static PyObject *__pyx_n_s_code;
static PyObject *__pyx_n_s_coherence;
static PyObject *__pyx_n_s_coherence_encoding;
static PyObject *__pyx_n_s_coherence_kwargs;
static PyObject *__pyx_n_s_coherence_manager;
static PyObject *__pyx_n_s_coherence_namespace;
static PyObject *__pyx_n_s_coherence_namespace_2;
static PyObject *__pyx_n_s_coherence_timeout;
static PyObject *__pyx_n_s_coherent;
static PyObject *__pyx_n_s_coherent_cached;
static PyObject *__pyx_n_s_coherent_cached_locals_decor;
static PyObject *__pyx_n_s_coherent_cached_locals_lambda;
static PyObject *__pyx_n_s_coherent_put_deferred;
static PyObject *__pyx_n_s_coherent_put_deferred_locals_la;
static PyObject *__pyx_n_s_contains;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_cpu_count;
static PyObject *__pyx_n_s_cy_noop;
static PyObject *__pyx_n_s_decor;
static PyObject *__pyx_n_s_decorate;
static PyObject *__pyx_n_s_decorated_functions;
static PyObject *__pyx_n_s_defer;
static PyObject *__pyx_n_s_delete;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_2;
static PyObject *__pyx_n_s_digest;
static PyObject *__pyx_n_s_do_async;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_e;
static PyObject *__pyx_n_s_easync_lazy_recheck_kwargs;
static PyObject *__pyx_n_s_eff_async_ttl;
static PyObject *__pyx_n_s_eff_async_ttl_2;
static PyObject *__pyx_n_s_eff_ttl;
static PyObject *__pyx_n_s_eget_async_lazy_recheck_kwargs;
static PyObject *__pyx_n_s_elazy_kwargs;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_encoding;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_n_s_errors;
static PyObject *__pyx_n_s_exc;
static PyObject *__pyx_n_s_exc_info;
static PyObject *__pyx_n_s_expire;
static PyObject *__pyx_n_s_expire_f;
static PyObject *__pyx_n_s_expire_private;
static PyObject *__pyx_n_s_expired_ttl;
static PyObject *__pyx_n_s_f;
static PyObject *__pyx_n_s_fclient;
static PyObject *__pyx_n_s_fcode;
static PyObject *__pyx_n_s_filter;
static PyObject *__pyx_n_s_flazy_recheck_put_deferred;
static PyObject *__pyx_n_s_fn;
static PyObject *__pyx_n_s_fname;
static PyObject *__pyx_n_s_fpath;
static PyObject *__pyx_n_s_fput_deferred;
static PyObject *__pyx_n_s_frv;
static PyObject *__pyx_n_s_func_code;
static PyObject *__pyx_n_s_func_name;
static PyObject *__pyx_n_s_functools;
static PyObject *__pyx_n_s_future;
static PyObject *__pyx_n_s_future_cached_f;
static PyObject *__pyx_n_s_future_expire_f;
static PyObject *__pyx_n_s_future_f;
static PyObject *__pyx_n_s_future_get_ttl_f;
static PyObject *__pyx_n_s_future_invalidate_f;
static PyObject *__pyx_n_s_future_lazy_cached_f;
static PyObject *__pyx_n_s_future_peek_cached_f;
static PyObject *__pyx_n_s_future_put_f;
static PyObject *__pyx_n_s_future_refresh_f;
static PyObject *__pyx_n_s_future_sync_check;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_getLogger;
static PyObject *__pyx_n_s_getTtl;
static PyObject *__pyx_n_s_get_kwargs;
static PyObject *__pyx_n_s_get_ttl;
static PyObject *__pyx_n_s_get_ttl_f;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_hashlib;
static PyObject *__pyx_n_s_hits;
static PyObject *__pyx_n_s_im_func;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_initialize;
static PyObject *__pyx_n_s_initialize_2;
static PyObject *__pyx_n_s_invalidate;
static PyObject *__pyx_n_s_invalidate_f;
static PyObject *__pyx_n_s_ipsub;
static PyObject *__pyx_n_s_is_async;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_kw;
static PyObject *__pyx_n_s_lazy;
static PyObject *__pyx_n_s_lazy_cached_f;
static PyObject *__pyx_n_s_lazy_kwargs;
static PyObject *__pyx_n_s_lazy_recheck_put_deferred;
static PyObject *__pyx_kp_s_lib_chorde_decorators_py;
static PyObject *__pyx_n_s_logging;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_make_namespace;
static PyObject *__pyx_n_s_max_miss_time;
static PyObject *__pyx_n_s_maxtime;
static PyObject *__pyx_n_s_md5;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_min_miss_time;
static PyObject *__pyx_n_s_miss;
static PyObject *__pyx_n_s_miss_nothreads;
static PyObject *__pyx_n_s_miss_time_histogram;
static PyObject *__pyx_n_s_miss_time_histogram_bins;
static PyObject *__pyx_n_s_miss_time_histogram_max;
static PyObject *__pyx_n_s_misses;
static PyObject *__pyx_n_s_mname;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_mq;
static PyObject *__pyx_n_s_multiprocessing;
static PyObject *__pyx_n_s_multiprocessing_cpu_count;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_namespace;
static PyObject *__pyx_n_s_namespace_2;
static PyObject *__pyx_n_s_nasync_client;
static PyObject *__pyx_n_s_nclient;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_no_coherence;
static PyObject *__pyx_n_s_nprivate;
static PyObject *__pyx_n_s_nshared;
static PyObject *__pyx_n_s_ntiered;
static PyObject *__pyx_n_s_of;
static PyObject *__pyx_n_s_on_any;
static PyObject *__pyx_n_s_on_any_once;
static PyObject *__pyx_n_s_on_exc;
static PyObject *__pyx_n_s_on_miss;
static PyObject *__pyx_n_s_on_promote;
static PyObject *__pyx_n_s_on_promote_f;
static PyObject *__pyx_n_s_on_value;
static PyObject *__pyx_n_s_on_value_f;
static PyObject *__pyx_n_s_p;
static PyObject *__pyx_n_s_partial;
static PyObject *__pyx_n_s_peek;
static PyObject *__pyx_n_s_peek_cached_f;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_placeholder;
static PyObject *__pyx_n_s_placeholder_value;
static PyObject *__pyx_n_s_placeholder_value_f;
static PyObject *__pyx_n_s_placeholder_value_fn_cell;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_private;
static PyObject *__pyx_n_s_promote;
static PyObject *__pyx_n_s_promote_callback;
static PyObject *__pyx_n_s_promote_callback_2;
static PyObject *__pyx_n_s_promote_callbacks;
static PyObject *__pyx_n_s_promote_callbacks_2;
static PyObject *__pyx_n_s_put;
static PyObject *__pyx_n_s_put_coherently;
static PyObject *__pyx_n_s_put_deferred;
static PyObject *__pyx_n_s_put_f;
static PyObject *__pyx_n_s_put_kwargs;
static PyObject *__pyx_n_s_pydoc;
static PyObject *__pyx_n_s_pyobj;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_CacheStats;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_r;
static PyObject *__pyx_n_s_random;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_ref;
static PyObject *__pyx_n_s_refresh;
static PyObject *__pyx_n_s_refresh_f;
static PyObject *__pyx_n_s_render_doc;
static PyObject *__pyx_n_s_renew;
static PyObject *__pyx_n_s_renew_time;
static PyObject *__pyx_n_s_rstrip;
static PyObject *__pyx_n_s_rv;
static PyObject *__pyx_n_s_rvttl;
static PyObject *__pyx_kp_s_s_d;
static PyObject *__pyx_kp_s_s_s_s;
static PyObject *__pyx_n_s_salt;
static PyObject *__pyx_n_s_salt2;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_set;
static PyObject *__pyx_n_s_set_histogram_bins;
static PyObject *__pyx_n_s_set_nothreads;
static PyObject *__pyx_n_s_setdefault;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_shared;
static PyObject *__pyx_n_s_shareds;
static PyObject *__pyx_n_s_sharedt;
static PyObject *__pyx_n_s_simple_put_deferred;
static PyObject *__pyx_n_s_slots;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_spread_type;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_stats;
static PyObject *__pyx_n_s_stop_initializing;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_sum_miss_time;
static PyObject *__pyx_n_s_sum_miss_time_sq;
static PyObject *__pyx_n_s_sync_errors;
static PyObject *__pyx_n_s_sync_misses;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_t0;
static PyObject *__pyx_n_s_t1;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_threadpool;
static PyObject *__pyx_n_s_tiered;
static PyObject *__pyx_n_s_tiered_2;
static PyObject *__pyx_n_s_tiered_opts;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_timings;
static PyObject *__pyx_n_s_touch_key;
static PyObject *__pyx_n_s_ttl;
static PyObject *__pyx_n_s_ttl_skip;
static PyObject *__pyx_n_s_ttl_spread;
static PyObject *__pyx_n_s_uncached;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_use_setstate;
static PyObject *__pyx_n_s_utf8;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_callback;
static PyObject *__pyx_n_s_value_callbacks;
static PyObject *__pyx_n_s_value_callbacks_2;
static PyObject *__pyx_n_s_value_decorator;
static PyObject *__pyx_n_s_value_deserialization_function;
static PyObject *__pyx_n_s_value_serialization_function;
static PyObject *__pyx_n_s_value_undecorator;
static PyObject *__pyx_n_s_w;
static PyObject *__pyx_n_s_wait;
static PyObject *__pyx_n_s_wait_time;
static PyObject *__pyx_n_s_weakref;
static PyObject *__pyx_n_s_wrapped;
static PyObject *__pyx_n_s_wrapper;
static PyObject *__pyx_n_s_wraps;
static PyObject *__pyx_n_s_wraps_2;
static PyObject *__pyx_n_s_wraps_locals_decor;
static PyObject *__pyx_lambda_funcdef_6chorde_10decorators_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f); /* proto */
static PyObject *__pyx_lambda_funcdef_6chorde_10decorators_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_lambda_funcdef_6chorde_10decorators_lambda7(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_lambda_funcdef_6chorde_10decorators_7_cython_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_15multiprocessing_cpu_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_5wraps_decor(PyObject *__pyx_self, PyObject *__pyx_v_wrapper); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_wraps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_wrapped); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_2_make_namespace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_salt, PyObject *__pyx_v_salt2); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_4_simple_put_deferred(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_future, PyObject *__pyx_v_client, PyObject *__pyx_v_f, PyObject *__pyx_v_key, PyObject *__pyx_v_ttl, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6_coherent_put_deferred(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_shared, PyObject *__pyx_v_async_ttl, PyObject *__pyx_v_future, PyObject *__pyx_v_client, PyObject *__pyx_v_f, PyObject *__pyx_v_key, PyObject *__pyx_v_ttl, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats___init__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_2clear(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_4set_histogram_bins(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_bins, PyObject *__pyx_v_maxtime); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_6add_histo(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, double __pyx_v_time); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_4hits___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_4hits_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_6misses___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_6misses_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_6errors___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_6errors_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_11sync_misses___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_11sync_misses_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_11sync_errors___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_11sync_errors_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_13min_miss_time___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_13min_miss_time_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_13max_miss_time___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_13max_miss_time_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_13sum_miss_time___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_13sum_miss_time_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_16sum_miss_time_sq___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_16sum_miss_time_sq_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_9wait_time___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_9wait_time_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_19miss_time_histogram___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_19miss_time_histogram_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_19miss_time_histogram_4__del__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_23miss_time_histogram_max___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_23miss_time_histogram_max_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static int __pyx_pf_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_8__reduce_cython__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_10__setstate_cython__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_17__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor__initialize(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_2af(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_4f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_6af(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_8f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_10cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_12get_ttl_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_14async_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_on_value(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_2on_miss(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_4on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_6on_value(PyObject *__pyx_self, PyObject *__pyx_v_contains); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_8on_miss(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_10on_exc(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_exc_info); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_16future_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_18lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_on_value(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_2on_miss(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_4on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_6on_value(PyObject *__pyx_self, PyObject *__pyx_v_contains); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_8on_miss(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_10on_exc(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_exc_info); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_on_value(PyObject *__pyx_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_2on_miss(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_4on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_22future_peek_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_24future_get_ttl_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_26invalidate_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_28future_invalidate_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_30expire_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_32async_expire_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_34future_expire_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_36put_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_38async_put_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_40future_put_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_19async_lazy_cached_f_touch_key(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_42async_lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_44refresh_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_46async_refresh_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_48future_refresh_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_50_promote_callback(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_52_value_callback(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_54on_promote_f(PyObject *__pyx_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_56on_value_f(PyObject *__pyx_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_58placeholder_value_f(PyObject *__pyx_self, PyObject *__pyx_v_fn); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_60future_f(PyObject *__pyx_self, PyObject *__pyx_v_initialize); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_62async_f(PyObject *__pyx_self, PyObject *__pyx_v_initialize); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda6(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_6cached_decor(PyObject *__pyx_self, PyObject *__pyx_v_f); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_21__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self, PyObject *__pyx_v_r); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_8cached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_client, PyObject *__pyx_v_ttl, PyObject *__pyx_v_key, PyObject *__pyx_v_namespace, PyObject *__pyx_v_value_serialization_function, PyObject *__pyx_v_value_deserialization_function, PyObject *__pyx_v_async_writer_queue_size, PyObject *__pyx_v_async_writer_workers, PyObject *__pyx_v_async_writer_threadpool, PyObject *__pyx_v_async_writer_kwargs, PyObject *__pyx_v_async_ttl, PyObject *__pyx_v_async_client, PyObject *__pyx_v_async_expire, PyObject *__pyx_v_lazy_kwargs, PyObject *__pyx_v_async_lazy_recheck, PyObject *__pyx_v_async_lazy_recheck_kwargs, PyObject *__pyx_v_async_processor, PyObject *__pyx_v_async_processor_workers, PyObject *__pyx_v_async_processor_threadpool, PyObject *__pyx_v_async_processor_kwargs, PyObject *__pyx_v_renew_time, PyObject *__pyx_v_future_sync_check, PyObject *__pyx_v_initialize, PyObject *__pyx_v_decorate, PyObject *__pyx_v_timings, PyObject *__pyx_v_ttl_spread, PyObject *__pyx_v_autonamespace_version_salt, PyObject *__pyx_v__eff_async_ttl, PyObject *__pyx_v__put_deferred, PyObject *__pyx_v__fput_deferred, PyObject *__pyx_v__lazy_recheck_put_deferred, PyObject *__pyx_v__flazy_recheck_put_deferred); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_19__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_15coherent_cached_decor(PyObject *__pyx_self, PyObject *__pyx_v_f); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_10coherent_cached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_private, PyObject *__pyx_v_shared, PyObject *__pyx_v_ipsub, PyObject *__pyx_v_ttl, PyObject *__pyx_v_key, PyObject *__pyx_v_tiered_, PyObject *__pyx_v_namespace, PyObject *__pyx_v_coherence_namespace, PyObject *__pyx_v_coherence_encoding, PyObject *__pyx_v_coherence_timeout, PyObject *__pyx_v_value_serialization_function, PyObject *__pyx_v_value_deserialization_function, PyObject *__pyx_v_async_writer_queue_size, PyObject *__pyx_v_async_writer_workers, PyObject *__pyx_v_async_writer_threadpool, PyObject *__pyx_v_async_writer_kwargs, PyObject *__pyx_v_async_ttl, PyObject *__pyx_v_async_expire, PyObject *__pyx_v_lazy_kwargs, PyObject *__pyx_v_async_lazy_recheck, PyObject *__pyx_v_async_lazy_recheck_kwargs, PyObject *__pyx_v_async_processor, PyObject *__pyx_v_async_processor_workers, PyObject *__pyx_v_async_processor_threadpool, PyObject *__pyx_v_async_processor_kwargs, PyObject *__pyx_v_renew_time, PyObject *__pyx_v_future_sync_check, PyObject *__pyx_v_initialize, PyObject *__pyx_v_decorate, PyObject *__pyx_v_tiered_opts, PyObject *__pyx_v_ttl_spread, PyObject *__pyx_v_wait_time, PyObject *__pyx_v_autonamespace_version_salt, PyObject *__pyx_v_coherence_kwargs); /* proto */
static PyObject *__pyx_pf_6chorde_10decorators_13__pyx_unpickle_CacheStats(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_6chorde_10decorators_CacheStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct__wraps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_2_cached(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_3_decor(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_4_future_cached_f(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_8_coherent_cached(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop = {0, &__pyx_n_s_pop, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_setdefault = {0, &__pyx_n_s_setdefault, 0, 0, 0};
static PyObject *__pyx_float_0_5;
static PyObject *__pyx_float_0_25;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_100;
static PyObject *__pyx_int_182819509;
static PyObject *__pyx_int_231492569;
static PyObject *__pyx_int_246650177;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_slice__3;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_codeobj__5;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__132;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__18;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__28;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__32;
static PyObject *__pyx_codeobj__34;
static PyObject *__pyx_codeobj__36;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__43;
static PyObject *__pyx_codeobj__45;
static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__51;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__59;
static PyObject *__pyx_codeobj__61;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__65;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__69;
static PyObject *__pyx_codeobj__71;
static PyObject *__pyx_codeobj__73;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__99;
static PyObject *__pyx_codeobj__101;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__131;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__139;
/* Late includes */

/* "chorde/decorators.py":26
 * except ImportError:
 *     # Make cython annotations work without cython
 *     _cy_noop = lambda f: f             # <<<<<<<<<<<<<<
 *     class _cython:
 *         locals = lambda **kw: _cy_noop
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_12lambda(PyObject *__pyx_self, PyObject *__pyx_v_f); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_12lambda = {"lambda", (PyCFunction)__pyx_pw_6chorde_10decorators_12lambda, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_12lambda(PyObject *__pyx_self, PyObject *__pyx_v_f) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_6chorde_10decorators_lambda(__pyx_self, ((PyObject *)__pyx_v_f));

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

static PyObject *__pyx_lambda_funcdef_6chorde_10decorators_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_f);
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

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

/* "chorde/decorators.py":134
 * 
 * def cached(client, ttl,
 *         key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),             # <<<<<<<<<<<<<<
 *         namespace = None,
 *         value_serialization_function = None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_15lambda3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_15lambda3 = {"lambda3", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_15lambda3, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_15lambda3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "lambda3", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_lambda_funcdef_6chorde_10decorators_lambda3(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_lambda_funcdef_6chorde_10decorators_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda3", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyFrozenSet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 134, __pyx_L1_error)
  if (!__pyx_t_4) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_t_1 = __pyx_empty_tuple;
  __pyx_L3_bool_binop_done:;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_p);
  __Pyx_GIVEREF(__pyx_v_p);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_p);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "chorde/decorators.py":1246
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,
 *             key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),             # <<<<<<<<<<<<<<
 *             tiered_ = None,
 *             namespace = None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_16lambda7(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_16lambda7 = {"lambda7", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_16lambda7, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_16lambda7(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda7 (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "lambda7", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_lambda_funcdef_6chorde_10decorators_lambda7(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_lambda_funcdef_6chorde_10decorators_lambda7(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda7", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyFrozenSet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1246, __pyx_L1_error)
  if (!__pyx_t_4) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_t_1 = __pyx_empty_tuple;
  __pyx_L3_bool_binop_done:;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_p);
  __Pyx_GIVEREF(__pyx_v_p);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_p);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

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

/* "chorde/decorators.py":28
 *     _cy_noop = lambda f: f
 *     class _cython:
 *         locals = lambda **kw: _cy_noop             # <<<<<<<<<<<<<<
 *     globals()['cython'] = _cython
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_7_cython_lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_7_cython_lambda1 = {"lambda1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_7_cython_lambda1, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_7_cython_lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("lambda1", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "lambda1", 1))) return NULL;
  __pyx_r = __pyx_lambda_funcdef_6chorde_10decorators_7_cython_lambda1(__pyx_self, __pyx_v_kw);

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

static PyObject *__pyx_lambda_funcdef_6chorde_10decorators_7_cython_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_kw) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_cy_noop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("chorde.decorators._cython.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":42
 *     class multiprocessing:
 *         @staticmethod
 *         def cpu_count():             # <<<<<<<<<<<<<<
 *             return 1
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_15multiprocessing_1cpu_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_15multiprocessing_1cpu_count = {"cpu_count", (PyCFunction)__pyx_pw_6chorde_10decorators_15multiprocessing_1cpu_count, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_15multiprocessing_1cpu_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cpu_count (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_15multiprocessing_cpu_count(__pyx_self);

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

static PyObject *__pyx_pf_6chorde_10decorators_15multiprocessing_cpu_count(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cpu_count", 0);

  /* "chorde/decorators.py":43
 *         @staticmethod
 *         def cpu_count():
 *             return 1             # <<<<<<<<<<<<<<
 * 
 * def wraps(wrapped):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "chorde/decorators.py":42
 *     class multiprocessing:
 *         @staticmethod
 *         def cpu_count():             # <<<<<<<<<<<<<<
 *             return 1
 * 
 */

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

/* "chorde/decorators.py":45
 *             return 1
 * 
 * def wraps(wrapped):             # <<<<<<<<<<<<<<
 *     w = _wraps(wrapped)
 *     def decor(wrapper):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_1wraps(PyObject *__pyx_self, PyObject *__pyx_v_wrapped); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_1wraps = {"wraps", (PyCFunction)__pyx_pw_6chorde_10decorators_1wraps, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_1wraps(PyObject *__pyx_self, PyObject *__pyx_v_wrapped) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wraps (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_wraps(__pyx_self, ((PyObject *)__pyx_v_wrapped));

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

/* "chorde/decorators.py":47
 * def wraps(wrapped):
 *     w = _wraps(wrapped)
 *     def decor(wrapper):             # <<<<<<<<<<<<<<
 *         wrapper = w(wrapper)
 *         wrapper.__doc__ = "\n".join(
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_5wraps_1decor(PyObject *__pyx_self, PyObject *__pyx_v_wrapper); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_5wraps_1decor = {"decor", (PyCFunction)__pyx_pw_6chorde_10decorators_5wraps_1decor, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_5wraps_1decor(PyObject *__pyx_self, PyObject *__pyx_v_wrapper) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decor (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_5wraps_decor(__pyx_self, ((PyObject *)__pyx_v_wrapper));

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

static PyObject *__pyx_pf_6chorde_10decorators_5wraps_decor(PyObject *__pyx_self, PyObject *__pyx_v_wrapper) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decor", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_INCREF(__pyx_v_wrapper);

  /* "chorde/decorators.py":48
 *     w = _wraps(wrapped)
 *     def decor(wrapper):
 *         wrapper = w(wrapper)             # <<<<<<<<<<<<<<
 *         wrapper.__doc__ = "\n".join(
 *             pydoc.render_doc(wrapped, 'cached %s:').split('\n', 4)[:3]
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_w)) { __Pyx_RaiseClosureNameError("w"); __PYX_ERR(0, 48, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_w);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_w; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_wrapper) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_wrapper);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_wrapper, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":50
 *         wrapper = w(wrapper)
 *         wrapper.__doc__ = "\n".join(
 *             pydoc.render_doc(wrapped, 'cached %s:').split('\n', 4)[:3]             # <<<<<<<<<<<<<<
 *             + list(filter(bool, [wrapper.__doc__])))
 *         return wrapper
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pydoc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_render_doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_wrapped)) { __Pyx_RaiseClosureNameError("wrapped"); __PYX_ERR(0, 50, __pyx_L1_error) }
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  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_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_wrapped, __pyx_kp_s_cached_s};
    __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, 50, __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_cur_scope->__pyx_v_wrapped, __pyx_kp_s_cached_s};
    __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, 50, __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, 50, __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_cur_scope->__pyx_v_wrapped);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_wrapped);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_cur_scope->__pyx_v_wrapped);
    __Pyx_INCREF(__pyx_kp_s_cached_s);
    __Pyx_GIVEREF(__pyx_kp_s_cached_s);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_kp_s_cached_s);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__3, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":51
 *         wrapper.__doc__ = "\n".join(
 *             pydoc.render_doc(wrapped, 'cached %s:').split('\n', 4)[:3]
 *             + list(filter(bool, [wrapper.__doc__])))             # <<<<<<<<<<<<<<
 *         return wrapper
 *     return decor
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wrapper, __pyx_n_s_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(((PyObject*)&PyBool_Type));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)&PyBool_Type));
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":49
 *     def decor(wrapper):
 *         wrapper = w(wrapper)
 *         wrapper.__doc__ = "\n".join(             # <<<<<<<<<<<<<<
 *             pydoc.render_doc(wrapped, 'cached %s:').split('\n', 4)[:3]
 *             + list(filter(bool, [wrapper.__doc__])))
 */
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_wrapper, __pyx_n_s_doc, __pyx_t_1) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":52
 *             pydoc.render_doc(wrapped, 'cached %s:').split('\n', 4)[:3]
 *             + list(filter(bool, [wrapper.__doc__])))
 *         return wrapper             # <<<<<<<<<<<<<<
 *     return decor
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrapper);
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "chorde/decorators.py":47
 * def wraps(wrapped):
 *     w = _wraps(wrapped)
 *     def decor(wrapper):             # <<<<<<<<<<<<<<
 *         wrapper = w(wrapper)
 *         wrapper.__doc__ = "\n".join(
 */

  /* function 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("chorde.decorators.wraps.decor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrapper);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":45
 *             return 1
 * 
 * def wraps(wrapped):             # <<<<<<<<<<<<<<
 *     w = _wraps(wrapped)
 *     def decor(wrapper):
 */

static PyObject *__pyx_pf_6chorde_10decorators_wraps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_wrapped) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *__pyx_cur_scope;
  PyObject *__pyx_v_decor = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wraps", 0);
  __pyx_cur_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *)__pyx_tp_new_6chorde_10decorators___pyx_scope_struct__wraps(__pyx_ptype_6chorde_10decorators___pyx_scope_struct__wraps, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 45, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_wrapped = __pyx_v_wrapped;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_wrapped);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_wrapped);

  /* "chorde/decorators.py":46
 * 
 * def wraps(wrapped):
 *     w = _wraps(wrapped)             # <<<<<<<<<<<<<<
 *     def decor(wrapper):
 *         wrapper = w(wrapper)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_wraps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_cur_scope->__pyx_v_wrapped) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_wrapped);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_w = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":47
 * def wraps(wrapped):
 *     w = _wraps(wrapped)
 *     def decor(wrapper):             # <<<<<<<<<<<<<<
 *         wrapper = w(wrapper)
 *         wrapper.__doc__ = "\n".join(
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_5wraps_1decor, 0, __pyx_n_s_wraps_locals_decor, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_decor = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":53
 *             + list(filter(bool, [wrapper.__doc__])))
 *         return wrapper
 *     return decor             # <<<<<<<<<<<<<<
 * 
 * def _make_namespace(f, salt = None, salt2 = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_decor);
  __pyx_r = __pyx_v_decor;
  goto __pyx_L0;

  /* "chorde/decorators.py":45
 *             return 1
 * 
 * def wraps(wrapped):             # <<<<<<<<<<<<<<
 *     w = _wraps(wrapped)
 *     def decor(wrapper):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("chorde.decorators.wraps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_decor);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":55
 *     return decor
 * 
 * def _make_namespace(f, salt = None, salt2 = None):             # <<<<<<<<<<<<<<
 *     f = getattr(f, 'im_func', f)
 *     fname = getattr(f, '__name__', None)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_3_make_namespace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_3_make_namespace = {"_make_namespace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_3_make_namespace, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_3_make_namespace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_salt = 0;
  PyObject *__pyx_v_salt2 = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_make_namespace (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_f,&__pyx_n_s_salt,&__pyx_n_s_salt2,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    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_f)) != 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_salt);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_salt2);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_make_namespace") < 0)) __PYX_ERR(0, 55, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_f = values[0];
    __pyx_v_salt = values[1];
    __pyx_v_salt2 = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_make_namespace", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 55, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("chorde.decorators._make_namespace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6chorde_10decorators_2_make_namespace(__pyx_self, __pyx_v_f, __pyx_v_salt, __pyx_v_salt2);

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

static PyObject *__pyx_pf_6chorde_10decorators_2_make_namespace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_salt, PyObject *__pyx_v_salt2) {
  PyObject *__pyx_v_fname = NULL;
  PyObject *__pyx_v_mname = NULL;
  PyObject *__pyx_v_fcode = NULL;
  PyObject *__pyx_v_fpath = NULL;
  PyObject *__pyx_v_body_digest = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_make_namespace", 0);
  __Pyx_INCREF(__pyx_v_f);

  /* "chorde/decorators.py":56
 * 
 * def _make_namespace(f, salt = None, salt2 = None):
 *     f = getattr(f, 'im_func', f)             # <<<<<<<<<<<<<<
 *     fname = getattr(f, '__name__', None)
 *     if fname is None:
 */
  __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_f, __pyx_n_s_im_func, __pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":57
 * def _make_namespace(f, salt = None, salt2 = None):
 *     f = getattr(f, 'im_func', f)
 *     fname = getattr(f, '__name__', None)             # <<<<<<<<<<<<<<
 *     if fname is None:
 *         fname = getattr(f, 'func_name', None)
 */
  __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_f, __pyx_n_s_name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":58
 *     f = getattr(f, 'im_func', f)
 *     fname = getattr(f, '__name__', None)
 *     if fname is None:             # <<<<<<<<<<<<<<
 *         fname = getattr(f, 'func_name', None)
 *     if fname is None:
 */
  __pyx_t_2 = (__pyx_v_fname == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "chorde/decorators.py":59
 *     fname = getattr(f, '__name__', None)
 *     if fname is None:
 *         fname = getattr(f, 'func_name', None)             # <<<<<<<<<<<<<<
 *     if fname is None:
 *         # FTW
 */
    __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_f, __pyx_n_s_func_name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_fname, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "chorde/decorators.py":58
 *     f = getattr(f, 'im_func', f)
 *     fname = getattr(f, '__name__', None)
 *     if fname is None:             # <<<<<<<<<<<<<<
 *         fname = getattr(f, 'func_name', None)
 *     if fname is None:
 */
  }

  /* "chorde/decorators.py":60
 *     if fname is None:
 *         fname = getattr(f, 'func_name', None)
 *     if fname is None:             # <<<<<<<<<<<<<<
 *         # FTW
 *         return repr(f)
 */
  __pyx_t_3 = (__pyx_v_fname == Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":62
 *     if fname is None:
 *         # FTW
 *         return repr(f)             # <<<<<<<<<<<<<<
 * 
 *     mname = getattr(f, '__module__', '')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyObject_Repr(__pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "chorde/decorators.py":60
 *     if fname is None:
 *         fname = getattr(f, 'func_name', None)
 *     if fname is None:             # <<<<<<<<<<<<<<
 *         # FTW
 *         return repr(f)
 */
  }

  /* "chorde/decorators.py":64
 *         return repr(f)
 * 
 *     mname = getattr(f, '__module__', '')             # <<<<<<<<<<<<<<
 * 
 *     fcode = getattr(f, '__code__', None)
 */
  __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_f, __pyx_n_s_module, __pyx_kp_s__6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_mname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":66
 *     mname = getattr(f, '__module__', '')
 * 
 *     fcode = getattr(f, '__code__', None)             # <<<<<<<<<<<<<<
 *     if fcode is None:
 *         fcode = getattr(f, 'func_code', None)
 */
  __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_f, __pyx_n_s_code, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fcode = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":67
 * 
 *     fcode = getattr(f, '__code__', None)
 *     if fcode is None:             # <<<<<<<<<<<<<<
 *         fcode = getattr(f, 'func_code', None)
 *     if fcode is not None:
 */
  __pyx_t_2 = (__pyx_v_fcode == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "chorde/decorators.py":68
 *     fcode = getattr(f, '__code__', None)
 *     if fcode is None:
 *         fcode = getattr(f, 'func_code', None)             # <<<<<<<<<<<<<<
 *     if fcode is not None:
 *         fpath = '%s:%d' % (fcode.co_filename, fcode.co_firstlineno)
 */
    __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_f, __pyx_n_s_func_code, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_fcode, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "chorde/decorators.py":67
 * 
 *     fcode = getattr(f, '__code__', None)
 *     if fcode is None:             # <<<<<<<<<<<<<<
 *         fcode = getattr(f, 'func_code', None)
 *     if fcode is not None:
 */
  }

  /* "chorde/decorators.py":69
 *     if fcode is None:
 *         fcode = getattr(f, 'func_code', None)
 *     if fcode is not None:             # <<<<<<<<<<<<<<
 *         fpath = '%s:%d' % (fcode.co_filename, fcode.co_firstlineno)
 *     else:
 */
  __pyx_t_3 = (__pyx_v_fcode != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":70
 *         fcode = getattr(f, 'func_code', None)
 *     if fcode is not None:
 *         fpath = '%s:%d' % (fcode.co_filename, fcode.co_firstlineno)             # <<<<<<<<<<<<<<
 *     else:
 *         fpath = ''
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fcode, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fcode, __pyx_n_s_co_firstlineno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
    __pyx_t_1 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_fpath = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":69
 *     if fcode is None:
 *         fcode = getattr(f, 'func_code', None)
 *     if fcode is not None:             # <<<<<<<<<<<<<<
 *         fpath = '%s:%d' % (fcode.co_filename, fcode.co_firstlineno)
 *     else:
 */
    goto __pyx_L6;
  }

  /* "chorde/decorators.py":72
 *         fpath = '%s:%d' % (fcode.co_filename, fcode.co_firstlineno)
 *     else:
 *         fpath = ''             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_kp_s__6);
    __pyx_v_fpath = __pyx_kp_s__6;
  }
  __pyx_L6:;

  /* "chorde/decorators.py":74
 *         fpath = ''
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         body_digest = md5(fpath.encode("utf8"))
 *         if salt:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":75
 * 
 *     try:
 *         body_digest = md5(fpath.encode("utf8"))             # <<<<<<<<<<<<<<
 *         if salt:
 *             body_digest.update(salt.encode("utf8"))
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_md5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 75, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_fpath, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 75, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_utf8);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_body_digest = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":76
 *     try:
 *         body_digest = md5(fpath.encode("utf8"))
 *         if salt:             # <<<<<<<<<<<<<<
 *             body_digest.update(salt.encode("utf8"))
 *         if salt2:
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_salt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 76, __pyx_L7_error)
      if (__pyx_t_2) {

        /* "chorde/decorators.py":77
 *         body_digest = md5(fpath.encode("utf8"))
 *         if salt:
 *             body_digest.update(salt.encode("utf8"))             # <<<<<<<<<<<<<<
 *         if salt2:
 *             body_digest.update(salt2.encode("utf8"))
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_body_digest, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_salt, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 77, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_utf8);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "chorde/decorators.py":76
 *     try:
 *         body_digest = md5(fpath.encode("utf8"))
 *         if salt:             # <<<<<<<<<<<<<<
 *             body_digest.update(salt.encode("utf8"))
 *         if salt2:
 */
      }

      /* "chorde/decorators.py":78
 *         if salt:
 *             body_digest.update(salt.encode("utf8"))
 *         if salt2:             # <<<<<<<<<<<<<<
 *             body_digest.update(salt2.encode("utf8"))
 *         if fcode:
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_salt2); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 78, __pyx_L7_error)
      if (__pyx_t_2) {

        /* "chorde/decorators.py":79
 *             body_digest.update(salt.encode("utf8"))
 *         if salt2:
 *             body_digest.update(salt2.encode("utf8"))             # <<<<<<<<<<<<<<
 *         if fcode:
 *             body_digest.update(getattr(fcode, 'co_code', b''))
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_body_digest, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_salt2, __pyx_n_s_encode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 79, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_utf8);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "chorde/decorators.py":78
 *         if salt:
 *             body_digest.update(salt.encode("utf8"))
 *         if salt2:             # <<<<<<<<<<<<<<
 *             body_digest.update(salt2.encode("utf8"))
 *         if fcode:
 */
      }

      /* "chorde/decorators.py":80
 *         if salt2:
 *             body_digest.update(salt2.encode("utf8"))
 *         if fcode:             # <<<<<<<<<<<<<<
 *             body_digest.update(getattr(fcode, 'co_code', b''))
 *         return "%s.%s#%s" % (mname,fname,b64encode(body_digest.digest()).rstrip(b"=\n"))
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fcode); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 80, __pyx_L7_error)
      if (__pyx_t_2) {

        /* "chorde/decorators.py":81
 *             body_digest.update(salt2.encode("utf8"))
 *         if fcode:
 *             body_digest.update(getattr(fcode, 'co_code', b''))             # <<<<<<<<<<<<<<
 *         return "%s.%s#%s" % (mname,fname,b64encode(body_digest.digest()).rstrip(b"=\n"))
 *     except Exception as e:
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_body_digest, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_fcode, __pyx_n_s_co_code, __pyx_kp_b__6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "chorde/decorators.py":80
 *         if salt2:
 *             body_digest.update(salt2.encode("utf8"))
 *         if fcode:             # <<<<<<<<<<<<<<
 *             body_digest.update(getattr(fcode, 'co_code', b''))
 *         return "%s.%s#%s" % (mname,fname,b64encode(body_digest.digest()).rstrip(b"=\n"))
 */
      }

      /* "chorde/decorators.py":82
 *         if fcode:
 *             body_digest.update(getattr(fcode, 'co_code', b''))
 *         return "%s.%s#%s" % (mname,fname,b64encode(body_digest.digest()).rstrip(b"=\n"))             # <<<<<<<<<<<<<<
 *     except Exception as e:
 *         return repr(f)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_b64encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_body_digest, __pyx_n_s_digest); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 82, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 82, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 82, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __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_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_kp_b__7) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_b__7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_mname);
      __Pyx_GIVEREF(__pyx_v_mname);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mname);
      __Pyx_INCREF(__pyx_v_fname);
      __Pyx_GIVEREF(__pyx_v_fname);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_fname);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L11_try_return;

      /* "chorde/decorators.py":74
 *         fpath = ''
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         body_digest = md5(fpath.encode("utf8"))
 *         if salt:
 */
    }
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "chorde/decorators.py":83
 *             body_digest.update(getattr(fcode, 'co_code', b''))
 *         return "%s.%s#%s" % (mname,fname,b64encode(body_digest.digest()).rstrip(b"=\n"))
 *     except Exception as e:             # <<<<<<<<<<<<<<
 *         return repr(f)
 * 
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_12) {
      __Pyx_AddTraceback("chorde.decorators._make_namespace", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 83, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_e = __pyx_t_1;

      /* "chorde/decorators.py":84
 *         return "%s.%s#%s" % (mname,fname,b64encode(body_digest.digest()).rstrip(b"=\n"))
 *     except Exception as e:
 *         return repr(f)             # <<<<<<<<<<<<<<
 * 
 * def _simple_put_deferred(future, client, f, key, ttl, *p, **kw):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = PyObject_Repr(__pyx_v_f); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 84, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L10_except_return;
    }
    goto __pyx_L9_except_error;
    __pyx_L9_except_error:;

    /* "chorde/decorators.py":74
 *         fpath = ''
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         body_digest = md5(fpath.encode("utf8"))
 *         if salt:
 */
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L11_try_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L10_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
  }

  /* "chorde/decorators.py":55
 *     return decor
 * 
 * def _make_namespace(f, salt = None, salt2 = None):             # <<<<<<<<<<<<<<
 *     f = getattr(f, 'im_func', f)
 *     fname = getattr(f, '__name__', None)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators._make_namespace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fname);
  __Pyx_XDECREF(__pyx_v_mname);
  __Pyx_XDECREF(__pyx_v_fcode);
  __Pyx_XDECREF(__pyx_v_fpath);
  __Pyx_XDECREF(__pyx_v_body_digest);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":86
 *         return repr(f)
 * 
 * def _simple_put_deferred(future, client, f, key, ttl, *p, **kw):             # <<<<<<<<<<<<<<
 *     defer = asyncache.Defer(f, *p, **kw)
 *     if future is not None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_5_simple_put_deferred(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_5_simple_put_deferred = {"_simple_put_deferred", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_5_simple_put_deferred, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_5_simple_put_deferred(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_future = 0;
  PyObject *__pyx_v_client = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_ttl = 0;
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_simple_put_deferred (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) > 5) {
    __pyx_v_p = PyTuple_GetSlice(__pyx_args, 5, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_p)) {
      __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_p);
  } else {
    __pyx_v_p = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_future,&__pyx_n_s_client,&__pyx_n_s_f,&__pyx_n_s_key,&__pyx_n_s_ttl,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_client)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_simple_put_deferred", 0, 5, 5, 1); __PYX_ERR(0, 86, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_simple_put_deferred", 0, 5, 5, 2); __PYX_ERR(0, 86, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_simple_put_deferred", 0, 5, 5, 3); __PYX_ERR(0, 86, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ttl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_simple_put_deferred", 0, 5, 5, 4); __PYX_ERR(0, 86, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 5) ? pos_args : 5;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, used_pos_args, "_simple_put_deferred") < 0)) __PYX_ERR(0, 86, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_future = values[0];
    __pyx_v_client = values[1];
    __pyx_v_f = values[2];
    __pyx_v_key = values[3];
    __pyx_v_ttl = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_simple_put_deferred", 0, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 86, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_p); __pyx_v_p = 0;
  __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
  __Pyx_AddTraceback("chorde.decorators._simple_put_deferred", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6chorde_10decorators_4_simple_put_deferred(__pyx_self, __pyx_v_future, __pyx_v_client, __pyx_v_f, __pyx_v_key, __pyx_v_ttl, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_4_simple_put_deferred(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_future, PyObject *__pyx_v_client, PyObject *__pyx_v_f, PyObject *__pyx_v_key, PyObject *__pyx_v_ttl, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  PyObject *__pyx_v_defer = 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;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_simple_put_deferred", 0);

  /* "chorde/decorators.py":87
 * 
 * def _simple_put_deferred(future, client, f, key, ttl, *p, **kw):
 *     defer = asyncache.Defer(f, *p, **kw)             # <<<<<<<<<<<<<<
 *     if future is not None:
 *         defer.future = future
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asyncache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Defer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_defer = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "chorde/decorators.py":88
 * def _simple_put_deferred(future, client, f, key, ttl, *p, **kw):
 *     defer = asyncache.Defer(f, *p, **kw)
 *     if future is not None:             # <<<<<<<<<<<<<<
 *         defer.future = future
 *     return client.put(key, defer, ttl)
 */
  __pyx_t_5 = (__pyx_v_future != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "chorde/decorators.py":89
 *     defer = asyncache.Defer(f, *p, **kw)
 *     if future is not None:
 *         defer.future = future             # <<<<<<<<<<<<<<
 *     return client.put(key, defer, ttl)
 * 
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_defer, __pyx_n_s_future, __pyx_v_future) < 0) __PYX_ERR(0, 89, __pyx_L1_error)

    /* "chorde/decorators.py":88
 * def _simple_put_deferred(future, client, f, key, ttl, *p, **kw):
 *     defer = asyncache.Defer(f, *p, **kw)
 *     if future is not None:             # <<<<<<<<<<<<<<
 *         defer.future = future
 *     return client.put(key, defer, ttl)
 */
  }

  /* "chorde/decorators.py":90
 *     if future is not None:
 *         defer.future = future
 *     return client.put(key, defer, ttl)             # <<<<<<<<<<<<<<
 * 
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_client, __pyx_n_s_put); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  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_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_key, __pyx_v_defer, __pyx_v_ttl};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_key, __pyx_v_defer, __pyx_v_ttl};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_4);
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_key);
    __Pyx_INCREF(__pyx_v_defer);
    __Pyx_GIVEREF(__pyx_v_defer);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_v_defer);
    __Pyx_INCREF(__pyx_v_ttl);
    __Pyx_GIVEREF(__pyx_v_ttl);
    PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_7, __pyx_v_ttl);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "chorde/decorators.py":86
 *         return repr(f)
 * 
 * def _simple_put_deferred(future, client, f, key, ttl, *p, **kw):             # <<<<<<<<<<<<<<
 *     defer = asyncache.Defer(f, *p, **kw)
 *     if future is not None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("chorde.decorators._simple_put_deferred", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_defer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":92
 *     return client.put(key, defer, ttl)
 * 
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):             # <<<<<<<<<<<<<<
 *     return client.put_coherently(key, ttl,
 *         lambda : not shared.contains(key, async_ttl),
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_7_coherent_put_deferred(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_7_coherent_put_deferred = {"_coherent_put_deferred", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_7_coherent_put_deferred, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_7_coherent_put_deferred(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shared = 0;
  PyObject *__pyx_v_async_ttl = 0;
  PyObject *__pyx_v_future = 0;
  PyObject *__pyx_v_client = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_ttl = 0;
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_coherent_put_deferred (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) > 7) {
    __pyx_v_p = PyTuple_GetSlice(__pyx_args, 7, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_p)) {
      __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_p);
  } else {
    __pyx_v_p = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shared,&__pyx_n_s_async_ttl,&__pyx_n_s_future,&__pyx_n_s_client,&__pyx_n_s_f,&__pyx_n_s_key,&__pyx_n_s_ttl,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shared)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_ttl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_coherent_put_deferred", 0, 7, 7, 1); __PYX_ERR(0, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_coherent_put_deferred", 0, 7, 7, 2); __PYX_ERR(0, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_client)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_coherent_put_deferred", 0, 7, 7, 3); __PYX_ERR(0, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_coherent_put_deferred", 0, 7, 7, 4); __PYX_ERR(0, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_coherent_put_deferred", 0, 7, 7, 5); __PYX_ERR(0, 92, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ttl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_coherent_put_deferred", 0, 7, 7, 6); __PYX_ERR(0, 92, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 7) ? pos_args : 7;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, used_pos_args, "_coherent_put_deferred") < 0)) __PYX_ERR(0, 92, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 7) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
    }
    __pyx_v_shared = values[0];
    __pyx_v_async_ttl = values[1];
    __pyx_v_future = values[2];
    __pyx_v_client = values[3];
    __pyx_v_f = values[4];
    __pyx_v_key = values[5];
    __pyx_v_ttl = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_coherent_put_deferred", 0, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 92, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_p); __pyx_v_p = 0;
  __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
  __Pyx_AddTraceback("chorde.decorators._coherent_put_deferred", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6chorde_10decorators_6_coherent_put_deferred(__pyx_self, __pyx_v_shared, __pyx_v_async_ttl, __pyx_v_future, __pyx_v_client, __pyx_v_f, __pyx_v_key, __pyx_v_ttl, __pyx_v_p, __pyx_v_kw);

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

/* "chorde/decorators.py":94
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):
 *     return client.put_coherently(key, ttl,
 *         lambda : not shared.contains(key, async_ttl),             # <<<<<<<<<<<<<<
 *         future,
 *         f, *p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_22_coherent_put_deferred_lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_22_coherent_put_deferred_lambda2 = {"lambda2", (PyCFunction)__pyx_pw_6chorde_10decorators_22_coherent_put_deferred_lambda2, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_22_coherent_put_deferred_lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda2", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_shared)) { __Pyx_RaiseClosureNameError("shared"); __PYX_ERR(0, 94, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_shared, __pyx_n_s_contains); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 94, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 94, __pyx_L1_error) }
  __pyx_t_3 = NULL;
  __pyx_t_4 = 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_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_key, __pyx_cur_scope->__pyx_v_async_ttl};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_key, __pyx_cur_scope->__pyx_v_async_ttl};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __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_cur_scope->__pyx_v_key);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_cur_scope->__pyx_v_key);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_ttl);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_ttl);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_cur_scope->__pyx_v_async_ttl);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("chorde.decorators._coherent_put_deferred.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":92
 *     return client.put(key, defer, ttl)
 * 
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):             # <<<<<<<<<<<<<<
 *     return client.put_coherently(key, ttl,
 *         lambda : not shared.contains(key, async_ttl),
 */

static PyObject *__pyx_pf_6chorde_10decorators_6_coherent_put_deferred(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_shared, PyObject *__pyx_v_async_ttl, PyObject *__pyx_v_future, PyObject *__pyx_v_client, PyObject *__pyx_v_f, PyObject *__pyx_v_key, PyObject *__pyx_v_ttl, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_coherent_put_deferred", 0);
  __pyx_cur_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *)__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred(__pyx_ptype_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 92, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_shared = __pyx_v_shared;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_shared);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_shared);
  __pyx_cur_scope->__pyx_v_async_ttl = __pyx_v_async_ttl;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_ttl);
  __pyx_cur_scope->__pyx_v_key = __pyx_v_key;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);

  /* "chorde/decorators.py":93
 * 
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):
 *     return client.put_coherently(key, ttl,             # <<<<<<<<<<<<<<
 *         lambda : not shared.contains(key, async_ttl),
 *         future,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_client, __pyx_n_s_put_coherently); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "chorde/decorators.py":94
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):
 *     return client.put_coherently(key, ttl,
 *         lambda : not shared.contains(key, async_ttl),             # <<<<<<<<<<<<<<
 *         future,
 *         f, *p, **kw)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_22_coherent_put_deferred_lambda2, 0, __pyx_n_s_coherent_put_deferred_locals_la, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "chorde/decorators.py":93
 * 
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):
 *     return client.put_coherently(key, ttl,             # <<<<<<<<<<<<<<
 *         lambda : not shared.contains(key, async_ttl),
 *         future,
 */
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_key);
  __Pyx_INCREF(__pyx_v_ttl);
  __Pyx_GIVEREF(__pyx_v_ttl);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ttl);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_future);
  __Pyx_GIVEREF(__pyx_v_future);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_future);
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_f);
  __pyx_t_2 = 0;

  /* "chorde/decorators.py":96
 *         lambda : not shared.contains(key, async_ttl),
 *         future,
 *         f, *p, **kw)             # <<<<<<<<<<<<<<
 * 
 * class CacheStats(object):
 */
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "chorde/decorators.py":93
 * 
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):
 *     return client.put_coherently(key, ttl,             # <<<<<<<<<<<<<<
 *         lambda : not shared.contains(key, async_ttl),
 *         future,
 */
  __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __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;

  /* "chorde/decorators.py":92
 *     return client.put(key, defer, ttl)
 * 
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):             # <<<<<<<<<<<<<<
 *     return client.put_coherently(key, ttl,
 *         lambda : not shared.contains(key, async_ttl),
 */

  /* function exit code */
  __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("chorde.decorators._coherent_put_deferred", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":106
 *     )
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.clear()
 *         self.set_histogram_bins(0, None)
 */

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

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

static int __pyx_pf_6chorde_10decorators_10CacheStats___init__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "chorde/decorators.py":107
 * 
 *     def __init__(self):
 *         self.clear()             # <<<<<<<<<<<<<<
 *         self.set_histogram_bins(0, None)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __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;

  /* "chorde/decorators.py":108
 *     def __init__(self):
 *         self.clear()
 *         self.set_histogram_bins(0, None)             # <<<<<<<<<<<<<<
 * 
 *     def clear(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_histogram_bins); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __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, 108, __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;

  /* "chorde/decorators.py":106
 *     )
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.clear()
 *         self.set_histogram_bins(0, None)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("chorde.decorators.CacheStats.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":110
 *         self.set_histogram_bins(0, None)
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         self.hits = self.misses = self.errors = self.sync_misses = self.sync_errors = 0
 *         self.max_miss_time = self.sum_miss_time = self.sum_miss_time_sq = self.wait_time = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_3clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_10CacheStats_3clear = {"clear", (PyCFunction)__pyx_pw_6chorde_10decorators_10CacheStats_3clear, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_3clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_2clear(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_2clear(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear", 0);

  /* "chorde/decorators.py":111
 * 
 *     def clear(self):
 *         self.hits = self.misses = self.errors = self.sync_misses = self.sync_errors = 0             # <<<<<<<<<<<<<<
 *         self.max_miss_time = self.sum_miss_time = self.sum_miss_time_sq = self.wait_time = 0
 *         self.min_miss_time = -1
 */
  __pyx_v_self->hits = 0;
  __pyx_v_self->misses = 0;
  __pyx_v_self->errors = 0;
  __pyx_v_self->sync_misses = 0;
  __pyx_v_self->sync_errors = 0;

  /* "chorde/decorators.py":112
 *     def clear(self):
 *         self.hits = self.misses = self.errors = self.sync_misses = self.sync_errors = 0
 *         self.max_miss_time = self.sum_miss_time = self.sum_miss_time_sq = self.wait_time = 0             # <<<<<<<<<<<<<<
 *         self.min_miss_time = -1
 * 
 */
  __pyx_v_self->max_miss_time = 0.0;
  __pyx_v_self->sum_miss_time = 0.0;
  __pyx_v_self->sum_miss_time_sq = 0.0;
  __pyx_v_self->wait_time = 0.0;

  /* "chorde/decorators.py":113
 *         self.hits = self.misses = self.errors = self.sync_misses = self.sync_errors = 0
 *         self.max_miss_time = self.sum_miss_time = self.sum_miss_time_sq = self.wait_time = 0
 *         self.min_miss_time = -1             # <<<<<<<<<<<<<<
 * 
 *     def set_histogram_bins(self, bins, maxtime):
 */
  __pyx_v_self->min_miss_time = -1.0;

  /* "chorde/decorators.py":110
 *         self.set_histogram_bins(0, None)
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         self.hits = self.misses = self.errors = self.sync_misses = self.sync_errors = 0
 *         self.max_miss_time = self.sum_miss_time = self.sum_miss_time_sq = self.wait_time = 0
 */

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

/* "chorde/decorators.py":115
 *         self.min_miss_time = -1
 * 
 *     def set_histogram_bins(self, bins, maxtime):             # <<<<<<<<<<<<<<
 *         if bins <= 0:
 *             self.miss_time_histogram_bins = self.miss_time_histogram_max = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_5set_histogram_bins(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_10CacheStats_5set_histogram_bins = {"set_histogram_bins", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_10CacheStats_5set_histogram_bins, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_5set_histogram_bins(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_bins = 0;
  PyObject *__pyx_v_maxtime = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_histogram_bins (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bins,&__pyx_n_s_maxtime,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_bins)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxtime)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_histogram_bins", 1, 2, 2, 1); __PYX_ERR(0, 115, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_histogram_bins") < 0)) __PYX_ERR(0, 115, __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_bins = values[0];
    __pyx_v_maxtime = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_histogram_bins", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 115, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("chorde.decorators.CacheStats.set_histogram_bins", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_4set_histogram_bins(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), __pyx_v_bins, __pyx_v_maxtime);

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_4set_histogram_bins(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_bins, PyObject *__pyx_v_maxtime) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  long __pyx_t_3;
  double __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_histogram_bins", 0);

  /* "chorde/decorators.py":116
 * 
 *     def set_histogram_bins(self, bins, maxtime):
 *         if bins <= 0:             # <<<<<<<<<<<<<<
 *             self.miss_time_histogram_bins = self.miss_time_histogram_max = 0
 *             self.miss_time_histogram = None
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_bins, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "chorde/decorators.py":117
 *     def set_histogram_bins(self, bins, maxtime):
 *         if bins <= 0:
 *             self.miss_time_histogram_bins = self.miss_time_histogram_max = 0             # <<<<<<<<<<<<<<
 *             self.miss_time_histogram = None
 *         else:
 */
    __pyx_v_self->miss_time_histogram_bins = 0;
    __pyx_v_self->miss_time_histogram_max = 0.0;

    /* "chorde/decorators.py":118
 *         if bins <= 0:
 *             self.miss_time_histogram_bins = self.miss_time_histogram_max = 0
 *             self.miss_time_histogram = None             # <<<<<<<<<<<<<<
 *         else:
 *             self.miss_time_histogram = [0] * bins
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->miss_time_histogram);
    __Pyx_DECREF(__pyx_v_self->miss_time_histogram);
    __pyx_v_self->miss_time_histogram = ((PyObject*)Py_None);

    /* "chorde/decorators.py":116
 * 
 *     def set_histogram_bins(self, bins, maxtime):
 *         if bins <= 0:             # <<<<<<<<<<<<<<
 *             self.miss_time_histogram_bins = self.miss_time_histogram_max = 0
 *             self.miss_time_histogram = None
 */
    goto __pyx_L3;
  }

  /* "chorde/decorators.py":120
 *             self.miss_time_histogram = None
 *         else:
 *             self.miss_time_histogram = [0] * bins             # <<<<<<<<<<<<<<
 *             self.miss_time_histogram_bins = bins
 *             self.miss_time_histogram_max = maxtime
 */
  /*else*/ {
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
    { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_bins); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_temp);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_temp;
    }
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->miss_time_histogram);
    __Pyx_DECREF(__pyx_v_self->miss_time_histogram);
    __pyx_v_self->miss_time_histogram = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "chorde/decorators.py":121
 *         else:
 *             self.miss_time_histogram = [0] * bins
 *             self.miss_time_histogram_bins = bins             # <<<<<<<<<<<<<<
 *             self.miss_time_histogram_max = maxtime
 * 
 */
    __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_v_bins); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L1_error)
    __pyx_v_self->miss_time_histogram_bins = __pyx_t_3;

    /* "chorde/decorators.py":122
 *             self.miss_time_histogram = [0] * bins
 *             self.miss_time_histogram_bins = bins
 *             self.miss_time_histogram_max = maxtime             # <<<<<<<<<<<<<<
 * 
 *     def add_histo(self, time):
 */
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_maxtime); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L1_error)
    __pyx_v_self->miss_time_histogram_max = __pyx_t_4;
  }
  __pyx_L3:;

  /* "chorde/decorators.py":115
 *         self.min_miss_time = -1
 * 
 *     def set_histogram_bins(self, bins, maxtime):             # <<<<<<<<<<<<<<
 *         if bins <= 0:
 *             self.miss_time_histogram_bins = self.miss_time_histogram_max = 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("chorde.decorators.CacheStats.set_histogram_bins", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":124
 *             self.miss_time_histogram_max = maxtime
 * 
 *     def add_histo(self, time):             # <<<<<<<<<<<<<<
 *         if self.miss_time_histogram:
 *             hmax = self.miss_time_histogram_max
 */

static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_7add_histo(PyObject *__pyx_v_self, PyObject *__pyx_arg_time); /*proto*/
static PyObject *__pyx_f_6chorde_10decorators_10CacheStats_add_histo(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, double __pyx_v_time, int __pyx_skip_dispatch) {
  long __pyx_v_hbins;
  double __pyx_v_hmax;
  double __pyx_v_hbin;
  PyObject *__pyx_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;
  double __pyx_t_7;
  long __pyx_t_8;
  double __pyx_t_9;
  double __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_histo", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_histo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6chorde_10decorators_10CacheStats_7add_histo)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = PyFloat_FromDouble(__pyx_v_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "chorde/decorators.py":125
 * 
 *     def add_histo(self, time):
 *         if self.miss_time_histogram:             # <<<<<<<<<<<<<<
 *             hmax = self.miss_time_histogram_max
 *             hbins = self.miss_time_histogram_bins
 */
  __pyx_t_6 = (__pyx_v_self->miss_time_histogram != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->miss_time_histogram) != 0);
  if (__pyx_t_6) {

    /* "chorde/decorators.py":126
 *     def add_histo(self, time):
 *         if self.miss_time_histogram:
 *             hmax = self.miss_time_histogram_max             # <<<<<<<<<<<<<<
 *             hbins = self.miss_time_histogram_bins
 *             hbin = min(hbins-1, min(hmax, time) * hbins / hmax)
 */
    __pyx_t_7 = __pyx_v_self->miss_time_histogram_max;
    __pyx_v_hmax = __pyx_t_7;

    /* "chorde/decorators.py":127
 *         if self.miss_time_histogram:
 *             hmax = self.miss_time_histogram_max
 *             hbins = self.miss_time_histogram_bins             # <<<<<<<<<<<<<<
 *             hbin = min(hbins-1, min(hmax, time) * hbins / hmax)
 *             self.miss_time_histogram[hbin] += 1
 */
    __pyx_t_8 = __pyx_v_self->miss_time_histogram_bins;
    __pyx_v_hbins = __pyx_t_8;

    /* "chorde/decorators.py":128
 *             hmax = self.miss_time_histogram_max
 *             hbins = self.miss_time_histogram_bins
 *             hbin = min(hbins-1, min(hmax, time) * hbins / hmax)             # <<<<<<<<<<<<<<
 *             self.miss_time_histogram[hbin] += 1
 * 
 */
    __pyx_t_7 = __pyx_v_time;
    __pyx_t_9 = __pyx_v_hmax;
    if (((__pyx_t_7 < __pyx_t_9) != 0)) {
      __pyx_t_10 = __pyx_t_7;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_t_7 = (__pyx_t_10 * __pyx_v_hbins);
    if (unlikely(__pyx_v_hmax == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 128, __pyx_L1_error)
    }
    __pyx_t_10 = (__pyx_t_7 / __pyx_v_hmax);
    __pyx_t_8 = (__pyx_v_hbins - 1);
    if (((__pyx_t_10 < __pyx_t_8) != 0)) {
      __pyx_t_7 = __pyx_t_10;
    } else {
      __pyx_t_7 = __pyx_t_8;
    }
    __pyx_v_hbin = __pyx_t_7;

    /* "chorde/decorators.py":129
 *             hbins = self.miss_time_histogram_bins
 *             hbin = min(hbins-1, min(hmax, time) * hbins / hmax)
 *             self.miss_time_histogram[hbin] += 1             # <<<<<<<<<<<<<<
 * 
 * decorated_functions = weakref.WeakSet()
 */
    if (unlikely(__pyx_v_self->miss_time_histogram == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 129, __pyx_L1_error)
    }
    __Pyx_INCREF(__pyx_v_self->miss_time_histogram);
    __pyx_t_11 = __pyx_v_self->miss_time_histogram;
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_hbin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_t_11 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 129, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__pyx_t_11 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 129, __pyx_L1_error)
    }
    if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_t_1, __pyx_t_4) < 0)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "chorde/decorators.py":125
 * 
 *     def add_histo(self, time):
 *         if self.miss_time_histogram:             # <<<<<<<<<<<<<<
 *             hmax = self.miss_time_histogram_max
 *             hbins = self.miss_time_histogram_bins
 */
  }

  /* "chorde/decorators.py":124
 *             self.miss_time_histogram_max = maxtime
 * 
 *     def add_histo(self, time):             # <<<<<<<<<<<<<<
 *         if self.miss_time_histogram:
 *             hmax = self.miss_time_histogram_max
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.CacheStats.add_histo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_7add_histo(PyObject *__pyx_v_self, PyObject *__pyx_arg_time); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_10CacheStats_7add_histo = {"add_histo", (PyCFunction)__pyx_pw_6chorde_10decorators_10CacheStats_7add_histo, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_7add_histo(PyObject *__pyx_v_self, PyObject *__pyx_arg_time) {
  double __pyx_v_time;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_histo (wrapper)", 0);
  assert(__pyx_arg_time); {
    __pyx_v_time = __pyx_PyFloat_AsDouble(__pyx_arg_time); if (unlikely((__pyx_v_time == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 124, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("chorde.decorators.CacheStats.add_histo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_6add_histo(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((double)__pyx_v_time));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_6add_histo(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, double __pyx_v_time) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_histo", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6chorde_10decorators_10CacheStats_add_histo(__pyx_v_self, __pyx_v_time, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("chorde.decorators.CacheStats.add_histo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.pxd":5
 * @cython.no_gc
 * cdef class CacheStats(object):
 *     cdef public long long hits             # <<<<<<<<<<<<<<
 *     cdef public long long misses
 *     cdef public long long errors
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_4hits_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_4hits_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_4hits___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_4hits___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->hits); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_4hits_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_4hits_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_4hits_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_4hits_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_1 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 5, __pyx_L1_error)
  __pyx_v_self->hits = __pyx_t_1;

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

/* "chorde/decorators.pxd":6
 * cdef class CacheStats(object):
 *     cdef public long long hits
 *     cdef public long long misses             # <<<<<<<<<<<<<<
 *     cdef public long long errors
 *     cdef public long long sync_misses
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_6misses_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_6misses_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_6misses___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_6misses___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->misses); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_6misses_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_6misses_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_6misses_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_6misses_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_1 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 6, __pyx_L1_error)
  __pyx_v_self->misses = __pyx_t_1;

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

/* "chorde/decorators.pxd":7
 *     cdef public long long hits
 *     cdef public long long misses
 *     cdef public long long errors             # <<<<<<<<<<<<<<
 *     cdef public long long sync_misses
 *     cdef public long long sync_errors
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_6errors_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_6errors_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_6errors___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_6errors___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_6errors_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_6errors_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_6errors_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_6errors_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_1 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 7, __pyx_L1_error)
  __pyx_v_self->errors = __pyx_t_1;

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

/* "chorde/decorators.pxd":8
 *     cdef public long long misses
 *     cdef public long long errors
 *     cdef public long long sync_misses             # <<<<<<<<<<<<<<
 *     cdef public long long sync_errors
 *     cdef public double min_miss_time
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_11sync_misses_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_11sync_misses_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_11sync_misses___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_11sync_misses___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->sync_misses); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_11sync_misses_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_11sync_misses_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_11sync_misses_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_11sync_misses_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_1 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 8, __pyx_L1_error)
  __pyx_v_self->sync_misses = __pyx_t_1;

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

/* "chorde/decorators.pxd":9
 *     cdef public long long errors
 *     cdef public long long sync_misses
 *     cdef public long long sync_errors             # <<<<<<<<<<<<<<
 *     cdef public double min_miss_time
 *     cdef public double max_miss_time
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_11sync_errors_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_11sync_errors_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_11sync_errors___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_11sync_errors___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->sync_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_11sync_errors_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_11sync_errors_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_11sync_errors_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_11sync_errors_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_1 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 9, __pyx_L1_error)
  __pyx_v_self->sync_errors = __pyx_t_1;

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

/* "chorde/decorators.pxd":10
 *     cdef public long long sync_misses
 *     cdef public long long sync_errors
 *     cdef public double min_miss_time             # <<<<<<<<<<<<<<
 *     cdef public double max_miss_time
 *     cdef public double sum_miss_time
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_13min_miss_time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_13min_miss_time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_13min_miss_time___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_13min_miss_time___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->min_miss_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_13min_miss_time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_13min_miss_time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_13min_miss_time_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_13min_miss_time_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 10, __pyx_L1_error)
  __pyx_v_self->min_miss_time = __pyx_t_1;

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

/* "chorde/decorators.pxd":11
 *     cdef public long long sync_errors
 *     cdef public double min_miss_time
 *     cdef public double max_miss_time             # <<<<<<<<<<<<<<
 *     cdef public double sum_miss_time
 *     cdef public double sum_miss_time_sq
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_13max_miss_time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_13max_miss_time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_13max_miss_time___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_13max_miss_time___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->max_miss_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_13max_miss_time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_13max_miss_time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_13max_miss_time_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_13max_miss_time_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 11, __pyx_L1_error)
  __pyx_v_self->max_miss_time = __pyx_t_1;

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

/* "chorde/decorators.pxd":12
 *     cdef public double min_miss_time
 *     cdef public double max_miss_time
 *     cdef public double sum_miss_time             # <<<<<<<<<<<<<<
 *     cdef public double sum_miss_time_sq
 *     cdef public double wait_time
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_13sum_miss_time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_13sum_miss_time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_13sum_miss_time___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_13sum_miss_time___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->sum_miss_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_13sum_miss_time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_13sum_miss_time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_13sum_miss_time_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_13sum_miss_time_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_v_self->sum_miss_time = __pyx_t_1;

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

/* "chorde/decorators.pxd":13
 *     cdef public double max_miss_time
 *     cdef public double sum_miss_time
 *     cdef public double sum_miss_time_sq             # <<<<<<<<<<<<<<
 *     cdef public double wait_time
 *     cdef public list miss_time_histogram
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_16sum_miss_time_sq_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_16sum_miss_time_sq_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_16sum_miss_time_sq___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_16sum_miss_time_sq___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->sum_miss_time_sq); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_16sum_miss_time_sq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_16sum_miss_time_sq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_16sum_miss_time_sq_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_16sum_miss_time_sq_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_v_self->sum_miss_time_sq = __pyx_t_1;

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

/* "chorde/decorators.pxd":14
 *     cdef public double sum_miss_time
 *     cdef public double sum_miss_time_sq
 *     cdef public double wait_time             # <<<<<<<<<<<<<<
 *     cdef public list miss_time_histogram
 *     cdef public double miss_time_histogram_max
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_9wait_time_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_9wait_time_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_9wait_time___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_9wait_time___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->wait_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_9wait_time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_9wait_time_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_9wait_time_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_9wait_time_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 14, __pyx_L1_error)
  __pyx_v_self->wait_time = __pyx_t_1;

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

/* "chorde/decorators.pxd":15
 *     cdef public double sum_miss_time_sq
 *     cdef public double wait_time
 *     cdef public list miss_time_histogram             # <<<<<<<<<<<<<<
 *     cdef public double miss_time_histogram_max
 *     cdef public long miss_time_histogram_bins
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_19miss_time_histogram_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_19miss_time_histogram_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_19miss_time_histogram___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

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

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_19miss_time_histogram_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_19miss_time_histogram_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_19miss_time_histogram_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_19miss_time_histogram_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 15, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->miss_time_histogram);
  __Pyx_DECREF(__pyx_v_self->miss_time_histogram);
  __pyx_v_self->miss_time_histogram = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("chorde.decorators.CacheStats.miss_time_histogram.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_19miss_time_histogram_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_19miss_time_histogram_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_19miss_time_histogram_4__del__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_19miss_time_histogram_4__del__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->miss_time_histogram);
  __Pyx_DECREF(__pyx_v_self->miss_time_histogram);
  __pyx_v_self->miss_time_histogram = ((PyObject*)Py_None);

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

/* "chorde/decorators.pxd":16
 *     cdef public double wait_time
 *     cdef public list miss_time_histogram
 *     cdef public double miss_time_histogram_max             # <<<<<<<<<<<<<<
 *     cdef public long miss_time_histogram_bins
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_23miss_time_histogram_max_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_23miss_time_histogram_max_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_23miss_time_histogram_max___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_23miss_time_histogram_max___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->miss_time_histogram_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_23miss_time_histogram_max_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_23miss_time_histogram_max_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_23miss_time_histogram_max_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_23miss_time_histogram_max_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L1_error)
  __pyx_v_self->miss_time_histogram_max = __pyx_t_1;

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

/* "chorde/decorators.pxd":17
 *     cdef public list miss_time_histogram
 *     cdef public double miss_time_histogram_max
 *     cdef public long miss_time_histogram_bins             # <<<<<<<<<<<<<<
 * 
 *     @cython.locals(hbins=long)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins___get__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins___get__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_self->miss_time_histogram_bins); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins_2__set__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins_2__set__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_long(__pyx_v_value); if (unlikely((__pyx_t_1 == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_v_self->miss_time_histogram_bins = __pyx_t_1;

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

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

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_10CacheStats_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_6chorde_10decorators_10CacheStats_9__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_8__reduce_cython__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_6chorde_10decorators_10CacheStats_8__reduce_cython__(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.errors, self.hits, self.max_miss_time, self.min_miss_time, self.miss_time_histogram, self.miss_time_histogram_bins, self.miss_time_histogram_max, self.misses, self.sum_miss_time, self.sum_miss_time_sq, self.sync_errors, self.sync_misses, self.wait_time)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->hits); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->max_miss_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->min_miss_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_self->miss_time_histogram_bins); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->miss_time_histogram_max); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->misses); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->sum_miss_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->sum_miss_time_sq); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->sync_errors); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->sync_misses); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = PyFloat_FromDouble(__pyx_v_self->wait_time); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = PyTuple_New(13); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->miss_time_histogram);
  __Pyx_GIVEREF(__pyx_v_self->miss_time_histogram);
  PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_v_self->miss_time_histogram);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_13, 5, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_13, 6, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_13, 7, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_13, 8, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_13, 9, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_13, 10, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_13, 11, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_13, 12, __pyx_t_12);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_13);
  __pyx_t_13 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.errors, self.hits, self.max_miss_time, self.min_miss_time, self.miss_time_histogram, self.miss_time_histogram_bins, self.miss_time_histogram_max, self.misses, self.sum_miss_time, self.sum_miss_time_sq, self.sync_errors, self.sync_misses, self.wait_time)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_13 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_v__dict = __pyx_t_13;
  __pyx_t_13 = 0;

  /* "(tree fragment)":7
 *     state = (self.errors, self.hits, self.max_miss_time, self.min_miss_time, self.miss_time_histogram, self.miss_time_histogram_bins, self.miss_time_histogram_max, self.misses, self.sum_miss_time, self.sum_miss_time_sq, self.sync_errors, self.sync_misses, self.wait_time)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_14 = (__pyx_v__dict != Py_None);
  __pyx_t_15 = (__pyx_t_14 != 0);
  if (__pyx_t_15) {

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

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

    /* "(tree fragment)":7
 *     state = (self.errors, self.hits, self.max_miss_time, self.min_miss_time, self.miss_time_histogram, self.miss_time_histogram_bins, self.miss_time_histogram_max, self.misses, self.sum_miss_time, self.sum_miss_time_sq, self.sync_errors, self.sync_misses, self.wait_time)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.miss_time_histogram is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CacheStats, (type(self), 0xeb39541, None), state
 */
  /*else*/ {
    __pyx_t_15 = (__pyx_v_self->miss_time_histogram != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_15;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.miss_time_histogram is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CacheStats, (type(self), 0xeb39541, None), state
 *     else:
 */
  __pyx_t_15 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_15) {

    /* "(tree fragment)":13
 *         use_setstate = self.miss_time_histogram is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CacheStats, (type(self), 0xeb39541, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CacheStats, (type(self), 0xeb39541, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_pyx_unpickle_CacheStats); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_246650177);
    __Pyx_GIVEREF(__pyx_int_246650177);
    PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_int_246650177);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_13, 2, Py_None);
    __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_13);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_state);
    __pyx_t_12 = 0;
    __pyx_t_13 = 0;
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;

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

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CacheStats, (type(self), 0xeb39541, None), state
 *     else:
 *         return __pyx_unpickle_CacheStats, (type(self), 0xeb39541, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CacheStats__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_pyx_unpickle_CacheStats); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_246650177);
    __Pyx_GIVEREF(__pyx_int_246650177);
    PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_int_246650177);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_v_state);
    __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_13);
    __pyx_t_11 = 0;
    __pyx_t_13 = 0;
    __pyx_r = __pyx_t_12;
    __pyx_t_12 = 0;
    goto __pyx_L0;
  }

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("chorde.decorators.CacheStats.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CacheStats, (type(self), 0xeb39541, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CacheStats__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_10CacheStats_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_6chorde_10decorators_10CacheStats_11__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_10CacheStats_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_10CacheStats_10__setstate_cython__(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CacheStats, (type(self), 0xeb39541, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CacheStats__set_state(self, __pyx_state)
 */

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

/* "chorde/decorators.py":133
 * decorated_functions = weakref.WeakSet()
 * 
 * def cached(client, ttl,             # <<<<<<<<<<<<<<
 *         key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *         namespace = None,
 */

static PyObject *__pyx_pf_6chorde_10decorators_17__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);

  /* "chorde/decorators.py":163
 *         _fput_deferred = None,
 *         _lazy_recheck_put_deferred = None,
 *         _flazy_recheck_put_deferred = None ):             # <<<<<<<<<<<<<<
 *     """
 *     This decorator provides cacheability to suitable functions.
 */
  __pyx_t_1 = PyTuple_New(30); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_key);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_key);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 7, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 8, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 9, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 10, ((PyObject *)Py_None));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_lazy_kwargs);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_lazy_kwargs);
  PyTuple_SET_ITEM(__pyx_t_1, 11, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_lazy_kwargs);
  __Pyx_INCREF(((PyObject *)Py_False));
  __Pyx_GIVEREF(((PyObject *)Py_False));
  PyTuple_SET_ITEM(__pyx_t_1, 12, ((PyObject *)Py_False));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_async_lazy_recheck_kwargs);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_async_lazy_recheck_kwargs);
  PyTuple_SET_ITEM(__pyx_t_1, 13, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_async_lazy_recheck_kwargs);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 14, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 15, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 16, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 17, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 18, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 19, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 20, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 21, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_True));
  __Pyx_GIVEREF(((PyObject *)Py_True));
  PyTuple_SET_ITEM(__pyx_t_1, 22, ((PyObject *)Py_True));
  __Pyx_INCREF(((PyObject *)Py_True));
  __Pyx_GIVEREF(((PyObject *)Py_True));
  PyTuple_SET_ITEM(__pyx_t_1, 23, ((PyObject *)Py_True));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 24, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 25, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 26, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 27, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 28, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 29, ((PyObject *)Py_None));

  /* "chorde/decorators.py":133
 * decorated_functions = weakref.WeakSet()
 * 
 * def cached(client, ttl,             # <<<<<<<<<<<<<<
 *         key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *         namespace = None,
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __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("chorde.decorators.__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_6chorde_10decorators_9cached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6chorde_10decorators_8cached[] = "\n    This decorator provides cacheability to suitable functions.\n\n    To be considered suitable, the values received on parameters must be immutable types (otherwise caching will\n    be unreliable).\n\n    Caches are thread-safe only if the provided clients are thread-safe, no additional safety is provided. If you\n    have a thread-unsafe client you want to make safe, use a (ReadWrite)SyncAdapter. Since synchronization adapters\n    only apply to store manipuation functions, and not the wrapped function, deadlocks cannot occur.\n\n    The decorated function will provide additional behavior through\n\n    Attributes\n    ----------\n\n        client: the backing cache client. The provided client is never used as-is, and instead is wrapped in a\n            NamespaceWrapper. This is it.\n\n        ttl: The configured TTL\n\n        async_ttl: The configured async TTL\n\n        clear(): forget all cached values. Since the client might be shared, it will only increase an internal\n            revision mark used to decorate keys, so the cache will not be immediately purged. For that, use\n            client.clear() (but beware that it will also clear other caches sharing the same client).\n\n        invalidate(...): mimicking the underlying function's signature, it will, instead of invoking the function,\n            invalidate cached entries sharing the call's key.\n\n        expire(...): like invalidate, but the key is just marked as out-of-date, requiring immediate refresh,\n            but not completely invalid.\n\n        put(_cache_put, ...): mimicking the underlying function's signature after the first positional argument,\n            except for one keyword argument _cache_put, it will forcibly set the cached value for that key to\n            be what's supplied in _cache_put. Although there will be no invocation of the target function,\n            the write will be synchronous unless the underlying cache client is async, and for external caches\n        ""    this might still mean a significant delay.\n\n        refresh(...): mimicking the underlying function's signature, it will forcefully invoke the function,\n            regardless of cache status, and refresh the cache with the returned value.\n\n        uncached(...): this is the underlying function, undecorated.\n\n        peek(...): mimicking the underlying function's signature, it will query the cache without ever invoking\n            the underlying function. If the cache doesn't contain the key, a CacheMissError will be raised.\n\n        get_ttl(...): mimicking the underlying function's signature, it will query the cache without ever invoking\n            the underlying function, and return both the result and the ttl. Misses return NONE as value and\n            a negative ttl, instead of raising a CacheMissError.\n\n        lazy(...): mimicking the underlying function's signature, it will behave just like a cached function call,\n            except that if there is no value, instead of waiting for one to be computed, it will just raise\n            a CacheMissError. If the access is async, it will start a background computation. Otherwise, it will\n            behave just as peek.\n\n        future(...): probably the preferred way of accessing the cache on an asynchronous app, it will return\n            a decorated function that will return futures that will receive the value when done.\n            For straight calls, if lazy would not raise a CacheMissError, the future will already contain the value,\n            resulting in no delays. If the client is tiered and has remote tiers, it's recommendable to add proper\n            lazy_kwargs to avoid this synchronous call blocking. Other forms of access perform similarly, always\n            returning a future immediately without blocking. Alternatively, setting future_sync_check to False\n            will disable this check and always do it through the processor.\n\n        async(): if the underlying cl""ient is async, it will return the decorated function (self). Otherwise, it will\n            be another decorated function, created on demand, backed by the same client wrapped in an async adapter.\n            As such, it can be used to perform asynchronous operations on an otherwise synchronous function.\n\n        on_promote: subdecorator that registers callbacks that will receive promotion events from this function.\n\n        on_value: subdecorator that registers callbacks that will receive freshly computed values from this function.\n            The callback will receive the value as its first argument, and all the original arguments for the call\n            that initiated the computation following that argument (including keyword arguments).\n\n        stats: cache statistics, containing:\n            hits - number of cache hits\n            misses - number of cache misses\n            errors - number of exceptions caught\n            sync_misses - number of synchronous (blocking) misses\n            sync_errors - number of synchronous exceptions (propagated to caller)\n\n            min_miss_time - minimum time spent computing a miss\n            max_miss_time - maximum time spent computing a miss\n            sum_miss_time - total time spent computing a miss (divide by misses and get an average)\n            sum_miss_time_sq - sum of squared times spent computing a miss (to compute standard deviation)\n\n            miss_time_histogram - histogram of times spent computing misses, computed only if histogram\n                bins and limits are set.\n            miss_time_histogram_bins - number of bins configured\n            miss_time_histogram_max - maximum histogram time configured\n\n            wait_time - time spent waiting for async updates, that's sync miss time on async queries\n\n            reset(): clear all statistics\n            set_histogram_bins(bins, max): configure histogram collection to use \"bins\" bins spanning\n                from 0"" to max. If bins is set to 0, max is ignored, and histogram collection is disabled\n\n            All values are approximate, as no synchroniation is attempted while updating.\n\n            sync_misses and sync_errors are caller-visible misses or exceptions. The difference with\n            misses and errors respectively are the number of caller-invisible misses or errors.\n\n    Parameters\n    ----------\n\n        client: the cache store client to be used\n\n        ttl: the time, in seconds, during which values remain valid.\n\n        callkey: the given key-computing callable\n\n        renew_time: if not None, the time, in seconds, to add to the TTL when an item is scheduled for\n            refresh. This renews the current item at a cost, but prevents concurrent readers from attempting\n            their own refresh in a rather simple way, short of using a coherence protocol. Roughly\n            equivalent to the dogpile pattern with a timeout as specified.\n\n        key: (optional) A key derivation function, that will take the same arguments as the underlying function,\n            and should return a key suitable to the client. If not provided, a default implementation that will\n            usually work for most primitive argument types will be used.\n\n        namespace: (optional) If provided, the namespace used to identify cache entries will be the one provided.\n            If not, a default one will be derived out of the function's module and name, which may differ between\n            platforms, so you'll want to provide a stable one for shared caches. If NO_NAMEPSACE is given,\n            no namespace decoration will be applied. Specify if somehow collisions are certain not to occur.\n\n        autonamespace_version_salt: (optional) If provided, it will alter the automatically generated namespace\n            in a predictable and stable way. Can be used to force version upgrades when the automatic namespace\n            is not able to pick up co""de changes.\n\n        value_serialization_function: (optional) If provided, values will not be stored directly into the cache,\n            but the result of applying this function to them. Use if the cache is remote and does not natively\n            support the results given by the underlying function, or if stripping of runtime-specific data is\n            required.\n\n        value_deserialization_function: (optional) Counterpart to value_serialization_function, it will be applied\n            on values coming from the cache, before returning them as cached function calls.\n\n        async_writer_queue_size: (optional) Writer queue size used for the async() client. Default is 100.\n\n        async_writer_workers: (optional) Number of async workers for the async() client.\n            Default is multiprocessing.cpu_count\n\n        async_writer_threadpool: (optional) Threadpool to be used for the async writer, instead of\n            workers, this can specify a specific thread pool to use (perhaps shared among other writers).\n            It can also be a callable, in which case it must be a factory function that takes the number\n            of workers as argument and returns a threadpool to be used. It's recommendable to always use\n            factories instead of instances, to avoid premature thread initialization.\n\n        async_writer_kwargs: (optional) Optional arguments to be used when constructing AsyncWriteCacheClient\n            wrappers. Ignored if an explicit async_client is given.\n\n        async_client: (optional) Alternatively to async_writer_queue_size and async_writer_workers, a specific\n            async client may be specified. It is expected this client will be an async wrapper of the 'client'\n            mandatorily specified, that can be shared among decorated functions (to avoid multiplying writer\n            threads).\n\n        async_ttl: (optional) The TTL at which an async refresh starts. For example, async_ttl=1 means to star""t\n            a refresh just 1 second before the entry expires. It must be smaller than ttl. Default is half the TTL.\n            If negative, it means ttl - async_ttl, which reverses the logic to mean \"async_ttl\" seconds after\n            creation of the cache entry.\n\n        async_processor_workers: (optional) Number of threads used for async cache operations (only applies to\n            future() calls, other async operations are configured with async_writer args). Only matters if the\n            clients perform expensive serialization (there's no computation involved otherwise). Default is\n            multiprocessing.cpu_count\n\n        async_processor_threadpool: (optional) Threadpool to be used for the async processor, instead of\n            workers, this can specify a specific thread pool to use (perhaps shared among other processors).\n            It can also be a callable, in which case it must be a factory function that takes the number\n            of workers as argument and returns a threadpool to be used. It's recommendable to always use\n            factories instead of instances, to avoid premature thread initialization.\n\n        async_processor_kwargs: (optional) Optional arguments to be used when constructing AsyncCacheProcessors.\n            Ignored if an explicit async_processor is given.\n\n        async_processor: (optional) Shared processor to utilize in future() calls.\n\n        future_sync_check: (optional) Whether to perform a quick synchronous check of the cache with lazy_kwargs\n            in order to avoid stalling on the processor for cached access. Set to False if there's no non-blocking\n            tier in the given cache client.\n\n        async_expire: (optional) A callable that will get an expired key, when TTL falls below async_ttl.\n            Common use case is to pass a first-tier's expire bound method, thus initiating a refresh.\n\n        lazy_kwargs: (optional) kwargs to send to the client's getTtl when doin""g lazy requests. Useful for\n            tiered clients, that can accept access modifiers through kwargs\n\n        async_lazy_recheck: (optional) when sending lazy_kwargs that may result in spurious CacheMissError,\n            specifying this on True will trigger an async re-check of the cache (to verify the need for an\n            async refresh).\n\n        async_lazy_recheck_kwargs: (optional) when setting async_lazy_recheck, recheck kwargs can be specified\n            here (default empty).\n\n        initialize: (optional) A callable hook to be called right before all accesses. It should initialize whatever\n            is needed initialized (like daemon threads), and only once (it should be a no-op after it's called once).\n            It can return True to avoid being called again (any return value that doesn't evaluate to True will\n            be ignored).\n\n        decorate: (optional) A decorator to apply to all call-like decorated functions. Since @cached creates many\n            variants of the function, this is a convenience over manually decorating all variants.\n\n        timings: (optional) Whether to gather timing statistics. If true, misses will be timed, and timing data\n            will be included in the stats attribute. It does imply some overhead. Default is True.\n\n        ttl_spread: (optional - default True). If None, the TTL will be used as-is for cache insertions.\n            If True, an automatic TTL spread will be computed so insertions and recomputatins are better distributed\n            in time. If a number (float or int), an equal-type random amount between [-ttl_spread, ttl_spread]\n            will be added.\n    ";
static PyMethodDef __pyx_mdef_6chorde_10decorators_9cached = {"cached", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_9cached, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6chorde_10decorators_8cached};
static PyObject *__pyx_pw_6chorde_10decorators_9cached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_client = 0;
  PyObject *__pyx_v_ttl = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_namespace = 0;
  PyObject *__pyx_v_value_serialization_function = 0;
  PyObject *__pyx_v_value_deserialization_function = 0;
  PyObject *__pyx_v_async_writer_queue_size = 0;
  PyObject *__pyx_v_async_writer_workers = 0;
  PyObject *__pyx_v_async_writer_threadpool = 0;
  PyObject *__pyx_v_async_writer_kwargs = 0;
  PyObject *__pyx_v_async_ttl = 0;
  PyObject *__pyx_v_async_client = 0;
  PyObject *__pyx_v_async_expire = 0;
  PyObject *__pyx_v_lazy_kwargs = 0;
  PyObject *__pyx_v_async_lazy_recheck = 0;
  PyObject *__pyx_v_async_lazy_recheck_kwargs = 0;
  PyObject *__pyx_v_async_processor = 0;
  PyObject *__pyx_v_async_processor_workers = 0;
  PyObject *__pyx_v_async_processor_threadpool = 0;
  PyObject *__pyx_v_async_processor_kwargs = 0;
  PyObject *__pyx_v_renew_time = 0;
  PyObject *__pyx_v_future_sync_check = 0;
  PyObject *__pyx_v_initialize = 0;
  PyObject *__pyx_v_decorate = 0;
  PyObject *__pyx_v_timings = 0;
  PyObject *__pyx_v_ttl_spread = 0;
  PyObject *__pyx_v_autonamespace_version_salt = 0;
  PyObject *__pyx_v__eff_async_ttl = 0;
  PyObject *__pyx_v__put_deferred = 0;
  PyObject *__pyx_v__fput_deferred = 0;
  PyObject *__pyx_v__lazy_recheck_put_deferred = 0;
  PyObject *__pyx_v__flazy_recheck_put_deferred = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cached (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_client,&__pyx_n_s_ttl,&__pyx_n_s_key,&__pyx_n_s_namespace,&__pyx_n_s_value_serialization_function,&__pyx_n_s_value_deserialization_function,&__pyx_n_s_async_writer_queue_size,&__pyx_n_s_async_writer_workers,&__pyx_n_s_async_writer_threadpool,&__pyx_n_s_async_writer_kwargs,&__pyx_n_s_async_ttl,&__pyx_n_s_async_client,&__pyx_n_s_async_expire,&__pyx_n_s_lazy_kwargs,&__pyx_n_s_async_lazy_recheck,&__pyx_n_s_async_lazy_recheck_kwargs,&__pyx_n_s_async_processor,&__pyx_n_s_async_processor_workers,&__pyx_n_s_async_processor_threadpool,&__pyx_n_s_async_processor_kwargs,&__pyx_n_s_renew_time,&__pyx_n_s_future_sync_check,&__pyx_n_s_initialize,&__pyx_n_s_decorate,&__pyx_n_s_timings,&__pyx_n_s_ttl_spread,&__pyx_n_s_autonamespace_version_salt,&__pyx_n_s_eff_async_ttl,&__pyx_n_s_put_deferred,&__pyx_n_s_fput_deferred,&__pyx_n_s_lazy_recheck_put_deferred,&__pyx_n_s_flazy_recheck_put_deferred,0};
    PyObject* values[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[2] = __pyx_dynamic_args->__pyx_arg_key;
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)Py_None));
    values[6] = ((PyObject *)((PyObject *)Py_None));
    values[7] = ((PyObject *)((PyObject *)Py_None));
    values[8] = ((PyObject *)((PyObject *)Py_None));
    values[9] = ((PyObject *)((PyObject *)Py_None));
    values[10] = ((PyObject *)((PyObject *)Py_None));
    values[11] = ((PyObject *)((PyObject *)Py_None));
    values[12] = ((PyObject *)((PyObject *)Py_None));
    values[13] = __pyx_dynamic_args->__pyx_arg_lazy_kwargs;
    values[14] = ((PyObject *)((PyObject *)Py_False));
    values[15] = __pyx_dynamic_args->__pyx_arg_async_lazy_recheck_kwargs;
    values[16] = ((PyObject *)((PyObject *)Py_None));
    values[17] = ((PyObject *)((PyObject *)Py_None));
    values[18] = ((PyObject *)((PyObject *)Py_None));
    values[19] = ((PyObject *)((PyObject *)Py_None));
    values[20] = ((PyObject *)((PyObject *)Py_None));
    values[21] = ((PyObject *)((PyObject *)Py_None));
    values[22] = ((PyObject *)((PyObject *)Py_None));
    values[23] = ((PyObject *)((PyObject *)Py_None));
    values[24] = ((PyObject *)((PyObject *)Py_True));
    values[25] = ((PyObject *)((PyObject *)Py_True));
    values[26] = ((PyObject *)((PyObject *)Py_None));
    values[27] = ((PyObject *)((PyObject *)Py_None));
    values[28] = ((PyObject *)((PyObject *)Py_None));
    values[29] = ((PyObject *)((PyObject *)Py_None));
    values[30] = ((PyObject *)((PyObject *)Py_None));
    values[31] = ((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 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
        CYTHON_FALLTHROUGH;
        case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
        CYTHON_FALLTHROUGH;
        case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
        CYTHON_FALLTHROUGH;
        case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
        CYTHON_FALLTHROUGH;
        case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
        CYTHON_FALLTHROUGH;
        case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
        CYTHON_FALLTHROUGH;
        case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
        CYTHON_FALLTHROUGH;
        case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
        CYTHON_FALLTHROUGH;
        case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
        CYTHON_FALLTHROUGH;
        case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
        CYTHON_FALLTHROUGH;
        case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
        CYTHON_FALLTHROUGH;
        case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
        CYTHON_FALLTHROUGH;
        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
        CYTHON_FALLTHROUGH;
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        CYTHON_FALLTHROUGH;
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        CYTHON_FALLTHROUGH;
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        CYTHON_FALLTHROUGH;
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_client)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ttl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cached", 0, 2, 32, 1); __PYX_ERR(0, 133, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_namespace);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_serialization_function);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_deserialization_function);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_writer_queue_size);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_writer_workers);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_writer_threadpool);
          if (value) { values[8] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_writer_kwargs);
          if (value) { values[9] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_ttl);
          if (value) { values[10] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_client);
          if (value) { values[11] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_expire);
          if (value) { values[12] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lazy_kwargs);
          if (value) { values[13] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_lazy_recheck);
          if (value) { values[14] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 15:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_lazy_recheck_kwargs);
          if (value) { values[15] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 16:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_processor);
          if (value) { values[16] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 17:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_processor_workers);
          if (value) { values[17] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 18:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_processor_threadpool);
          if (value) { values[18] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 19:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_processor_kwargs);
          if (value) { values[19] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 20:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_renew_time);
          if (value) { values[20] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 21:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future_sync_check);
          if (value) { values[21] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 22:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initialize);
          if (value) { values[22] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 23:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_decorate);
          if (value) { values[23] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 24:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timings);
          if (value) { values[24] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 25:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ttl_spread);
          if (value) { values[25] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 26:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_autonamespace_version_salt);
          if (value) { values[26] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 27:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eff_async_ttl);
          if (value) { values[27] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 28:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_put_deferred);
          if (value) { values[28] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 29:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fput_deferred);
          if (value) { values[29] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 30:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lazy_recheck_put_deferred);
          if (value) { values[30] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 31:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flazy_recheck_put_deferred);
          if (value) { values[31] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cached") < 0)) __PYX_ERR(0, 133, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
        CYTHON_FALLTHROUGH;
        case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
        CYTHON_FALLTHROUGH;
        case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
        CYTHON_FALLTHROUGH;
        case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
        CYTHON_FALLTHROUGH;
        case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
        CYTHON_FALLTHROUGH;
        case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
        CYTHON_FALLTHROUGH;
        case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
        CYTHON_FALLTHROUGH;
        case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
        CYTHON_FALLTHROUGH;
        case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
        CYTHON_FALLTHROUGH;
        case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
        CYTHON_FALLTHROUGH;
        case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
        CYTHON_FALLTHROUGH;
        case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
        CYTHON_FALLTHROUGH;
        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
        CYTHON_FALLTHROUGH;
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        CYTHON_FALLTHROUGH;
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        CYTHON_FALLTHROUGH;
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        CYTHON_FALLTHROUGH;
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_client = values[0];
    __pyx_v_ttl = values[1];
    __pyx_v_key = values[2];
    __pyx_v_namespace = values[3];
    __pyx_v_value_serialization_function = values[4];
    __pyx_v_value_deserialization_function = values[5];
    __pyx_v_async_writer_queue_size = values[6];
    __pyx_v_async_writer_workers = values[7];
    __pyx_v_async_writer_threadpool = values[8];
    __pyx_v_async_writer_kwargs = values[9];
    __pyx_v_async_ttl = values[10];
    __pyx_v_async_client = values[11];
    __pyx_v_async_expire = values[12];
    __pyx_v_lazy_kwargs = values[13];
    __pyx_v_async_lazy_recheck = values[14];
    __pyx_v_async_lazy_recheck_kwargs = values[15];
    __pyx_v_async_processor = values[16];
    __pyx_v_async_processor_workers = values[17];
    __pyx_v_async_processor_threadpool = values[18];
    __pyx_v_async_processor_kwargs = values[19];
    __pyx_v_renew_time = values[20];
    __pyx_v_future_sync_check = values[21];
    __pyx_v_initialize = values[22];
    __pyx_v_decorate = values[23];
    __pyx_v_timings = values[24];
    __pyx_v_ttl_spread = values[25];
    __pyx_v_autonamespace_version_salt = values[26];
    __pyx_v__eff_async_ttl = values[27];
    __pyx_v__put_deferred = values[28];
    __pyx_v__fput_deferred = values[29];
    __pyx_v__lazy_recheck_put_deferred = values[30];
    __pyx_v__flazy_recheck_put_deferred = values[31];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cached", 0, 2, 32, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 133, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("chorde.decorators.cached", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6chorde_10decorators_8cached(__pyx_self, __pyx_v_client, __pyx_v_ttl, __pyx_v_key, __pyx_v_namespace, __pyx_v_value_serialization_function, __pyx_v_value_deserialization_function, __pyx_v_async_writer_queue_size, __pyx_v_async_writer_workers, __pyx_v_async_writer_threadpool, __pyx_v_async_writer_kwargs, __pyx_v_async_ttl, __pyx_v_async_client, __pyx_v_async_expire, __pyx_v_lazy_kwargs, __pyx_v_async_lazy_recheck, __pyx_v_async_lazy_recheck_kwargs, __pyx_v_async_processor, __pyx_v_async_processor_workers, __pyx_v_async_processor_threadpool, __pyx_v_async_processor_kwargs, __pyx_v_renew_time, __pyx_v_future_sync_check, __pyx_v_initialize, __pyx_v_decorate, __pyx_v_timings, __pyx_v_ttl_spread, __pyx_v_autonamespace_version_salt, __pyx_v__eff_async_ttl, __pyx_v__put_deferred, __pyx_v__fput_deferred, __pyx_v__lazy_recheck_put_deferred, __pyx_v__flazy_recheck_put_deferred);

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

/* "chorde/decorators.py":428
 *     Future = asyncache.Future
 * 
 *     def decor(f):             # <<<<<<<<<<<<<<
 *         if namespace is None:
 *             salt2 = repr((ttl,))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_1decor(PyObject *__pyx_self, PyObject *__pyx_v_f); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_1decor = {"decor", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_1decor, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_1decor(PyObject *__pyx_self, PyObject *__pyx_v_f) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decor (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_decor(__pyx_self, ((PyObject *)__pyx_v_f));

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

/* "chorde/decorators.py":444
 * 
 *         if initialize is not None:
 *             def _initialize():             # <<<<<<<<<<<<<<
 *                 nonlocal _initialize
 *                 stop_initializing = initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_1_initialize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_1_initialize = {"_initialize", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_1_initialize, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_1_initialize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_initialize (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor__initialize(__pyx_self);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor__initialize(PyObject *__pyx_self) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_stop_initializing = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_initialize", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":446
 *             def _initialize():
 *                 nonlocal _initialize
 *                 stop_initializing = initialize()             # <<<<<<<<<<<<<<
 *                 if stop_initializing:
 *                     _initialize = None
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_initialize)) { __Pyx_RaiseClosureNameError("initialize"); __PYX_ERR(0, 446, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_initialize);
  __pyx_t_2 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_initialize; __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, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_stop_initializing = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":447
 *                 nonlocal _initialize
 *                 stop_initializing = initialize()
 *                 if stop_initializing:             # <<<<<<<<<<<<<<
 *                     _initialize = None
 *         else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_stop_initializing); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 447, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "chorde/decorators.py":448
 *                 stop_initializing = initialize()
 *                 if stop_initializing:
 *                     _initialize = None             # <<<<<<<<<<<<<<
 *         else:
 *             _initialize = None
 */
    __Pyx_INCREF(Py_None);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__initialize);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__initialize, Py_None);
    __Pyx_GIVEREF(Py_None);

    /* "chorde/decorators.py":447
 *                 nonlocal _initialize
 *                 stop_initializing = initialize()
 *                 if stop_initializing:             # <<<<<<<<<<<<<<
 *                     _initialize = None
 *         else:
 */
  }

  /* "chorde/decorators.py":444
 * 
 *         if initialize is not None:
 *             def _initialize():             # <<<<<<<<<<<<<<
 *                 nonlocal _initialize
 *                 stop_initializing = initialize()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("chorde.decorators.cached.decor._initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stop_initializing);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":466
 *             @wraps(of)
 *             @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *             def af(*p, **kw):             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *                 try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_3af(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_3af = {"af", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_3af, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_3af(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("af (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "af", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_2af(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_2af(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  double __pyx_v_t0;
  double __pyx_v_t1;
  double __pyx_v_t;
  PyObject *__pyx_v_rv = 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;
  double __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("af", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":467
 *             @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *             def af(*p, **kw):
 *                 stats.misses += 1             # <<<<<<<<<<<<<<
 *                 try:
 *                     t0 = time.time()
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 467, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 467, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_v_stats->misses = (__pyx_cur_scope->__pyx_v_stats->misses + 1);

  /* "chorde/decorators.py":468
 *             def af(*p, **kw):
 *                 stats.misses += 1
 *                 try:             # <<<<<<<<<<<<<<
 *                     t0 = time.time()
 *                     rv = of(*p, **kw)
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":469
 *                 stats.misses += 1
 *                 try:
 *                     t0 = time.time()             # <<<<<<<<<<<<<<
 *                     rv = of(*p, **kw)
 *                     t1 = time.time()
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 469, __pyx_L3_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, 469, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 469, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_t0 = __pyx_t_7;

      /* "chorde/decorators.py":470
 *                 try:
 *                     t0 = time.time()
 *                     rv = of(*p, **kw)             # <<<<<<<<<<<<<<
 *                     t1 = time.time()
 *                     t = t1-t0
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_of)) { __Pyx_RaiseClosureNameError("of"); __PYX_ERR(0, 470, __pyx_L3_error) }
      __pyx_t_4 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_of, __pyx_v_p, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 470, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_rv = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "chorde/decorators.py":471
 *                     t0 = time.time()
 *                     rv = of(*p, **kw)
 *                     t1 = time.time()             # <<<<<<<<<<<<<<
 *                     t = t1-t0
 *                     try:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_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, 471, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 471, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_t1 = __pyx_t_7;

      /* "chorde/decorators.py":472
 *                     rv = of(*p, **kw)
 *                     t1 = time.time()
 *                     t = t1-t0             # <<<<<<<<<<<<<<
 *                     try:
 *                         if t > stats.max_miss_time:
 */
      __pyx_v_t = (__pyx_v_t1 - __pyx_v_t0);

      /* "chorde/decorators.py":473
 *                     t1 = time.time()
 *                     t = t1-t0
 *                     try:             # <<<<<<<<<<<<<<
 *                         if t > stats.max_miss_time:
 *                             stats.max_miss_time = t
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        /*try:*/ {

          /* "chorde/decorators.py":474
 *                     t = t1-t0
 *                     try:
 *                         if t > stats.max_miss_time:             # <<<<<<<<<<<<<<
 *                             stats.max_miss_time = t
 *                         if stats.min_miss_time < 0 or stats.min_miss_time > t:
 */
          if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 474, __pyx_L9_error) }
          __pyx_t_11 = ((__pyx_v_t > __pyx_cur_scope->__pyx_v_stats->max_miss_time) != 0);
          if (__pyx_t_11) {

            /* "chorde/decorators.py":475
 *                     try:
 *                         if t > stats.max_miss_time:
 *                             stats.max_miss_time = t             # <<<<<<<<<<<<<<
 *                         if stats.min_miss_time < 0 or stats.min_miss_time > t:
 *                             stats.min_miss_time = t
 */
            if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 475, __pyx_L9_error) }
            __pyx_cur_scope->__pyx_v_stats->max_miss_time = __pyx_v_t;

            /* "chorde/decorators.py":474
 *                     t = t1-t0
 *                     try:
 *                         if t > stats.max_miss_time:             # <<<<<<<<<<<<<<
 *                             stats.max_miss_time = t
 *                         if stats.min_miss_time < 0 or stats.min_miss_time > t:
 */
          }

          /* "chorde/decorators.py":476
 *                         if t > stats.max_miss_time:
 *                             stats.max_miss_time = t
 *                         if stats.min_miss_time < 0 or stats.min_miss_time > t:             # <<<<<<<<<<<<<<
 *                             stats.min_miss_time = t
 *                         stats.sum_miss_time += t
 */
          if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 476, __pyx_L9_error) }
          __pyx_t_12 = ((__pyx_cur_scope->__pyx_v_stats->min_miss_time < 0.0) != 0);
          if (!__pyx_t_12) {
          } else {
            __pyx_t_11 = __pyx_t_12;
            goto __pyx_L17_bool_binop_done;
          }
          if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 476, __pyx_L9_error) }
          __pyx_t_12 = ((__pyx_cur_scope->__pyx_v_stats->min_miss_time > __pyx_v_t) != 0);
          __pyx_t_11 = __pyx_t_12;
          __pyx_L17_bool_binop_done:;
          if (__pyx_t_11) {

            /* "chorde/decorators.py":477
 *                             stats.max_miss_time = t
 *                         if stats.min_miss_time < 0 or stats.min_miss_time > t:
 *                             stats.min_miss_time = t             # <<<<<<<<<<<<<<
 *                         stats.sum_miss_time += t
 *                         stats.sum_miss_time_sq += t*t
 */
            if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 477, __pyx_L9_error) }
            __pyx_cur_scope->__pyx_v_stats->min_miss_time = __pyx_v_t;

            /* "chorde/decorators.py":476
 *                         if t > stats.max_miss_time:
 *                             stats.max_miss_time = t
 *                         if stats.min_miss_time < 0 or stats.min_miss_time > t:             # <<<<<<<<<<<<<<
 *                             stats.min_miss_time = t
 *                         stats.sum_miss_time += t
 */
          }

          /* "chorde/decorators.py":478
 *                         if stats.min_miss_time < 0 or stats.min_miss_time > t:
 *                             stats.min_miss_time = t
 *                         stats.sum_miss_time += t             # <<<<<<<<<<<<<<
 *                         stats.sum_miss_time_sq += t*t
 *                         if stats.miss_time_histogram:
 */
          if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 478, __pyx_L9_error) }
          if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 478, __pyx_L9_error) }
          __pyx_cur_scope->__pyx_v_stats->sum_miss_time = (__pyx_cur_scope->__pyx_v_stats->sum_miss_time + __pyx_v_t);

          /* "chorde/decorators.py":479
 *                             stats.min_miss_time = t
 *                         stats.sum_miss_time += t
 *                         stats.sum_miss_time_sq += t*t             # <<<<<<<<<<<<<<
 *                         if stats.miss_time_histogram:
 *                             stats.add_histo(t)
 */
          if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 479, __pyx_L9_error) }
          if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 479, __pyx_L9_error) }
          __pyx_cur_scope->__pyx_v_stats->sum_miss_time_sq = (__pyx_cur_scope->__pyx_v_stats->sum_miss_time_sq + (__pyx_v_t * __pyx_v_t));

          /* "chorde/decorators.py":480
 *                         stats.sum_miss_time += t
 *                         stats.sum_miss_time_sq += t*t
 *                         if stats.miss_time_histogram:             # <<<<<<<<<<<<<<
 *                             stats.add_histo(t)
 *                     except:
 */
          if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 480, __pyx_L9_error) }
          __pyx_t_11 = (__pyx_cur_scope->__pyx_v_stats->miss_time_histogram != Py_None)&&(PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_stats->miss_time_histogram) != 0);
          if (__pyx_t_11) {

            /* "chorde/decorators.py":481
 *                         stats.sum_miss_time_sq += t*t
 *                         if stats.miss_time_histogram:
 *                             stats.add_histo(t)             # <<<<<<<<<<<<<<
 *                     except:
 *                         # Ignore stats collection exceptions.
 */
            if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 481, __pyx_L9_error) }
            __pyx_t_6 = ((struct __pyx_vtabstruct_6chorde_10decorators_CacheStats *)__pyx_cur_scope->__pyx_v_stats->__pyx_vtab)->add_histo(__pyx_cur_scope->__pyx_v_stats, __pyx_v_t, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 481, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "chorde/decorators.py":480
 *                         stats.sum_miss_time += t
 *                         stats.sum_miss_time_sq += t*t
 *                         if stats.miss_time_histogram:             # <<<<<<<<<<<<<<
 *                             stats.add_histo(t)
 *                     except:
 */
          }

          /* "chorde/decorators.py":473
 *                     t1 = time.time()
 *                     t = t1-t0
 *                     try:             # <<<<<<<<<<<<<<
 *                         if t > stats.max_miss_time:
 *                             stats.max_miss_time = t
 */
        }
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L14_try_end;
        __pyx_L9_error:;
        __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;

        /* "chorde/decorators.py":482
 *                         if stats.miss_time_histogram:
 *                             stats.add_histo(t)
 *                     except:             # <<<<<<<<<<<<<<
 *                         # Ignore stats collection exceptions.
 *                         # Quite possible since there is no thread synchronization.
 */
        /*except:*/ {
          __Pyx_ErrRestore(0,0,0);
          goto __pyx_L10_exception_handled;
        }
        __pyx_L10_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        __pyx_L14_try_end:;
      }

      /* "chorde/decorators.py":486
 *                         # Quite possible since there is no thread synchronization.
 *                         pass
 *                     if value_callbacks:             # <<<<<<<<<<<<<<
 *                         try:
 *                             _value_callback(rv, *p, **kw)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_value_callbacks)) { __Pyx_RaiseClosureNameError("value_callbacks"); __PYX_ERR(0, 486, __pyx_L3_error) }
      __pyx_t_11 = (__pyx_cur_scope->__pyx_v_value_callbacks != Py_None)&&(PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_value_callbacks) != 0);
      if (__pyx_t_11) {

        /* "chorde/decorators.py":487
 *                         pass
 *                     if value_callbacks:
 *                         try:             # <<<<<<<<<<<<<<
 *                             _value_callback(rv, *p, **kw)
 *                         except:
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_8);
          /*try:*/ {

            /* "chorde/decorators.py":488
 *                     if value_callbacks:
 *                         try:
 *                             _value_callback(rv, *p, **kw)             # <<<<<<<<<<<<<<
 *                         except:
 *                             # Just log callback exceptions, orthogonal behavior shouldn't propagate to the caller
 */
            if (unlikely(!__pyx_cur_scope->__pyx_v__value_callback)) { __Pyx_RaiseClosureNameError("_value_callback"); __PYX_ERR(0, 488, __pyx_L21_error) }
            __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_v_rv);
            __Pyx_GIVEREF(__pyx_v_rv);
            PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_rv);
            __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_v_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v__value_callback, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "chorde/decorators.py":487
 *                         pass
 *                     if value_callbacks:
 *                         try:             # <<<<<<<<<<<<<<
 *                             _value_callback(rv, *p, **kw)
 *                         except:
 */
          }
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L26_try_end;
          __pyx_L21_error:;
          __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;

          /* "chorde/decorators.py":489
 *                         try:
 *                             _value_callback(rv, *p, **kw)
 *                         except:             # <<<<<<<<<<<<<<
 *                             # Just log callback exceptions, orthogonal behavior shouldn't propagate to the caller
 *                             logging.getLogger('chorde').error("Error on value callback", exc_info = True)
 */
          /*except:*/ {
            __Pyx_AddTraceback("chorde.decorators.cached.decor.af", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 489, __pyx_L23_except_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GOTREF(__pyx_t_5);

            /* "chorde/decorators.py":491
 *                         except:
 *                             # Just log callback exceptions, orthogonal behavior shouldn't propagate to the caller
 *                             logging.getLogger('chorde').error("Error on value callback", exc_info = True)             # <<<<<<<<<<<<<<
 *                             pass
 *                     return rv
 */
            __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_logging); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 491, __pyx_L23_except_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 491, __pyx_L23_except_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __pyx_t_14 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
              __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15);
              if (likely(__pyx_t_14)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
                __Pyx_INCREF(__pyx_t_14);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_15, function);
              }
            }
            __pyx_t_13 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_14, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_n_s_chorde);
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 491, __pyx_L23_except_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 491, __pyx_L23_except_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 491, __pyx_L23_except_error)
            __Pyx_GOTREF(__pyx_t_13);
            if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 491, __pyx_L23_except_error)
            __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__9, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 491, __pyx_L23_except_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            goto __pyx_L22_exception_handled;
          }
          __pyx_L23_except_error:;

          /* "chorde/decorators.py":487
 *                         pass
 *                     if value_callbacks:
 *                         try:             # <<<<<<<<<<<<<<
 *                             _value_callback(rv, *p, **kw)
 *                         except:
 */
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
          goto __pyx_L3_error;
          __pyx_L22_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
          __pyx_L26_try_end:;
        }

        /* "chorde/decorators.py":486
 *                         # Quite possible since there is no thread synchronization.
 *                         pass
 *                     if value_callbacks:             # <<<<<<<<<<<<<<
 *                         try:
 *                             _value_callback(rv, *p, **kw)
 */
      }

      /* "chorde/decorators.py":493
 *                             logging.getLogger('chorde').error("Error on value callback", exc_info = True)
 *                             pass
 *                     return rv             # <<<<<<<<<<<<<<
 *                 except:
 *                     stats.errors += 1
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_rv);
      __pyx_r = __pyx_v_rv;
      goto __pyx_L7_try_return;

      /* "chorde/decorators.py":468
 *             def af(*p, **kw):
 *                 stats.misses += 1
 *                 try:             # <<<<<<<<<<<<<<
 *                     t0 = time.time()
 *                     rv = of(*p, **kw)
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "chorde/decorators.py":494
 *                             pass
 *                     return rv
 *                 except:             # <<<<<<<<<<<<<<
 *                     stats.errors += 1
 *                     raise
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.af", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_4) < 0) __PYX_ERR(0, 494, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_4);

      /* "chorde/decorators.py":495
 *                     return rv
 *                 except:
 *                     stats.errors += 1             # <<<<<<<<<<<<<<
 *                     raise
 *             @wraps(of)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 495, __pyx_L5_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 495, __pyx_L5_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":496
 *                 except:
 *                     stats.errors += 1
 *                     raise             # <<<<<<<<<<<<<<
 *             @wraps(of)
 *             def f(*p, **kw):
 */
      __Pyx_GIVEREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_6, __pyx_t_4);
      __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_4 = 0; 
      __PYX_ERR(0, 496, __pyx_L5_except_error)
    }
    __pyx_L5_except_error:;

    /* "chorde/decorators.py":468
 *             def af(*p, **kw):
 *                 stats.misses += 1
 *                 try:             # <<<<<<<<<<<<<<
 *                     t0 = time.time()
 *                     rv = of(*p, **kw)
 */
    __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;
  }

  /* "chorde/decorators.py":466
 *             @wraps(of)
 *             @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *             def af(*p, **kw):             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *                 try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.af", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":498
 *                     raise
 *             @wraps(of)
 *             def f(*p, **kw):             # <<<<<<<<<<<<<<
 *                 stats.sync_misses += 1
 *                 return af(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_5f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_5f = {"f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_5f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_5f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_4f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_4f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":499
 *             @wraps(of)
 *             def f(*p, **kw):
 *                 stats.sync_misses += 1             # <<<<<<<<<<<<<<
 *                 return af(*p, **kw)
 *         else:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 499, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 499, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_v_stats->sync_misses = (__pyx_cur_scope->__pyx_v_stats->sync_misses + 1);

  /* "chorde/decorators.py":500
 *             def f(*p, **kw):
 *                 stats.sync_misses += 1
 *                 return af(*p, **kw)             # <<<<<<<<<<<<<<
 *         else:
 *             of = f
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 500, __pyx_L1_error) }
  __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_af, __pyx_v_p, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __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;

  /* "chorde/decorators.py":498
 *                     raise
 *             @wraps(of)
 *             def f(*p, **kw):             # <<<<<<<<<<<<<<
 *                 stats.sync_misses += 1
 *                 return af(*p, **kw)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":504
 *             of = f
 *             @wraps(of)
 *             def af(*p, **kw):  # lint:ok             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *                 try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_7af(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_7af = {"af", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_7af, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_7af(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("af (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "af", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_6af(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_6af(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("af", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":505
 *             @wraps(of)
 *             def af(*p, **kw):  # lint:ok
 *                 stats.misses += 1             # <<<<<<<<<<<<<<
 *                 try:
 *                     rv = of(*p, **kw)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 505, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 505, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_v_stats->misses = (__pyx_cur_scope->__pyx_v_stats->misses + 1);

  /* "chorde/decorators.py":506
 *             def af(*p, **kw):  # lint:ok
 *                 stats.misses += 1
 *                 try:             # <<<<<<<<<<<<<<
 *                     rv = of(*p, **kw)
 *                     if value_callbacks:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":507
 *                 stats.misses += 1
 *                 try:
 *                     rv = of(*p, **kw)             # <<<<<<<<<<<<<<
 *                     if value_callbacks:
 *                         try:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_of)) { __Pyx_RaiseClosureNameError("of"); __PYX_ERR(0, 507, __pyx_L3_error) }
      __pyx_t_4 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_of, __pyx_v_p, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 507, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_rv = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "chorde/decorators.py":508
 *                 try:
 *                     rv = of(*p, **kw)
 *                     if value_callbacks:             # <<<<<<<<<<<<<<
 *                         try:
 *                             _value_callback(rv, *p, **kw)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_value_callbacks)) { __Pyx_RaiseClosureNameError("value_callbacks"); __PYX_ERR(0, 508, __pyx_L3_error) }
      __pyx_t_6 = (__pyx_cur_scope->__pyx_v_value_callbacks != Py_None)&&(PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_value_callbacks) != 0);
      if (__pyx_t_6) {

        /* "chorde/decorators.py":509
 *                     rv = of(*p, **kw)
 *                     if value_callbacks:
 *                         try:             # <<<<<<<<<<<<<<
 *                             _value_callback(rv, *p, **kw)
 *                         except:
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_7);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_9);
          /*try:*/ {

            /* "chorde/decorators.py":510
 *                     if value_callbacks:
 *                         try:
 *                             _value_callback(rv, *p, **kw)             # <<<<<<<<<<<<<<
 *                         except:
 *                             # Just log callback exceptions, orthogonal behavior shouldn't propagate to the caller
 */
            if (unlikely(!__pyx_cur_scope->__pyx_v__value_callback)) { __Pyx_RaiseClosureNameError("_value_callback"); __PYX_ERR(0, 510, __pyx_L10_error) }
            __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_v_rv);
            __Pyx_GIVEREF(__pyx_v_rv);
            PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_rv);
            __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_10 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v__value_callback, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 510, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

            /* "chorde/decorators.py":509
 *                     rv = of(*p, **kw)
 *                     if value_callbacks:
 *                         try:             # <<<<<<<<<<<<<<
 *                             _value_callback(rv, *p, **kw)
 *                         except:
 */
          }
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L15_try_end;
          __pyx_L10_error:;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "chorde/decorators.py":511
 *                         try:
 *                             _value_callback(rv, *p, **kw)
 *                         except:             # <<<<<<<<<<<<<<
 *                             # Just log callback exceptions, orthogonal behavior shouldn't propagate to the caller
 *                             logging.getLogger('chorde').getLogger('chorde').error("Error on value callback", exc_info = True)
 */
          /*except:*/ {
            __Pyx_AddTraceback("chorde.decorators.cached.decor.af", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 511, __pyx_L12_except_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GOTREF(__pyx_t_4);

            /* "chorde/decorators.py":513
 *                         except:
 *                             # Just log callback exceptions, orthogonal behavior shouldn't propagate to the caller
 *                             logging.getLogger('chorde').getLogger('chorde').error("Error on value callback", exc_info = True)             # <<<<<<<<<<<<<<
 *                             pass
 *                     return rv
 */
            __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_logging); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 513, __pyx_L12_except_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 513, __pyx_L12_except_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __pyx_t_13 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
              __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
              if (likely(__pyx_t_13)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
                __Pyx_INCREF(__pyx_t_13);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_14, function);
              }
            }
            __pyx_t_12 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_13, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_n_s_chorde);
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 513, __pyx_L12_except_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 513, __pyx_L12_except_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
              __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_14);
              if (likely(__pyx_t_12)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
                __Pyx_INCREF(__pyx_t_12);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_14, function);
              }
            }
            __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_12, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_n_s_chorde);
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 513, __pyx_L12_except_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_error); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 513, __pyx_L12_except_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 513, __pyx_L12_except_error)
            __Pyx_GOTREF(__pyx_t_11);
            if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 513, __pyx_L12_except_error)
            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__9, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 513, __pyx_L12_except_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            goto __pyx_L11_exception_handled;
          }
          __pyx_L12_except_error:;

          /* "chorde/decorators.py":509
 *                     rv = of(*p, **kw)
 *                     if value_callbacks:
 *                         try:             # <<<<<<<<<<<<<<
 *                             _value_callback(rv, *p, **kw)
 *                         except:
 */
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          goto __pyx_L3_error;
          __pyx_L11_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          __pyx_L15_try_end:;
        }

        /* "chorde/decorators.py":508
 *                 try:
 *                     rv = of(*p, **kw)
 *                     if value_callbacks:             # <<<<<<<<<<<<<<
 *                         try:
 *                             _value_callback(rv, *p, **kw)
 */
      }

      /* "chorde/decorators.py":515
 *                             logging.getLogger('chorde').getLogger('chorde').error("Error on value callback", exc_info = True)
 *                             pass
 *                     return rv             # <<<<<<<<<<<<<<
 *                 except:
 *                     stats.errors += 1
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_rv);
      __pyx_r = __pyx_v_rv;
      goto __pyx_L7_try_return;

      /* "chorde/decorators.py":506
 *             def af(*p, **kw):  # lint:ok
 *                 stats.misses += 1
 *                 try:             # <<<<<<<<<<<<<<
 *                     rv = of(*p, **kw)
 *                     if value_callbacks:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":516
 *                             pass
 *                     return rv
 *                 except:             # <<<<<<<<<<<<<<
 *                     stats.errors += 1
 *                     raise
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.af", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_10) < 0) __PYX_ERR(0, 516, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_10);

      /* "chorde/decorators.py":517
 *                     return rv
 *                 except:
 *                     stats.errors += 1             # <<<<<<<<<<<<<<
 *                     raise
 *             @wraps(of)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 517, __pyx_L5_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 517, __pyx_L5_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":518
 *                 except:
 *                     stats.errors += 1
 *                     raise             # <<<<<<<<<<<<<<
 *             @wraps(of)
 *             def f(*p, **kw):  # lint:ok
 */
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_5, __pyx_t_10);
      __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_10 = 0; 
      __PYX_ERR(0, 518, __pyx_L5_except_error)
    }
    __pyx_L5_except_error:;

    /* "chorde/decorators.py":506
 *             def af(*p, **kw):  # lint:ok
 *                 stats.misses += 1
 *                 try:             # <<<<<<<<<<<<<<
 *                     rv = of(*p, **kw)
 *                     if value_callbacks:
 */
    __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;
  }

  /* "chorde/decorators.py":504
 *             of = f
 *             @wraps(of)
 *             def af(*p, **kw):  # lint:ok             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *                 try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.af", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":520
 *                     raise
 *             @wraps(of)
 *             def f(*p, **kw):  # lint:ok             # <<<<<<<<<<<<<<
 *                 stats.sync_misses += 1
 *                 rv = af(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_9f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_9f = {"f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_9f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_9f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_8f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_8f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":521
 *             @wraps(of)
 *             def f(*p, **kw):  # lint:ok
 *                 stats.sync_misses += 1             # <<<<<<<<<<<<<<
 *                 rv = af(*p, **kw)
 *                 if value_callbacks:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 521, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 521, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_v_stats->sync_misses = (__pyx_cur_scope->__pyx_v_stats->sync_misses + 1);

  /* "chorde/decorators.py":522
 *             def f(*p, **kw):  # lint:ok
 *                 stats.sync_misses += 1
 *                 rv = af(*p, **kw)             # <<<<<<<<<<<<<<
 *                 if value_callbacks:
 *                     try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 522, __pyx_L1_error) }
  __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_af, __pyx_v_p, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_rv = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "chorde/decorators.py":523
 *                 stats.sync_misses += 1
 *                 rv = af(*p, **kw)
 *                 if value_callbacks:             # <<<<<<<<<<<<<<
 *                     try:
 *                         _value_callback(rv, *p, **kw)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_value_callbacks)) { __Pyx_RaiseClosureNameError("value_callbacks"); __PYX_ERR(0, 523, __pyx_L1_error) }
  __pyx_t_3 = (__pyx_cur_scope->__pyx_v_value_callbacks != Py_None)&&(PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_value_callbacks) != 0);
  if (__pyx_t_3) {

    /* "chorde/decorators.py":524
 *                 rv = af(*p, **kw)
 *                 if value_callbacks:
 *                     try:             # <<<<<<<<<<<<<<
 *                         _value_callback(rv, *p, **kw)
 *                     except:
 */
    {
      __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:*/ {

        /* "chorde/decorators.py":525
 *                 if value_callbacks:
 *                     try:
 *                         _value_callback(rv, *p, **kw)             # <<<<<<<<<<<<<<
 *                     except:
 *                         # Just log callback exceptions, orthogonal behavior shouldn't propagate to the caller
 */
        if (unlikely(!__pyx_cur_scope->__pyx_v__value_callback)) { __Pyx_RaiseClosureNameError("_value_callback"); __PYX_ERR(0, 525, __pyx_L4_error) }
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_rv);
        __Pyx_GIVEREF(__pyx_v_rv);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_rv);
        __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v__value_callback, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 525, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "chorde/decorators.py":524
 *                 rv = af(*p, **kw)
 *                 if value_callbacks:
 *                     try:             # <<<<<<<<<<<<<<
 *                         _value_callback(rv, *p, **kw)
 *                     except:
 */
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "chorde/decorators.py":526
 *                     try:
 *                         _value_callback(rv, *p, **kw)
 *                     except:             # <<<<<<<<<<<<<<
 *                         # Just log callback exceptions, orthogonal behavior shouldn't propagate to the caller
 *                         logging.getLogger('chorde').error("Error on value callback", exc_info = True)
 */
      /*except:*/ {
        __Pyx_AddTraceback("chorde.decorators.cached.decor.f", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 526, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_1);

        /* "chorde/decorators.py":528
 *                     except:
 *                         # Just log callback exceptions, orthogonal behavior shouldn't propagate to the caller
 *                         logging.getLogger('chorde').error("Error on value callback", exc_info = True)             # <<<<<<<<<<<<<<
 *                         pass
 *                 return rv
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_logging); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 528, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 528, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_n_s_chorde);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 528, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 528, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 528, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 528, __pyx_L6_except_error)
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__9, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 528, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L5_exception_handled;
      }
      __pyx_L6_except_error:;

      /* "chorde/decorators.py":524
 *                 rv = af(*p, **kw)
 *                 if value_callbacks:
 *                     try:             # <<<<<<<<<<<<<<
 *                         _value_callback(rv, *p, **kw)
 *                     except:
 */
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      __pyx_L9_try_end:;
    }

    /* "chorde/decorators.py":523
 *                 stats.sync_misses += 1
 *                 rv = af(*p, **kw)
 *                 if value_callbacks:             # <<<<<<<<<<<<<<
 *                     try:
 *                         _value_callback(rv, *p, **kw)
 */
  }

  /* "chorde/decorators.py":530
 *                         logging.getLogger('chorde').error("Error on value callback", exc_info = True)
 *                         pass
 *                 return rv             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "chorde/decorators.py":520
 *                     raise
 *             @wraps(of)
 *             def f(*p, **kw):  # lint:ok             # <<<<<<<<<<<<<<
 *                 stats.sync_misses += 1
 *                 rv = af(*p, **kw)
 */

  /* 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_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":533
 * 
 *         @wraps(of)
 *         def cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_11cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_11cached_f = {"cached_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_11cached_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_11cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cached_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cached_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_10cached_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_10cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = NULL;
  PyObject *__pyx_v_rv = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cached_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":534
 *         @wraps(of)
 *         def cached_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 534, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":535
 *         def cached_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 535, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":534
 *         @wraps(of)
 *         def cached_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":536
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":537
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 537, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 537, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":536
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":538
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 538, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":540
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return f(*p, **kw)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 540, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 540, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 540, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 540, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 540, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":541
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return f(*p, **kw)
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 541, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 541, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":542
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return f(*p, **kw)             # <<<<<<<<<<<<<<
 * 
 *             try:
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_cur_scope->__pyx_v_f)) { __Pyx_RaiseClosureNameError("f"); __PYX_ERR(0, 542, __pyx_L6_except_error) }
      __pyx_t_10 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 542, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_f, __pyx_v_p, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 542, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":536
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "chorde/decorators.py":544
 *                 return f(*p, **kw)
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 rv = nclient.get(callkey, **get_kwargs)
 *                 stats.hits += 1
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":545
 * 
 *             try:
 *                 rv = nclient.get(callkey, **get_kwargs)             # <<<<<<<<<<<<<<
 *                 stats.hits += 1
 *             except CacheMissError:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 545, __pyx_L12_error) }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_callkey);
      if (unlikely(!__pyx_cur_scope->__pyx_v_get_kwargs)) { __Pyx_RaiseClosureNameError("get_kwargs"); __PYX_ERR(0, 545, __pyx_L12_error) }
      if (unlikely(__pyx_cur_scope->__pyx_v_get_kwargs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 545, __pyx_L12_error)
      }
      __pyx_t_4 = PyDict_Copy(__pyx_cur_scope->__pyx_v_get_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 545, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_rv = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "chorde/decorators.py":546
 *             try:
 *                 rv = nclient.get(callkey, **get_kwargs)
 *                 stats.hits += 1             # <<<<<<<<<<<<<<
 *             except CacheMissError:
 *                 rv = f(*p, **kw)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 546, __pyx_L12_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 546, __pyx_L12_error) }
      __pyx_cur_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_v_stats->hits + 1);

      /* "chorde/decorators.py":544
 *                 return f(*p, **kw)
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 rv = nclient.get(callkey, **get_kwargs)
 *                 stats.hits += 1
 */
    }
    __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_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "chorde/decorators.py":547
 *                 rv = nclient.get(callkey, **get_kwargs)
 *                 stats.hits += 1
 *             except CacheMissError:             # <<<<<<<<<<<<<<
 *                 rv = f(*p, **kw)
 *                 nclient.put(callkey, rv, eff_ttl())
 */
    __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_4, &__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CacheMissError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 547, __pyx_L14_except_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_9, __pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_ErrRestore(__pyx_t_9, __pyx_t_4, __pyx_t_3);
    __pyx_t_9 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0;
    if (__pyx_t_12) {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(0, 547, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_9);

      /* "chorde/decorators.py":548
 *                 stats.hits += 1
 *             except CacheMissError:
 *                 rv = f(*p, **kw)             # <<<<<<<<<<<<<<
 *                 nclient.put(callkey, rv, eff_ttl())
 *             return rv
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_f)) { __Pyx_RaiseClosureNameError("f"); __PYX_ERR(0, 548, __pyx_L14_except_error) }
      __pyx_t_5 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 548, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_f, __pyx_v_p, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 548, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_rv, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "chorde/decorators.py":549
 *             except CacheMissError:
 *                 rv = f(*p, **kw)
 *                 nclient.put(callkey, rv, eff_ttl())             # <<<<<<<<<<<<<<
 *             return rv
 *         if decorate is not None:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 549, __pyx_L14_except_error) }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_put); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 549, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 549, __pyx_L14_except_error) }
      __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 549, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_13 = NULL;
      __pyx_t_12 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_12 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_v_callkey, __pyx_v_rv, __pyx_t_11};
        __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 549, __pyx_L14_except_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_v_callkey, __pyx_v_rv, __pyx_t_11};
        __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 549, __pyx_L14_except_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 549, __pyx_L14_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_13) {
          __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
        }
        __Pyx_INCREF(__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_v_callkey);
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_12, __pyx_v_callkey);
        __Pyx_INCREF(__pyx_v_rv);
        __Pyx_GIVEREF(__pyx_v_rv);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_12, __pyx_v_rv);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_12, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_14, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 549, __pyx_L14_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L13_exception_handled;
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "chorde/decorators.py":544
 *                 return f(*p, **kw)
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 rv = nclient.get(callkey, **get_kwargs)
 *                 stats.hits += 1
 */
    __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_L13_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_L17_try_end:;
  }

  /* "chorde/decorators.py":550
 *                 rv = f(*p, **kw)
 *                 nclient.put(callkey, rv, eff_ttl())
 *             return rv             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             cached_f = decorate(cached_f)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "chorde/decorators.py":533
 * 
 *         @wraps(of)
 *         def cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":555
 * 
 *         @wraps(of)
 *         def get_ttl_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_13get_ttl_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_13get_ttl_f = {"get_ttl_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_13get_ttl_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_13get_ttl_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ttl_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_ttl_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_12get_ttl_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_12get_ttl_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = NULL;
  PyObject *__pyx_v_rv = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_ttl_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":556
 *         @wraps(of)
 *         def get_ttl_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 556, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":557
 *         def get_ttl_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 557, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":556
 *         @wraps(of)
 *         def get_ttl_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":558
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":559
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 559, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":558
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":560
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.get_ttl_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 560, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":562
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return f(*p, **kw)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 562, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 562, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 562, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 562, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 562, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 562, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 562, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":563
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return f(*p, **kw)
 *             rv = nclient.getTtl(callkey, **get_kwargs)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 563, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 563, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":564
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return f(*p, **kw)             # <<<<<<<<<<<<<<
 *             rv = nclient.getTtl(callkey, **get_kwargs)
 *             if rv[1] < 0:
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_cur_scope->__pyx_v_f)) { __Pyx_RaiseClosureNameError("f"); __PYX_ERR(0, 564, __pyx_L6_except_error) }
      __pyx_t_10 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 564, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_f, __pyx_v_p, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 564, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":558
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "chorde/decorators.py":565
 *                 stats.errors += 1
 *                 return f(*p, **kw)
 *             rv = nclient.getTtl(callkey, **get_kwargs)             # <<<<<<<<<<<<<<
 *             if rv[1] < 0:
 *                 stats.misses += 1
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 565, __pyx_L1_error) }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_callkey);
  if (unlikely(!__pyx_cur_scope->__pyx_v_get_kwargs)) { __Pyx_RaiseClosureNameError("get_kwargs"); __PYX_ERR(0, 565, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_get_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 565, __pyx_L1_error)
  }
  __pyx_t_4 = PyDict_Copy(__pyx_cur_scope->__pyx_v_get_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_rv = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "chorde/decorators.py":566
 *                 return f(*p, **kw)
 *             rv = nclient.getTtl(callkey, **get_kwargs)
 *             if rv[1] < 0:             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *             else:
 */
  __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_rv, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_9, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "chorde/decorators.py":567
 *             rv = nclient.getTtl(callkey, **get_kwargs)
 *             if rv[1] < 0:
 *                 stats.misses += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 stats.hits += 1
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 567, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 567, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_v_stats->misses = (__pyx_cur_scope->__pyx_v_stats->misses + 1);

    /* "chorde/decorators.py":566
 *                 return f(*p, **kw)
 *             rv = nclient.getTtl(callkey, **get_kwargs)
 *             if rv[1] < 0:             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *             else:
 */
    goto __pyx_L12;
  }

  /* "chorde/decorators.py":569
 *                 stats.misses += 1
 *             else:
 *                 stats.hits += 1             # <<<<<<<<<<<<<<
 *             return rv
 *         if decorate is not None:
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 569, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 569, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_v_stats->hits + 1);
  }
  __pyx_L12:;

  /* "chorde/decorators.py":570
 *             else:
 *                 stats.hits += 1
 *             return rv             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             get_ttl_f = decorate(get_ttl_f)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "chorde/decorators.py":555
 * 
 *         @wraps(of)
 *         def get_ttl_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.get_ttl_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":576
 *         @wraps(of)
 *         @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *         def async_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15async_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_15async_cached_f = {"async_cached_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_15async_cached_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15async_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("async_cached_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "async_cached_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_14async_cached_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_14async_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  double __pyx_v_t0;
  double __pyx_v_t1;
  double __pyx_v_t;
  PyObject *__pyx_v_callkey = NULL;
  PyObject *__pyx_v_client = NULL;
  PyObject *__pyx_v___NONE = NULL;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_v_rvttl = NULL;
  PyObject *__pyx_v_placeholder = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  int __pyx_t_14;
  double __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("async_cached_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":577
 *         @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *         def async_cached_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 577, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":578
 *         def async_cached_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 578, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":577
 *         @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *         def async_cached_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":579
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":580
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 580, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":579
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":581
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.async_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 581, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":583
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return f(*p, **kw)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 583, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 583, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 583, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 583, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 583, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 583, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 583, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":584
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return f(*p, **kw)
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 584, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 584, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":585
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return f(*p, **kw)             # <<<<<<<<<<<<<<
 * 
 *             client = aclient
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_cur_scope->__pyx_v_f)) { __Pyx_RaiseClosureNameError("f"); __PYX_ERR(0, 585, __pyx_L6_except_error) }
      __pyx_t_10 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 585, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_f, __pyx_v_p, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 585, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":579
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "chorde/decorators.py":587
 *                 return f(*p, **kw)
 * 
 *             client = aclient             # <<<<<<<<<<<<<<
 *             __NONE = _NONE_
 *             rv, rvttl = client.getTtl(callkey, __NONE, **get_kwargs)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 587, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_aclient);
  __pyx_v_client = __pyx_cur_scope->__pyx_v_aclient;

  /* "chorde/decorators.py":588
 * 
 *             client = aclient
 *             __NONE = _NONE_             # <<<<<<<<<<<<<<
 *             rv, rvttl = client.getTtl(callkey, __NONE, **get_kwargs)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__NONE_)) { __Pyx_RaiseClosureNameError("_NONE_"); __PYX_ERR(0, 588, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__NONE_);
  __pyx_v___NONE = __pyx_cur_scope->__pyx_outer_scope->__pyx_v__NONE_;

  /* "chorde/decorators.py":589
 *             client = aclient
 *             __NONE = _NONE_
 *             rv, rvttl = client.getTtl(callkey, __NONE, **get_kwargs)             # <<<<<<<<<<<<<<
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_client, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_callkey);
  __Pyx_INCREF(__pyx_v___NONE);
  __Pyx_GIVEREF(__pyx_v___NONE);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v___NONE);
  if (unlikely(!__pyx_cur_scope->__pyx_v_get_kwargs)) { __Pyx_RaiseClosureNameError("get_kwargs"); __PYX_ERR(0, 589, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_get_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 589, __pyx_L1_error)
  }
  __pyx_t_4 = PyDict_Copy(__pyx_cur_scope->__pyx_v_get_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
    PyObject* sequence = __pyx_t_9;
    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, 589, __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_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_4 = __pyx_t_12(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_5), 2) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
    __pyx_t_12 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L13_unpacking_done;
    __pyx_L12_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_12 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 589, __pyx_L1_error)
    __pyx_L13_unpacking_done:;
  }
  __pyx_v_rv = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_rvttl = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "chorde/decorators.py":591
 *             rv, rvttl = client.getTtl(callkey, __NONE, **get_kwargs)
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl):             # <<<<<<<<<<<<<<
 *                 if renew_time is not None:
 *                     if rv is not __NONE:
 */
  __pyx_t_1 = (__pyx_v_rv == __pyx_v___NONE);
  __pyx_t_13 = (__pyx_t_1 != 0);
  if (!__pyx_t_13) {
  } else {
    goto __pyx_L16_next_and;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 591, __pyx_L1_error) }
  __pyx_t_9 = PyObject_RichCompare(__pyx_v_rvttl, __pyx_cur_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 591, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__pyx_t_13) {
  } else {
    __pyx_t_2 = __pyx_t_13;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_L16_next_and:;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_client, __pyx_n_s_contains); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_cur_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 591, __pyx_L1_error) }
  __pyx_t_4 = NULL;
  __pyx_t_14 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_14 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_callkey, __pyx_cur_scope->__pyx_v_eff_async_ttl};
    __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_callkey, __pyx_cur_scope->__pyx_v_eff_async_ttl};
    __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_9);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_14, __pyx_v_callkey);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_eff_async_ttl);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_eff_async_ttl);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_14, __pyx_cur_scope->__pyx_v_eff_async_ttl);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_1 = ((!__pyx_t_13) != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_2) {

    /* "chorde/decorators.py":592
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl):
 *                 if renew_time is not None:             # <<<<<<<<<<<<<<
 *                     if rv is not __NONE:
 *                         nclient.renew(callkey, eff_async_ttl + renew_time)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 592, __pyx_L1_error) }
    __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_renew_time != Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "chorde/decorators.py":593
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl):
 *                 if renew_time is not None:
 *                     if rv is not __NONE:             # <<<<<<<<<<<<<<
 *                         nclient.renew(callkey, eff_async_ttl + renew_time)
 *                     elif placeholder_value_fn_cell:
 */
      __pyx_t_1 = (__pyx_v_rv != __pyx_v___NONE);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "chorde/decorators.py":594
 *                 if renew_time is not None:
 *                     if rv is not __NONE:
 *                         nclient.renew(callkey, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                     elif placeholder_value_fn_cell:
 *                         placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */
        if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 594, __pyx_L1_error) }
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_renew); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(!__pyx_cur_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 594, __pyx_L1_error) }
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 594, __pyx_L1_error) }
        __pyx_t_5 = PyNumber_Add(__pyx_cur_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 594, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = NULL;
        __pyx_t_14 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_14 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_callkey, __pyx_t_5};
          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __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_v_callkey, __pyx_t_5};
          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else
        #endif
        {
          __pyx_t_10 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_callkey);
          __Pyx_GIVEREF(__pyx_v_callkey);
          PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_14, __pyx_v_callkey);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_14, __pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "chorde/decorators.py":593
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl):
 *                 if renew_time is not None:
 *                     if rv is not __NONE:             # <<<<<<<<<<<<<<
 *                         nclient.renew(callkey, eff_async_ttl + renew_time)
 *                     elif placeholder_value_fn_cell:
 */
        goto __pyx_L19;
      }

      /* "chorde/decorators.py":595
 *                     if rv is not __NONE:
 *                         nclient.renew(callkey, eff_async_ttl + renew_time)
 *                     elif placeholder_value_fn_cell:             # <<<<<<<<<<<<<<
 *                         placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                         nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 595, __pyx_L1_error) }
      __pyx_t_2 = (__pyx_cur_scope->__pyx_v_placeholder_value_fn_cell != Py_None)&&(PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_placeholder_value_fn_cell) != 0);
      if (__pyx_t_2) {

        /* "chorde/decorators.py":596
 *                         nclient.renew(callkey, eff_async_ttl + renew_time)
 *                     elif placeholder_value_fn_cell:
 *                         placeholder = placeholder_value_fn_cell[0](*p, **kw)             # <<<<<<<<<<<<<<
 *                         nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         rv = placeholder
 */
        if (unlikely(!__pyx_cur_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 596, __pyx_L1_error) }
        if (unlikely(__pyx_cur_scope->__pyx_v_placeholder_value_fn_cell == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 596, __pyx_L1_error)
        }
        __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_placeholder_value_fn_cell, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_placeholder = __pyx_t_10;
        __pyx_t_10 = 0;

        /* "chorde/decorators.py":597
 *                     elif placeholder_value_fn_cell:
 *                         placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                         nclient.add(callkey, placeholder, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                         rv = placeholder
 *                         rvttl = eff_async_ttl + renew_time
 */
        if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 597, __pyx_L1_error) }
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 597, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(!__pyx_cur_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 597, __pyx_L1_error) }
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 597, __pyx_L1_error) }
        __pyx_t_9 = PyNumber_Add(__pyx_cur_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 597, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_5 = NULL;
        __pyx_t_14 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_14 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_callkey, __pyx_v_placeholder, __pyx_t_9};
          __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 597, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_callkey, __pyx_v_placeholder, __pyx_t_9};
          __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 597, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_callkey);
          __Pyx_GIVEREF(__pyx_v_callkey);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_14, __pyx_v_callkey);
          __Pyx_INCREF(__pyx_v_placeholder);
          __Pyx_GIVEREF(__pyx_v_placeholder);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_14, __pyx_v_placeholder);
          __Pyx_GIVEREF(__pyx_t_9);
          PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_14, __pyx_t_9);
          __pyx_t_9 = 0;
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 597, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "chorde/decorators.py":598
 *                         placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                         nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         rv = placeholder             # <<<<<<<<<<<<<<
 *                         rvttl = eff_async_ttl + renew_time
 *                 # Launch background update
 */
        __Pyx_INCREF(__pyx_v_placeholder);
        __Pyx_DECREF_SET(__pyx_v_rv, __pyx_v_placeholder);

        /* "chorde/decorators.py":599
 *                         nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         rv = placeholder
 *                         rvttl = eff_async_ttl + renew_time             # <<<<<<<<<<<<<<
 *                 # Launch background update
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
        if (unlikely(!__pyx_cur_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 599, __pyx_L1_error) }
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 599, __pyx_L1_error) }
        __pyx_t_10 = PyNumber_Add(__pyx_cur_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 599, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF_SET(__pyx_v_rvttl, __pyx_t_10);
        __pyx_t_10 = 0;

        /* "chorde/decorators.py":595
 *                     if rv is not __NONE:
 *                         nclient.renew(callkey, eff_async_ttl + renew_time)
 *                     elif placeholder_value_fn_cell:             # <<<<<<<<<<<<<<
 *                         placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                         nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 */
      }
      __pyx_L19:;

      /* "chorde/decorators.py":592
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl):
 *                 if renew_time is not None:             # <<<<<<<<<<<<<<
 *                     if rv is not __NONE:
 *                         nclient.renew(callkey, eff_async_ttl + renew_time)
 */
    }

    /* "chorde/decorators.py":601
 *                         rvttl = eff_async_ttl + renew_time
 *                 # Launch background update
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *             elif rv is not __NONE:
 *                 if rvttl < eff_async_ttl:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 601, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 601, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 601, __pyx_L1_error) }
    __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_client);
    __Pyx_GIVEREF(__pyx_v_client);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_client);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_af);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_af);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_af);
    __Pyx_INCREF(__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_10);
    __pyx_t_10 = 0;
    __pyx_t_10 = PyNumber_Add(__pyx_t_3, __pyx_v_p); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_10, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "chorde/decorators.py":591
 *             rv, rvttl = client.getTtl(callkey, __NONE, **get_kwargs)
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl):             # <<<<<<<<<<<<<<
 *                 if renew_time is not None:
 *                     if rv is not __NONE:
 */
    goto __pyx_L14;
  }

  /* "chorde/decorators.py":602
 *                 # Launch background update
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *             elif rv is not __NONE:             # <<<<<<<<<<<<<<
 *                 if rvttl < eff_async_ttl:
 *                     client.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 */
  __pyx_t_2 = (__pyx_v_rv != __pyx_v___NONE);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":603
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *             elif rv is not __NONE:
 *                 if rvttl < eff_async_ttl:             # <<<<<<<<<<<<<<
 *                     client.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                 stats.hits += 1
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 603, __pyx_L1_error) }
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_rvttl, __pyx_cur_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 603, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "chorde/decorators.py":604
 *             elif rv is not __NONE:
 *                 if rvttl < eff_async_ttl:
 *                     client.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)             # <<<<<<<<<<<<<<
 *                 stats.hits += 1
 * 
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_client, __pyx_n_s_promote); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_callkey);
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(!__pyx_cur_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 604, __pyx_L1_error) }
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ttl_skip, __pyx_cur_scope->__pyx_v_eff_async_ttl) < 0) __PYX_ERR(0, 604, __pyx_L1_error)
      __pyx_t_10 = __pyx_t_9;
      __pyx_t_9 = 0;
      if (unlikely(!__pyx_cur_scope->__pyx_v_get_kwargs)) { __Pyx_RaiseClosureNameError("get_kwargs"); __PYX_ERR(0, 604, __pyx_L1_error) }
      if (unlikely(__pyx_cur_scope->__pyx_v_get_kwargs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 604, __pyx_L1_error)
      }
      if (__Pyx_MergeKeywords(__pyx_t_10, __pyx_cur_scope->__pyx_v_get_kwargs) < 0) __PYX_ERR(0, 604, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "chorde/decorators.py":603
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *             elif rv is not __NONE:
 *                 if rvttl < eff_async_ttl:             # <<<<<<<<<<<<<<
 *                     client.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                 stats.hits += 1
 */
    }

    /* "chorde/decorators.py":605
 *                 if rvttl < eff_async_ttl:
 *                     client.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                 stats.hits += 1             # <<<<<<<<<<<<<<
 * 
 *             if rv is __NONE:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 605, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 605, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_v_stats->hits + 1);

    /* "chorde/decorators.py":602
 *                 # Launch background update
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *             elif rv is not __NONE:             # <<<<<<<<<<<<<<
 *                 if rvttl < eff_async_ttl:
 *                     client.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 */
  }
  __pyx_L14:;

  /* "chorde/decorators.py":607
 *                 stats.hits += 1
 * 
 *             if rv is __NONE:             # <<<<<<<<<<<<<<
 *                 # Must wait for it
 *                 if timings:
 */
  __pyx_t_1 = (__pyx_v_rv == __pyx_v___NONE);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":609
 *             if rv is __NONE:
 *                 # Must wait for it
 *                 if timings:             # <<<<<<<<<<<<<<
 *                     t0 = time.time()
 *                 client.wait(callkey)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_timings)) { __Pyx_RaiseClosureNameError("timings"); __PYX_ERR(0, 609, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_timings); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 609, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "chorde/decorators.py":610
 *                 # Must wait for it
 *                 if timings:
 *                     t0 = time.time()             # <<<<<<<<<<<<<<
 *                 client.wait(callkey)
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **get_kwargs)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_t0 = __pyx_t_15;

      /* "chorde/decorators.py":609
 *             if rv is __NONE:
 *                 # Must wait for it
 *                 if timings:             # <<<<<<<<<<<<<<
 *                     t0 = time.time()
 *                 client.wait(callkey)
 */
    }

    /* "chorde/decorators.py":611
 *                 if timings:
 *                     t0 = time.time()
 *                 client.wait(callkey)             # <<<<<<<<<<<<<<
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **get_kwargs)
 *                 if rv is __NONE or rvttl < eff_async_ttl:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_client, __pyx_n_s_wait); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_v_callkey) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callkey);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "chorde/decorators.py":612
 *                     t0 = time.time()
 *                 client.wait(callkey)
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **get_kwargs)             # <<<<<<<<<<<<<<
 *                 if rv is __NONE or rvttl < eff_async_ttl:
 *                     # FUUUUU
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_client, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_callkey);
    __Pyx_INCREF(__pyx_v___NONE);
    __Pyx_GIVEREF(__pyx_v___NONE);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v___NONE);
    if (unlikely(!__pyx_cur_scope->__pyx_v_get_kwargs)) { __Pyx_RaiseClosureNameError("get_kwargs"); __PYX_ERR(0, 612, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_get_kwargs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 612, __pyx_L1_error)
    }
    __pyx_t_10 = PyDict_Copy(__pyx_cur_scope->__pyx_v_get_kwargs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 612, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_12 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_10 = __pyx_t_12(__pyx_t_9); if (unlikely(!__pyx_t_10)) goto __pyx_L23_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_10);
      index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L23_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_9), 2) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
      __pyx_t_12 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L24_unpacking_done;
      __pyx_L23_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_12 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 612, __pyx_L1_error)
      __pyx_L24_unpacking_done:;
    }
    __Pyx_DECREF_SET(__pyx_v_rv, __pyx_t_10);
    __pyx_t_10 = 0;
    __Pyx_DECREF_SET(__pyx_v_rvttl, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "chorde/decorators.py":613
 *                 client.wait(callkey)
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **get_kwargs)
 *                 if rv is __NONE or rvttl < eff_async_ttl:             # <<<<<<<<<<<<<<
 *                     # FUUUUU
 *                     rv = f(*p, **kw)
 */
    __pyx_t_1 = (__pyx_v_rv == __pyx_v___NONE);
    __pyx_t_13 = (__pyx_t_1 != 0);
    if (!__pyx_t_13) {
    } else {
      __pyx_t_2 = __pyx_t_13;
      goto __pyx_L26_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 613, __pyx_L1_error) }
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_rvttl, __pyx_cur_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 613, __pyx_L1_error)
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 613, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __pyx_t_13;
    __pyx_L26_bool_binop_done:;
    if (__pyx_t_2) {

      /* "chorde/decorators.py":615
 *                 if rv is __NONE or rvttl < eff_async_ttl:
 *                     # FUUUUU
 *                     rv = f(*p, **kw)             # <<<<<<<<<<<<<<
 *                 stats.sync_misses += 1
 *                 if timings:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_f)) { __Pyx_RaiseClosureNameError("f"); __PYX_ERR(0, 615, __pyx_L1_error) }
      __pyx_t_4 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_f, __pyx_v_p, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_rv, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "chorde/decorators.py":613
 *                 client.wait(callkey)
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **get_kwargs)
 *                 if rv is __NONE or rvttl < eff_async_ttl:             # <<<<<<<<<<<<<<
 *                     # FUUUUU
 *                     rv = f(*p, **kw)
 */
    }

    /* "chorde/decorators.py":616
 *                     # FUUUUU
 *                     rv = f(*p, **kw)
 *                 stats.sync_misses += 1             # <<<<<<<<<<<<<<
 *                 if timings:
 *                     t1 = time.time()
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 616, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 616, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_v_stats->sync_misses = (__pyx_cur_scope->__pyx_v_stats->sync_misses + 1);

    /* "chorde/decorators.py":617
 *                     rv = f(*p, **kw)
 *                 stats.sync_misses += 1
 *                 if timings:             # <<<<<<<<<<<<<<
 *                     t1 = time.time()
 *                     t = t1-t0
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_timings)) { __Pyx_RaiseClosureNameError("timings"); __PYX_ERR(0, 617, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_timings); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 617, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "chorde/decorators.py":618
 *                 stats.sync_misses += 1
 *                 if timings:
 *                     t1 = time.time()             # <<<<<<<<<<<<<<
 *                     t = t1-t0
 *                     stats.wait_time += t
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_t1 = __pyx_t_15;

      /* "chorde/decorators.py":619
 *                 if timings:
 *                     t1 = time.time()
 *                     t = t1-t0             # <<<<<<<<<<<<<<
 *                     stats.wait_time += t
 * 
 */
      __pyx_v_t = (__pyx_v_t1 - __pyx_v_t0);

      /* "chorde/decorators.py":620
 *                     t1 = time.time()
 *                     t = t1-t0
 *                     stats.wait_time += t             # <<<<<<<<<<<<<<
 * 
 *             return rv
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 620, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 620, __pyx_L1_error) }
      __pyx_cur_scope->__pyx_v_stats->wait_time = (__pyx_cur_scope->__pyx_v_stats->wait_time + __pyx_v_t);

      /* "chorde/decorators.py":617
 *                     rv = f(*p, **kw)
 *                 stats.sync_misses += 1
 *                 if timings:             # <<<<<<<<<<<<<<
 *                     t1 = time.time()
 *                     t = t1-t0
 */
    }

    /* "chorde/decorators.py":607
 *                 stats.hits += 1
 * 
 *             if rv is __NONE:             # <<<<<<<<<<<<<<
 *                 # Must wait for it
 *                 if timings:
 */
  }

  /* "chorde/decorators.py":622
 *                     stats.wait_time += t
 * 
 *             return rv             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             async_cached_f = decorate(async_cached_f)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "chorde/decorators.py":576
 *         @wraps(of)
 *         @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *         def async_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.async_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XDECREF(__pyx_v_client);
  __Pyx_XDECREF(__pyx_v___NONE);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XDECREF(__pyx_v_rvttl);
  __Pyx_XDECREF(__pyx_v_placeholder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":627
 * 
 *         @wraps(of)
 *         def future_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_17future_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_17future_cached_f = {"future_cached_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_17future_cached_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_17future_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("future_cached_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "future_cached_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_16future_cached_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

/* "chorde/decorators.py":652
 *                 if rv is __NONE:
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         stats.hits += 1
 *                         frv.set(value[0])
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_1on_value(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_1on_value = {"on_value", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_1on_value, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_1on_value(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_value (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_on_value(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_on_value(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_value", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":653
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):
 *                         stats.hits += 1             # <<<<<<<<<<<<<<
 *                         frv.set(value[0])
 *                         # If it's stale, though, start an async refresh
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 653, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 653, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits + 1);

  /* "chorde/decorators.py":654
 *                     def on_value(value):
 *                         stats.hits += 1
 *                         frv.set(value[0])             # <<<<<<<<<<<<<<
 *                         # If it's stale, though, start an async refresh
 *                         if value[1] < eff_async_ttl and not nclient.contains(callkey, eff_async_ttl,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 654, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __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, 654, __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;

  /* "chorde/decorators.py":656
 *                         frv.set(value[0])
 *                         # If it's stale, though, start an async refresh
 *                         if value[1] < eff_async_ttl and not nclient.contains(callkey, eff_async_ttl,             # <<<<<<<<<<<<<<
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 656, __pyx_L1_error) }
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 656, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_contains); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 656, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 656, __pyx_L1_error) }
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_callkey);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);

  /* "chorde/decorators.py":657
 *                         # If it's stale, though, start an async refresh
 *                         if value[1] < eff_async_ttl and not nclient.contains(callkey, eff_async_ttl,
 *                                 **easync_lazy_recheck_kwargs):             # <<<<<<<<<<<<<<
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("easync_lazy_recheck_kwargs"); __PYX_ERR(0, 657, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 657, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs))) {
    __pyx_t_3 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }

  /* "chorde/decorators.py":656
 *                         frv.set(value[0])
 *                         # If it's stale, though, start an async refresh
 *                         if value[1] < eff_async_ttl and not nclient.contains(callkey, eff_async_ttl,             # <<<<<<<<<<<<<<
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = ((!__pyx_t_6) != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "chorde/decorators.py":658
 *                         if value[1] < eff_async_ttl and not nclient.contains(callkey, eff_async_ttl,
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):             # <<<<<<<<<<<<<<
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 658, __pyx_L1_error) }
    __pyx_t_7 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time != Py_None);
    __pyx_t_6 = (__pyx_t_7 != 0);
    if (__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L7_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_rv)) { __Pyx_RaiseClosureNameError("rv"); __PYX_ERR(0, 658, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v___NONE)) { __Pyx_RaiseClosureNameError("__NONE"); __PYX_ERR(0, 658, __pyx_L1_error) }
    __pyx_t_6 = (__pyx_cur_scope->__pyx_v_rv != __pyx_cur_scope->__pyx_v___NONE);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_5 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_lazy_kwargs)) { __Pyx_RaiseClosureNameError("lazy_kwargs"); __PYX_ERR(0, 658, __pyx_L1_error) }
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_lazy_kwargs); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 658, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_7;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_5) {

      /* "chorde/decorators.py":659
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 659, __pyx_L1_error) }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_renew); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 659, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 659, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 659, __pyx_L1_error) }
      __pyx_t_1 = PyNumber_Add(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __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[3] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_callkey, __pyx_t_1};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_callkey, __pyx_t_1};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "chorde/decorators.py":658
 *                         if value[1] < eff_async_ttl and not nclient.contains(callkey, eff_async_ttl,
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):             # <<<<<<<<<<<<<<
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    }

    /* "chorde/decorators.py":660
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *                     def on_miss():
 *                         if renew_time is not None and placeholder_value_fn_cell:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 660, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 660, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 660, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 660, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 660, __pyx_L1_error) }
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_client);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 660, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 660, __pyx_L1_error)
    }
    __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 660, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 660, __pyx_L1_error)
    }
    __pyx_t_3 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "chorde/decorators.py":656
 *                         frv.set(value[0])
 *                         # If it's stale, though, start an async refresh
 *                         if value[1] < eff_async_ttl and not nclient.contains(callkey, eff_async_ttl,             # <<<<<<<<<<<<<<
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  }

  /* "chorde/decorators.py":652
 *                 if rv is __NONE:
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         stats.hits += 1
 *                         frv.set(value[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_cached_f.on_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":661
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_3on_miss(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_3on_miss = {"on_miss", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_3on_miss, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_3on_miss(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_miss (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_2on_miss(__pyx_self);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_2on_miss(PyObject *__pyx_self) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_outer_scope;
  PyObject *__pyx_v_placeholder = NULL;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_miss", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":662
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():
 *                         if renew_time is not None and placeholder_value_fn_cell:             # <<<<<<<<<<<<<<
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 662, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 662, __pyx_L1_error) }
  __pyx_t_3 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell != Py_None)&&(PyList_GET_SIZE(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "chorde/decorators.py":663
 *                     def on_miss():
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)             # <<<<<<<<<<<<<<
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _fput_deferred(frv, client, af, callkey, eff_ttl(), *p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 663, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 663, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 663, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 663, __pyx_L1_error)
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 663, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 663, __pyx_L1_error)
    }
    __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_p, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __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;
    __pyx_v_placeholder = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":664
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                         _fput_deferred(frv, client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 664, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 664, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 664, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 664, __pyx_L1_error) }
    __pyx_t_4 = PyNumber_Add(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_v_placeholder, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_v_placeholder, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v_callkey);
      __Pyx_INCREF(__pyx_v_placeholder);
      __Pyx_GIVEREF(__pyx_v_placeholder);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_placeholder);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "chorde/decorators.py":662
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():
 *                         if renew_time is not None and placeholder_value_fn_cell:             # <<<<<<<<<<<<<<
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 */
  }

  /* "chorde/decorators.py":665
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _fput_deferred(frv, client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *                     def on_exc(exc_info):
 *                         stats.errors += 1
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__fput_deferred)) { __Pyx_RaiseClosureNameError("_fput_deferred"); __PYX_ERR(0, 665, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 665, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 665, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 665, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 665, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 665, __pyx_L1_error) }
  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_frv);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_frv);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_frv);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_v_client);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_6);
  __pyx_t_6 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 665, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 665, __pyx_L1_error)
  }
  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 665, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 665, __pyx_L1_error)
  }
  __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__fput_deferred, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "chorde/decorators.py":661
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_cached_f.on_miss", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_placeholder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":666
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _fput_deferred(frv, client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_5on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_5on_exc = {"on_exc", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_5on_exc, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_5on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_exc (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_4on_exc(__pyx_self, ((PyObject *)__pyx_v_exc_info));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_4on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_exc", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":667
 *                         _fput_deferred(frv, client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):
 *                         stats.errors += 1             # <<<<<<<<<<<<<<
 *                         return frv.exc(exc_info)
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 667, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 667, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors + 1);

  /* "chorde/decorators.py":668
 *                     def on_exc(exc_info):
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)             # <<<<<<<<<<<<<<
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\
 *                         .on_any(on_value, on_miss, on_exc)
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 668, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __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_exc_info) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exc_info);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __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;

  /* "chorde/decorators.py":666
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _fput_deferred(frv, client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_cached_f.on_exc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":675
 *                     stats.hits += 1
 *                     frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok             # <<<<<<<<<<<<<<
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_7on_value(PyObject *__pyx_self, PyObject *__pyx_v_contains); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_7on_value = {"on_value", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_7on_value, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_7on_value(PyObject *__pyx_self, PyObject *__pyx_v_contains) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_value (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_6on_value(__pyx_self, ((PyObject *)__pyx_v_contains));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_6on_value(PyObject *__pyx_self, PyObject *__pyx_v_contains) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_outer_scope;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_value", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":676
 *                     frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok
 *                         if not contains:             # <<<<<<<<<<<<<<
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_contains); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 676, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":677
 *                     def on_value(contains):  # lint:ok
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):             # <<<<<<<<<<<<<<
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 677, __pyx_L1_error) }
    __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time != Py_None);
    __pyx_t_3 = (__pyx_t_1 != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_rv)) { __Pyx_RaiseClosureNameError("rv"); __PYX_ERR(0, 677, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v___NONE)) { __Pyx_RaiseClosureNameError("__NONE"); __PYX_ERR(0, 677, __pyx_L1_error) }
    __pyx_t_3 = (__pyx_cur_scope->__pyx_v_rv != __pyx_cur_scope->__pyx_v___NONE);
    __pyx_t_1 = (__pyx_t_3 != 0);
    if (!__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L5_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_lazy_kwargs)) { __Pyx_RaiseClosureNameError("lazy_kwargs"); __PYX_ERR(0, 677, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_lazy_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 677, __pyx_L1_error)
    __pyx_t_2 = __pyx_t_1;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_2) {

      /* "chorde/decorators.py":678
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                         else:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 678, __pyx_L1_error) }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_renew); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 678, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 678, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 678, __pyx_L1_error) }
      __pyx_t_6 = PyNumber_Add(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 678, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __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;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "chorde/decorators.py":677
 *                     def on_value(contains):  # lint:ok
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):             # <<<<<<<<<<<<<<
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    }

    /* "chorde/decorators.py":679
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *                         else:
 *                             # just promote
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 679, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 679, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 679, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 679, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 679, __pyx_L1_error) }
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_client);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 679, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 679, __pyx_L1_error)
    }
    __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 679, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 679, __pyx_L1_error)
    }
    __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 679, __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;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "chorde/decorators.py":676
 *                     frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok
 *                         if not contains:             # <<<<<<<<<<<<<<
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 */
    goto __pyx_L3;
  }

  /* "chorde/decorators.py":682
 *                         else:
 *                             # just promote
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)             # <<<<<<<<<<<<<<
 *                     def on_miss():  # lint:ok
 *                         if renew_time is not None and placeholder_value_fn_cell:
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 682, __pyx_L1_error) }
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_promote); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 682, __pyx_L1_error) }
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_callkey);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 682, __pyx_L1_error) }
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ttl_skip, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl) < 0) __PYX_ERR(0, 682, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_6;
    __pyx_t_6 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_kwargs)) { __Pyx_RaiseClosureNameError("get_kwargs"); __PYX_ERR(0, 682, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_kwargs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 682, __pyx_L1_error)
    }
    if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_kwargs) < 0) __PYX_ERR(0, 682, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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;
  }
  __pyx_L3:;

  /* "chorde/decorators.py":675
 *                     stats.hits += 1
 *                     frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok             # <<<<<<<<<<<<<<
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_cached_f.on_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":683
 *                             # just promote
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_9on_miss(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_9on_miss = {"on_miss", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_9on_miss, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_9on_miss(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_miss (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_8on_miss(__pyx_self);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_8on_miss(PyObject *__pyx_self) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_outer_scope;
  PyObject *__pyx_v_placeholder = NULL;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_miss", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":684
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok
 *                         if renew_time is not None and placeholder_value_fn_cell:             # <<<<<<<<<<<<<<
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 684, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 684, __pyx_L1_error) }
  __pyx_t_3 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell != Py_None)&&(PyList_GET_SIZE(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "chorde/decorators.py":685
 *                     def on_miss():  # lint:ok
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)             # <<<<<<<<<<<<<<
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 685, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 685, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 685, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 685, __pyx_L1_error)
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 685, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 685, __pyx_L1_error)
    }
    __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_p, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 685, __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;
    __pyx_v_placeholder = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":686
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 686, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 686, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 686, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 686, __pyx_L1_error) }
    __pyx_t_4 = PyNumber_Add(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_v_placeholder, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_v_placeholder, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v_callkey);
      __Pyx_INCREF(__pyx_v_placeholder);
      __Pyx_GIVEREF(__pyx_v_placeholder);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_placeholder);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "chorde/decorators.py":684
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok
 *                         if renew_time is not None and placeholder_value_fn_cell:             # <<<<<<<<<<<<<<
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 */
  }

  /* "chorde/decorators.py":687
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *                     def on_exc(exc_info):  # lint:ok
 *                         stats.errors += 1
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 687, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 687, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 687, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 687, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 687, __pyx_L1_error) }
  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_client);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6);
  __pyx_t_6 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 687, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 687, __pyx_L1_error)
  }
  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 687, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 687, __pyx_L1_error)
  }
  __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "chorde/decorators.py":683
 *                             # just promote
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_cached_f.on_miss", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_placeholder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":688
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_11on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_11on_exc = {"on_exc", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_11on_exc, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_15future_cached_f_11on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_exc (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_10on_exc(__pyx_self, ((PyObject *)__pyx_v_exc_info));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_15future_cached_f_10on_exc(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_exc_info) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_exc", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":689
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok
 *                         stats.errors += 1             # <<<<<<<<<<<<<<
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 *                         .on_any_once(on_value, on_miss, on_exc)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 689, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 689, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors + 1);

  /* "chorde/decorators.py":688
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_cached_f.on_exc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":627
 * 
 *         @wraps(of)
 *         def future_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_16future_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_cur_scope;
  PyObject *__pyx_v_clientf = NULL;
  PyObject *__pyx_v_rvttl = NULL;
  PyObject *__pyx_v_on_value = 0;
  PyObject *__pyx_v_on_miss = 0;
  PyObject *__pyx_v_on_exc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("future_cached_f", 0);
  __pyx_cur_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *)__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_4_future_cached_f(__pyx_ptype_6chorde_10decorators___pyx_scope_struct_4_future_cached_f, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 627, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  __pyx_cur_scope->__pyx_v_p = __pyx_v_p;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_p);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_p);
  __pyx_cur_scope->__pyx_v_kw = __pyx_v_kw;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_kw);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_kw);

  /* "chorde/decorators.py":628
 *         @wraps(of)
 *         def future_cached_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":629
 *         def future_cached_f(*p, **kw):
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 629, __pyx_L3_error) }
      __pyx_t_4 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_key, __pyx_cur_scope->__pyx_v_p, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_cur_scope->__pyx_v_callkey = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "chorde/decorators.py":628
 *         @wraps(of)
 *         def future_cached_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":630
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.future_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 630, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "chorde/decorators.py":632
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return fclient.do_async(f, *p, **kw)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_logging); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 632, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 632, __pyx_L5_except_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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 632, __pyx_L5_except_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_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 632, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 632, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 632, __pyx_L5_except_error)
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__10, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 632, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "chorde/decorators.py":633
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return fclient.do_async(f, *p, **kw)
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 633, __pyx_L5_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 633, __pyx_L5_except_error) }
      __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":634
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return fclient.do_async(f, *p, **kw)             # <<<<<<<<<<<<<<
 * 
 *             client = aclient
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient)) { __Pyx_RaiseClosureNameError("fclient"); __PYX_ERR(0, 634, __pyx_L5_except_error) }
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient, __pyx_n_s_do_async); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 634, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_f)) { __Pyx_RaiseClosureNameError("f"); __PYX_ERR(0, 634, __pyx_L5_except_error) }
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 634, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_f);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_f);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_f);
      __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 634, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 634, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 634, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "chorde/decorators.py":628
 *         @wraps(of)
 *         def future_cached_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "chorde/decorators.py":636
 *                 return fclient.do_async(f, *p, **kw)
 * 
 *             client = aclient             # <<<<<<<<<<<<<<
 *             clientf = fclient
 *             frv = Future()
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 636, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient);
  __pyx_cur_scope->__pyx_v_client = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient;

  /* "chorde/decorators.py":637
 * 
 *             client = aclient
 *             clientf = fclient             # <<<<<<<<<<<<<<
 *             frv = Future()
 *             __NONE = _NONE_
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient)) { __Pyx_RaiseClosureNameError("fclient"); __PYX_ERR(0, 637, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient);
  __pyx_v_clientf = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient;

  /* "chorde/decorators.py":638
 *             client = aclient
 *             clientf = fclient
 *             frv = Future()             # <<<<<<<<<<<<<<
 *             __NONE = _NONE_
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_Future)) { __Pyx_RaiseClosureNameError("Future"); __PYX_ERR(0, 638, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_Future);
  __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_Future; __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_6 = (__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_6)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_frv = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "chorde/decorators.py":639
 *             clientf = fclient
 *             frv = Future()
 *             __NONE = _NONE_             # <<<<<<<<<<<<<<
 * 
 *             if future_sync_check:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_)) { __Pyx_RaiseClosureNameError("_NONE_"); __PYX_ERR(0, 639, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_);
  __pyx_cur_scope->__pyx_v___NONE = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_;

  /* "chorde/decorators.py":641
 *             __NONE = _NONE_
 * 
 *             if future_sync_check:             # <<<<<<<<<<<<<<
 *                 # Quick sync call with lazy_kwargs
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_future_sync_check)) { __Pyx_RaiseClosureNameError("future_sync_check"); __PYX_ERR(0, 641, __pyx_L1_error) }
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_future_sync_check); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 641, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "chorde/decorators.py":643
 *             if future_sync_check:
 *                 # Quick sync call with lazy_kwargs
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)             # <<<<<<<<<<<<<<
 *             else:
 *                 rv = __NONE
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_client, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_callkey);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v___NONE);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v___NONE);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_v___NONE);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs)) { __Pyx_RaiseClosureNameError("elazy_kwargs"); __PYX_ERR(0, 643, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 643, __pyx_L1_error)
    }
    if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs))) {
      __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_5 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __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;
    if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
      PyObject* sequence = __pyx_t_10;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 643, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_4 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_6), 2) < 0) __PYX_ERR(0, 643, __pyx_L1_error)
      __pyx_t_12 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L13_unpacking_done;
      __pyx_L12_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_12 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 643, __pyx_L1_error)
      __pyx_L13_unpacking_done:;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_cur_scope->__pyx_v_rv = __pyx_t_5;
    __pyx_t_5 = 0;
    __pyx_v_rvttl = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":641
 *             __NONE = _NONE_
 * 
 *             if future_sync_check:             # <<<<<<<<<<<<<<
 *                 # Quick sync call with lazy_kwargs
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 */
    goto __pyx_L11;
  }

  /* "chorde/decorators.py":645
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 *             else:
 *                 rv = __NONE             # <<<<<<<<<<<<<<
 *                 rvttl = -1
 * 
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v___NONE);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v___NONE);
    __pyx_cur_scope->__pyx_v_rv = __pyx_cur_scope->__pyx_v___NONE;

    /* "chorde/decorators.py":646
 *             else:
 *                 rv = __NONE
 *                 rvttl = -1             # <<<<<<<<<<<<<<
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl):
 */
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_v_rvttl = __pyx_int_neg_1;
  }
  __pyx_L11:;

  /* "chorde/decorators.py":648
 *                 rvttl = -1
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl):             # <<<<<<<<<<<<<<
 *                 # The hard way
 *                 if rv is __NONE:
 */
  __pyx_t_13 = (__pyx_cur_scope->__pyx_v_rv == __pyx_cur_scope->__pyx_v___NONE);
  __pyx_t_14 = (__pyx_t_13 != 0);
  if (!__pyx_t_14) {
  } else {
    __pyx_t_11 = __pyx_t_14;
    goto __pyx_L15_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 648, __pyx_L1_error) }
  __pyx_t_10 = PyObject_RichCompare(__pyx_v_rvttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 648, __pyx_L1_error)
  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_11 = __pyx_t_14;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_11) {

    /* "chorde/decorators.py":650
 *             if (rv is __NONE or rvttl < eff_async_ttl):
 *                 # The hard way
 *                 if rv is __NONE:             # <<<<<<<<<<<<<<
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):
 */
    __pyx_t_11 = (__pyx_cur_scope->__pyx_v_rv == __pyx_cur_scope->__pyx_v___NONE);
    __pyx_t_14 = (__pyx_t_11 != 0);
    if (__pyx_t_14) {

      /* "chorde/decorators.py":652
 *                 if rv is __NONE:
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         stats.hits += 1
 *                         frv.set(value[0])
 */
      __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_1on_value, 0, __pyx_n_s_cached_locals_decor_locals_futur, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_v_on_value = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "chorde/decorators.py":661
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */
      __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_3on_miss, 0, __pyx_n_s_cached_locals_decor_locals_futur_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_v_on_miss = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "chorde/decorators.py":666
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _fput_deferred(frv, client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)
 */
      __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_5on_exc, 0, __pyx_n_s_cached_locals_decor_locals_futur_3, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_v_on_exc = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "chorde/decorators.py":669
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\             # <<<<<<<<<<<<<<
 *                         .on_any(on_value, on_miss, on_exc)
 *                 else:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_clientf, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_callkey);
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 669, __pyx_L1_error) }
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ttl_skip, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl) < 0) __PYX_ERR(0, 669, __pyx_L1_error)
      __pyx_t_6 = __pyx_t_7;
      __pyx_t_7 = 0;
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("eget_async_lazy_recheck_kwargs"); __PYX_ERR(0, 669, __pyx_L1_error) }
      if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 669, __pyx_L1_error)
      }
      if (__Pyx_MergeKeywords(__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs) < 0) __PYX_ERR(0, 669, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 669, __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;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "chorde/decorators.py":670
 *                         return frv.exc(exc_info)
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\
 *                         .on_any(on_value, on_miss, on_exc)             # <<<<<<<<<<<<<<
 *                 else:
 *                     # It was a stale hit, so set the value now, but start a touch-refresh
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_on_any); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_15 = 0;
      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_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_on_value, __pyx_v_on_miss, __pyx_v_on_exc};
        __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_10);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_on_value, __pyx_v_on_miss, __pyx_v_on_exc};
        __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_10);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_on_value);
        __Pyx_GIVEREF(__pyx_v_on_value);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_15, __pyx_v_on_value);
        __Pyx_INCREF(__pyx_v_on_miss);
        __Pyx_GIVEREF(__pyx_v_on_miss);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_15, __pyx_v_on_miss);
        __Pyx_INCREF(__pyx_v_on_exc);
        __Pyx_GIVEREF(__pyx_v_on_exc);
        PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_15, __pyx_v_on_exc);
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":650
 *             if (rv is __NONE or rvttl < eff_async_ttl):
 *                 # The hard way
 *                 if rv is __NONE:             # <<<<<<<<<<<<<<
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):
 */
      goto __pyx_L17;
    }

    /* "chorde/decorators.py":673
 *                 else:
 *                     # It was a stale hit, so set the value now, but start a touch-refresh
 *                     stats.hits += 1             # <<<<<<<<<<<<<<
 *                     frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok
 */
    /*else*/ {
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 673, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 673, __pyx_L1_error) }
      __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits + 1);

      /* "chorde/decorators.py":674
 *                     # It was a stale hit, so set the value now, but start a touch-refresh
 *                     stats.hits += 1
 *                     frv._set_nothreads(rv)             # <<<<<<<<<<<<<<
 *                     def on_value(contains):  # lint:ok
 *                         if not contains:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_set_nothreads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 674, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __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_10 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_cur_scope->__pyx_v_rv) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_rv);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 674, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":675
 *                     stats.hits += 1
 *                     frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok             # <<<<<<<<<<<<<<
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
      __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_7on_value, 0, __pyx_n_s_cached_locals_decor_locals_futur, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 675, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_v_on_value = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "chorde/decorators.py":683
 *                             # just promote
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */
      __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_9on_miss, 0, __pyx_n_s_cached_locals_decor_locals_futur_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_v_on_miss = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "chorde/decorators.py":688
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 */
      __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_15future_cached_f_11on_exc, 0, __pyx_n_s_cached_locals_decor_locals_futur_3, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_v_on_exc = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "chorde/decorators.py":690
 *                     def on_exc(exc_info):  # lint:ok
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\             # <<<<<<<<<<<<<<
 *                         .on_any_once(on_value, on_miss, on_exc)
 *             else:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_clientf, __pyx_n_s_contains); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 690, __pyx_L1_error) }
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_callkey);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("easync_lazy_recheck_kwargs"); __PYX_ERR(0, 690, __pyx_L1_error) }
      if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 690, __pyx_L1_error)
      }
      if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs))) {
        __pyx_t_7 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 690, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      } else {
        __pyx_t_7 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 690, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      }
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __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;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "chorde/decorators.py":691
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 *                         .on_any_once(on_value, on_miss, on_exc)             # <<<<<<<<<<<<<<
 *             else:
 *                 stats.hits += 1
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_on_any_once); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_on_value, __pyx_v_on_miss, __pyx_v_on_exc};
        __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 691, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_10);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_on_value, __pyx_v_on_miss, __pyx_v_on_exc};
        __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 691, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_10);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_INCREF(__pyx_v_on_value);
        __Pyx_GIVEREF(__pyx_v_on_value);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_15, __pyx_v_on_value);
        __Pyx_INCREF(__pyx_v_on_miss);
        __Pyx_GIVEREF(__pyx_v_on_miss);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_15, __pyx_v_on_miss);
        __Pyx_INCREF(__pyx_v_on_exc);
        __Pyx_GIVEREF(__pyx_v_on_exc);
        PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_15, __pyx_v_on_exc);
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __pyx_L17:;

    /* "chorde/decorators.py":648
 *                 rvttl = -1
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl):             # <<<<<<<<<<<<<<
 *                 # The hard way
 *                 if rv is __NONE:
 */
    goto __pyx_L14;
  }

  /* "chorde/decorators.py":693
 *                         .on_any_once(on_value, on_miss, on_exc)
 *             else:
 *                 stats.hits += 1             # <<<<<<<<<<<<<<
 *                 frv._set_nothreads(rv)
 *             return frv
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 693, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 693, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits + 1);

    /* "chorde/decorators.py":694
 *             else:
 *                 stats.hits += 1
 *                 frv._set_nothreads(rv)             # <<<<<<<<<<<<<<
 *             return frv
 *         if decorate is not None:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_set_nothreads); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_10 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_cur_scope->__pyx_v_rv) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_cur_scope->__pyx_v_rv);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __pyx_L14:;

  /* "chorde/decorators.py":695
 *                 stats.hits += 1
 *                 frv._set_nothreads(rv)
 *             return frv             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             future_cached_f = decorate(future_cached_f)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_frv);
  __pyx_r = __pyx_cur_scope->__pyx_v_frv;
  goto __pyx_L0;

  /* "chorde/decorators.py":627
 * 
 *         @wraps(of)
 *         def future_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_10);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_clientf);
  __Pyx_XDECREF(__pyx_v_rvttl);
  __Pyx_XDECREF(__pyx_v_on_value);
  __Pyx_XDECREF(__pyx_v_on_miss);
  __Pyx_XDECREF(__pyx_v_on_exc);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":700
 * 
 *         @wraps(of)
 *         def lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_19lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_19lazy_cached_f = {"lazy_cached_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_19lazy_cached_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_19lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lazy_cached_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "lazy_cached_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_18lazy_cached_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_18lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = NULL;
  PyObject *__pyx_v_rv = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lazy_cached_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":701
 *         @wraps(of)
 *         def lazy_cached_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 701, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":702
 *         def lazy_cached_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 702, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":701
 *         @wraps(of)
 *         def lazy_cached_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":703
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":704
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 704, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 704, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":703
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":705
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.lazy_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 705, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":707
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 raise CacheMissError
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 707, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 707, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 707, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 707, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 707, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 707, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 707, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":708
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 raise CacheMissError
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 708, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 708, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":709
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 raise CacheMissError             # <<<<<<<<<<<<<<
 * 
 *             try:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_CacheMissError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 709, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(0, 709, __pyx_L6_except_error)
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":703
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L9_try_end:;
  }

  /* "chorde/decorators.py":711
 *                 raise CacheMissError
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 rv = nclient.get(callkey, **elazy_kwargs)
 *                 stats.hits += 1
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":712
 * 
 *             try:
 *                 rv = nclient.get(callkey, **elazy_kwargs)             # <<<<<<<<<<<<<<
 *                 stats.hits += 1
 *                 return rv
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 712, __pyx_L12_error) }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 712, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_callkey);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs)) { __Pyx_RaiseClosureNameError("elazy_kwargs"); __PYX_ERR(0, 712, __pyx_L12_error) }
      if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 712, __pyx_L12_error)
      }
      if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs))) {
        __pyx_t_4 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        __pyx_t_4 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 712, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_rv = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "chorde/decorators.py":713
 *             try:
 *                 rv = nclient.get(callkey, **elazy_kwargs)
 *                 stats.hits += 1             # <<<<<<<<<<<<<<
 *                 return rv
 *             except CacheMissError:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 713, __pyx_L12_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 713, __pyx_L12_error) }
      __pyx_cur_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_v_stats->hits + 1);

      /* "chorde/decorators.py":714
 *                 rv = nclient.get(callkey, **elazy_kwargs)
 *                 stats.hits += 1
 *                 return rv             # <<<<<<<<<<<<<<
 *             except CacheMissError:
 *                 stats.misses += 1
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_rv);
      __pyx_r = __pyx_v_rv;
      goto __pyx_L16_try_return;

      /* "chorde/decorators.py":711
 *                 raise CacheMissError
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 rv = nclient.get(callkey, **elazy_kwargs)
 *                 stats.hits += 1
 */
    }
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "chorde/decorators.py":715
 *                 stats.hits += 1
 *                 return rv
 *             except CacheMissError:             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *                 raise
 */
    __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_4, &__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CacheMissError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L14_except_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_10, __pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_ErrRestore(__pyx_t_10, __pyx_t_4, __pyx_t_3);
    __pyx_t_10 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0;
    if (__pyx_t_12) {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.lazy_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_10) < 0) __PYX_ERR(0, 715, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_10);

      /* "chorde/decorators.py":716
 *                 return rv
 *             except CacheMissError:
 *                 stats.misses += 1             # <<<<<<<<<<<<<<
 *                 raise
 *         if decorate is not None:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 716, __pyx_L14_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 716, __pyx_L14_except_error) }
      __pyx_cur_scope->__pyx_v_stats->misses = (__pyx_cur_scope->__pyx_v_stats->misses + 1);

      /* "chorde/decorators.py":717
 *             except CacheMissError:
 *                 stats.misses += 1
 *                 raise             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             lazy_cached_f = decorate(lazy_cached_f)
 */
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_4, __pyx_t_10);
      __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_10 = 0; 
      __PYX_ERR(0, 717, __pyx_L14_except_error)
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "chorde/decorators.py":711
 *                 raise CacheMissError
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 rv = nclient.get(callkey, **elazy_kwargs)
 *                 stats.hits += 1
 */
    __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_L16_try_return:;
    __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_L0;
  }

  /* "chorde/decorators.py":700
 * 
 *         @wraps(of)
 *         def lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.lazy_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":723
 * 
 *         @wraps(of)
 *         def future_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_21future_lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_21future_lazy_cached_f = {"future_lazy_cached_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_21future_lazy_cached_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_21future_lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("future_lazy_cached_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "future_lazy_cached_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

/* "chorde/decorators.py":748
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 *                     # It was a preliminar miss, so wait for a recheck to set the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         if value[1] >= 0:
 *                             stats.hits += 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_1on_value(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_1on_value = {"on_value", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_1on_value, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_1on_value(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_value (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_on_value(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_on_value(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_value", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":749
 *                     # It was a preliminar miss, so wait for a recheck to set the value
 *                     def on_value(value):
 *                         if value[1] >= 0:             # <<<<<<<<<<<<<<
 *                             stats.hits += 1
 *                             frv.set(value[0])
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __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, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "chorde/decorators.py":750
 *                     def on_value(value):
 *                         if value[1] >= 0:
 *                             stats.hits += 1             # <<<<<<<<<<<<<<
 *                             frv.set(value[0])
 *                         else:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 750, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 750, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits + 1);

    /* "chorde/decorators.py":751
 *                         if value[1] >= 0:
 *                             stats.hits += 1
 *                             frv.set(value[0])             # <<<<<<<<<<<<<<
 *                         else:
 *                             # Too stale
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 751, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __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;

    /* "chorde/decorators.py":749
 *                     # It was a preliminar miss, so wait for a recheck to set the value
 *                     def on_value(value):
 *                         if value[1] >= 0:             # <<<<<<<<<<<<<<
 *                             stats.hits += 1
 *                             frv.set(value[0])
 */
    goto __pyx_L3;
  }

  /* "chorde/decorators.py":754
 *                         else:
 *                             # Too stale
 *                             frv.miss()             # <<<<<<<<<<<<<<
 *                         # If it's stale, though, start an async refresh
 *                         if value[1] < eff_async_ttl and not client.contains(callkey, eff_async_ttl,
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 754, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_miss); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __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;
  }
  __pyx_L3:;

  /* "chorde/decorators.py":756
 *                             frv.miss()
 *                         # If it's stale, though, start an async refresh
 *                         if value[1] < eff_async_ttl and not client.contains(callkey, eff_async_ttl,             # <<<<<<<<<<<<<<
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 756, __pyx_L1_error) }
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
  __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, 756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_3 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 756, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_client, __pyx_n_s_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 756, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 756, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_callkey);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);

  /* "chorde/decorators.py":757
 *                         # If it's stale, though, start an async refresh
 *                         if value[1] < eff_async_ttl and not client.contains(callkey, eff_async_ttl,
 *                                 **easync_lazy_recheck_kwargs):             # <<<<<<<<<<<<<<
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("easync_lazy_recheck_kwargs"); __PYX_ERR(0, 757, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 757, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs))) {
    __pyx_t_4 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_4 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }

  /* "chorde/decorators.py":756
 *                             frv.miss()
 *                         # If it's stale, though, start an async refresh
 *                         if value[1] < eff_async_ttl and not client.contains(callkey, eff_async_ttl,             # <<<<<<<<<<<<<<
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = ((!__pyx_t_6) != 0);
  __pyx_t_3 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_3) {

    /* "chorde/decorators.py":758
 *                         if value[1] < eff_async_ttl and not client.contains(callkey, eff_async_ttl,
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):             # <<<<<<<<<<<<<<
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 758, __pyx_L1_error) }
    __pyx_t_7 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time != Py_None);
    __pyx_t_6 = (__pyx_t_7 != 0);
    if (__pyx_t_6) {
    } else {
      __pyx_t_3 = __pyx_t_6;
      goto __pyx_L8_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_rv)) { __Pyx_RaiseClosureNameError("rv"); __PYX_ERR(0, 758, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v___NONE)) { __Pyx_RaiseClosureNameError("__NONE"); __PYX_ERR(0, 758, __pyx_L1_error) }
    __pyx_t_6 = (__pyx_cur_scope->__pyx_v_rv != __pyx_cur_scope->__pyx_v___NONE);
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_3 = __pyx_t_7;
      goto __pyx_L8_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_lazy_kwargs)) { __Pyx_RaiseClosureNameError("lazy_kwargs"); __PYX_ERR(0, 758, __pyx_L1_error) }
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_lazy_kwargs); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 758, __pyx_L1_error)
    __pyx_t_3 = __pyx_t_7;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_3) {

      /* "chorde/decorators.py":759
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 759, __pyx_L1_error) }
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_renew); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 759, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 759, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 759, __pyx_L1_error) }
      __pyx_t_2 = PyNumber_Add(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_callkey, __pyx_t_2};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_callkey, __pyx_t_2};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 759, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_1) {
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __pyx_t_1 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __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;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "chorde/decorators.py":758
 *                         if value[1] < eff_async_ttl and not client.contains(callkey, eff_async_ttl,
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):             # <<<<<<<<<<<<<<
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    }

    /* "chorde/decorators.py":760
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *                     def on_miss():
 *                         # Ok, real miss, report it and start the computation
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 760, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 760, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 760, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 760, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 760, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_client);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5);
    __pyx_t_5 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 760, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 760, __pyx_L1_error)
    }
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 760, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 760, __pyx_L1_error)
    }
    __pyx_t_4 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 760, __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;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "chorde/decorators.py":756
 *                             frv.miss()
 *                         # If it's stale, though, start an async refresh
 *                         if value[1] < eff_async_ttl and not client.contains(callkey, eff_async_ttl,             # <<<<<<<<<<<<<<
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  }

  /* "chorde/decorators.py":748
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 *                     # It was a preliminar miss, so wait for a recheck to set the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         if value[1] >= 0:
 *                             stats.hits += 1
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_lazy_cached_f.on_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":761
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         # Ok, real miss, report it and start the computation
 *                         frv.miss()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_3on_miss(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_3on_miss = {"on_miss", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_3on_miss, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_3on_miss(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_miss (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_2on_miss(__pyx_self);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_2on_miss(PyObject *__pyx_self) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_outer_scope;
  PyObject *__pyx_v_placeholder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_miss", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":763
 *                     def on_miss():
 *                         # Ok, real miss, report it and start the computation
 *                         frv.miss()             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 763, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_miss); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __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;

  /* "chorde/decorators.py":764
 *                         # Ok, real miss, report it and start the computation
 *                         frv.miss()
 *                         if renew_time is not None and placeholder_value_fn_cell:             # <<<<<<<<<<<<<<
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 764, __pyx_L1_error) }
  __pyx_t_5 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 764, __pyx_L1_error) }
  __pyx_t_6 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell != Py_None)&&(PyList_GET_SIZE(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell) != 0);
  __pyx_t_4 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "chorde/decorators.py":765
 *                         frv.miss()
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)             # <<<<<<<<<<<<<<
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 765, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 765, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 765, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 765, __pyx_L1_error)
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 765, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 765, __pyx_L1_error)
    }
    __pyx_t_2 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_cur_scope->__pyx_v_p, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 765, __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_placeholder = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "chorde/decorators.py":766
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 766, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 766, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 766, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 766, __pyx_L1_error) }
    __pyx_t_1 = PyNumber_Add(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_v_placeholder, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 766, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_v_placeholder, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 766, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v_callkey);
      __Pyx_INCREF(__pyx_v_placeholder);
      __Pyx_GIVEREF(__pyx_v_placeholder);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_placeholder);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __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;

    /* "chorde/decorators.py":764
 *                         # Ok, real miss, report it and start the computation
 *                         frv.miss()
 *                         if renew_time is not None and placeholder_value_fn_cell:             # <<<<<<<<<<<<<<
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 */
  }

  /* "chorde/decorators.py":767
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *                     def on_exc(exc_info):
 *                         stats.errors += 1
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 767, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 767, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 767, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 767, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 767, __pyx_L1_error) }
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_client);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
  __pyx_t_3 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 767, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 767, __pyx_L1_error)
  }
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 767, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 767, __pyx_L1_error)
  }
  __pyx_t_2 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "chorde/decorators.py":761
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         # Ok, real miss, report it and start the computation
 *                         frv.miss()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_lazy_cached_f.on_miss", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_placeholder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":768
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         frv.exc(exc_info)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_5on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_5on_exc = {"on_exc", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_5on_exc, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_5on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_exc (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_4on_exc(__pyx_self, ((PyObject *)__pyx_v_exc_info));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_4on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_exc", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":769
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):
 *                         stats.errors += 1             # <<<<<<<<<<<<<<
 *                         frv.exc(exc_info)
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 769, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 769, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors + 1);

  /* "chorde/decorators.py":770
 *                     def on_exc(exc_info):
 *                         stats.errors += 1
 *                         frv.exc(exc_info)             # <<<<<<<<<<<<<<
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\
 *                         .on_any(on_value, on_miss, on_exc)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 770, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __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_exc_info) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exc_info);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __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;

  /* "chorde/decorators.py":768
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         frv.exc(exc_info)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_lazy_cached_f.on_exc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":781
 *                         stats.hits += 1
 *                         frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok             # <<<<<<<<<<<<<<
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_7on_value(PyObject *__pyx_self, PyObject *__pyx_v_contains); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_7on_value = {"on_value", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_7on_value, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_7on_value(PyObject *__pyx_self, PyObject *__pyx_v_contains) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_value (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_6on_value(__pyx_self, ((PyObject *)__pyx_v_contains));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_6on_value(PyObject *__pyx_self, PyObject *__pyx_v_contains) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_outer_scope;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_value", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":782
 *                         frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok
 *                         if not contains:             # <<<<<<<<<<<<<<
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_contains); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 782, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":783
 *                     def on_value(contains):  # lint:ok
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):             # <<<<<<<<<<<<<<
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 783, __pyx_L1_error) }
    __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time != Py_None);
    __pyx_t_3 = (__pyx_t_1 != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_rv)) { __Pyx_RaiseClosureNameError("rv"); __PYX_ERR(0, 783, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v___NONE)) { __Pyx_RaiseClosureNameError("__NONE"); __PYX_ERR(0, 783, __pyx_L1_error) }
    __pyx_t_3 = (__pyx_cur_scope->__pyx_v_rv != __pyx_cur_scope->__pyx_v___NONE);
    __pyx_t_1 = (__pyx_t_3 != 0);
    if (!__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L5_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_lazy_kwargs)) { __Pyx_RaiseClosureNameError("lazy_kwargs"); __PYX_ERR(0, 783, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_lazy_kwargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 783, __pyx_L1_error)
    __pyx_t_2 = __pyx_t_1;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_2) {

      /* "chorde/decorators.py":784
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                         else:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 784, __pyx_L1_error) }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_renew); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 784, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 784, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 784, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 784, __pyx_L1_error) }
      __pyx_t_6 = PyNumber_Add(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 784, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 784, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 784, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 784, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 784, __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;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "chorde/decorators.py":783
 *                     def on_value(contains):  # lint:ok
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):             # <<<<<<<<<<<<<<
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    }

    /* "chorde/decorators.py":785
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *                         else:
 *                             # just promote
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 785, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 785, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 785, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 785, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 785, __pyx_L1_error) }
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_client);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
    __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 785, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 785, __pyx_L1_error)
    }
    __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 785, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 785, __pyx_L1_error)
    }
    __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 785, __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;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "chorde/decorators.py":782
 *                         frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok
 *                         if not contains:             # <<<<<<<<<<<<<<
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 */
    goto __pyx_L3;
  }

  /* "chorde/decorators.py":788
 *                         else:
 *                             # just promote
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)             # <<<<<<<<<<<<<<
 *                     def on_miss():  # lint:ok
 *                         if renew_time is not None and placeholder_value_fn_cell:
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 788, __pyx_L1_error) }
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_promote); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 788, __pyx_L1_error) }
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_callkey);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 788, __pyx_L1_error) }
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ttl_skip, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl) < 0) __PYX_ERR(0, 788, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_6;
    __pyx_t_6 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_kwargs)) { __Pyx_RaiseClosureNameError("get_kwargs"); __PYX_ERR(0, 788, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_kwargs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 788, __pyx_L1_error)
    }
    if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_kwargs) < 0) __PYX_ERR(0, 788, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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;
  }
  __pyx_L3:;

  /* "chorde/decorators.py":781
 *                         stats.hits += 1
 *                         frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok             # <<<<<<<<<<<<<<
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_lazy_cached_f.on_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":789
 *                             # just promote
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_9on_miss(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_9on_miss = {"on_miss", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_9on_miss, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_9on_miss(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_miss (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_8on_miss(__pyx_self);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_8on_miss(PyObject *__pyx_self) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_outer_scope;
  PyObject *__pyx_v_placeholder = NULL;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_miss", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":790
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok
 *                         if renew_time is not None and placeholder_value_fn_cell:             # <<<<<<<<<<<<<<
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 790, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 790, __pyx_L1_error) }
  __pyx_t_3 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell != Py_None)&&(PyList_GET_SIZE(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "chorde/decorators.py":791
 *                     def on_miss():  # lint:ok
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)             # <<<<<<<<<<<<<<
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 791, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 791, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_placeholder_value_fn_cell, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 791, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 791, __pyx_L1_error)
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 791, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 791, __pyx_L1_error)
    }
    __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_cur_scope->__pyx_v_p, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __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;
    __pyx_v_placeholder = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":792
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 792, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 792, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 792, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 792, __pyx_L1_error) }
    __pyx_t_4 = PyNumber_Add(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_v_placeholder, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_callkey, __pyx_v_placeholder, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v_callkey);
      __Pyx_INCREF(__pyx_v_placeholder);
      __Pyx_GIVEREF(__pyx_v_placeholder);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_placeholder);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "chorde/decorators.py":790
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok
 *                         if renew_time is not None and placeholder_value_fn_cell:             # <<<<<<<<<<<<<<
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 */
  }

  /* "chorde/decorators.py":793
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *                     def on_exc(exc_info):  # lint:ok
 *                         stats.errors += 1
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 793, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 793, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 793, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 793, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 793, __pyx_L1_error) }
  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_client);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6);
  __pyx_t_6 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_p)) { __Pyx_RaiseClosureNameError("p"); __PYX_ERR(0, 793, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_p == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 793, __pyx_L1_error)
  }
  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_kw)) { __Pyx_RaiseClosureNameError("kw"); __PYX_ERR(0, 793, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_kw == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 793, __pyx_L1_error)
  }
  __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "chorde/decorators.py":789
 *                             # just promote
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_lazy_cached_f.on_miss", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_placeholder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":794
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_11on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_11on_exc = {"on_exc", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_11on_exc, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_11on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_exc (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_10on_exc(__pyx_self, ((PyObject *)__pyx_v_exc_info));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_10on_exc(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_exc_info) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_exc", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":795
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok
 *                         stats.errors += 1             # <<<<<<<<<<<<<<
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 *                         .on_any_once(on_value, on_miss, on_exc)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 795, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 795, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors + 1);

  /* "chorde/decorators.py":794
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_lazy_cached_f.on_exc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":723
 * 
 *         @wraps(of)
 *         def future_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_cur_scope;
  PyObject *__pyx_v_rvttl = NULL;
  PyObject *__pyx_v_clientf = NULL;
  PyObject *__pyx_v_on_value = 0;
  PyObject *__pyx_v_on_miss = 0;
  PyObject *__pyx_v_on_exc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("future_lazy_cached_f", 0);
  __pyx_cur_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *)__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f(__pyx_ptype_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 723, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  __pyx_cur_scope->__pyx_v_p = __pyx_v_p;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_p);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_p);
  __pyx_cur_scope->__pyx_v_kw = __pyx_v_kw;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_kw);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_kw);

  /* "chorde/decorators.py":724
 *         @wraps(of)
 *         def future_lazy_cached_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":725
 *         def future_lazy_cached_f(*p, **kw):
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 725, __pyx_L3_error) }
      __pyx_t_4 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_key, __pyx_cur_scope->__pyx_v_p, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 725, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_cur_scope->__pyx_v_callkey = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "chorde/decorators.py":724
 *         @wraps(of)
 *         def future_lazy_cached_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":726
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.future_lazy_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 726, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "chorde/decorators.py":728
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 raise CacheMissError
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_logging); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 728, __pyx_L5_except_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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L5_except_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_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 728, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 728, __pyx_L5_except_error)
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__10, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "chorde/decorators.py":729
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 raise CacheMissError
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 729, __pyx_L5_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 729, __pyx_L5_except_error) }
      __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":730
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 raise CacheMissError             # <<<<<<<<<<<<<<
 * 
 *             client = aclient
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CacheMissError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 730, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 730, __pyx_L5_except_error)
    }
    __pyx_L5_except_error:;

    /* "chorde/decorators.py":724
 *         @wraps(of)
 *         def future_lazy_cached_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L8_try_end:;
  }

  /* "chorde/decorators.py":732
 *                 raise CacheMissError
 * 
 *             client = aclient             # <<<<<<<<<<<<<<
 *             frv = Future()
 *             __NONE = _NONE_
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 732, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient);
  __pyx_cur_scope->__pyx_v_client = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient;

  /* "chorde/decorators.py":733
 * 
 *             client = aclient
 *             frv = Future()             # <<<<<<<<<<<<<<
 *             __NONE = _NONE_
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_Future)) { __Pyx_RaiseClosureNameError("Future"); __PYX_ERR(0, 733, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_Future);
  __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_Future; __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_6 = (__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_6)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_frv = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "chorde/decorators.py":734
 *             client = aclient
 *             frv = Future()
 *             __NONE = _NONE_             # <<<<<<<<<<<<<<
 * 
 *             if future_sync_check:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_)) { __Pyx_RaiseClosureNameError("_NONE_"); __PYX_ERR(0, 734, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_);
  __pyx_cur_scope->__pyx_v___NONE = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_;

  /* "chorde/decorators.py":736
 *             __NONE = _NONE_
 * 
 *             if future_sync_check:             # <<<<<<<<<<<<<<
 *                 # Quick sync call with lazy_kwargs
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_future_sync_check)) { __Pyx_RaiseClosureNameError("future_sync_check"); __PYX_ERR(0, 736, __pyx_L1_error) }
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_future_sync_check); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 736, __pyx_L1_error)
  if (__pyx_t_10) {

    /* "chorde/decorators.py":738
 *             if future_sync_check:
 *                 # Quick sync call with lazy_kwargs
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)             # <<<<<<<<<<<<<<
 *             else:
 *                 rv = __NONE
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_client, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_callkey);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v___NONE);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v___NONE);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_v___NONE);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs)) { __Pyx_RaiseClosureNameError("elazy_kwargs"); __PYX_ERR(0, 738, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 738, __pyx_L1_error)
    }
    if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs))) {
      __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_5 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __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;
    if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
      PyObject* sequence = __pyx_t_8;
      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, 738, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 738, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L13_unpacking_done;
      __pyx_L12_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 738, __pyx_L1_error)
      __pyx_L13_unpacking_done:;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_cur_scope->__pyx_v_rv = __pyx_t_5;
    __pyx_t_5 = 0;
    __pyx_v_rvttl = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":736
 *             __NONE = _NONE_
 * 
 *             if future_sync_check:             # <<<<<<<<<<<<<<
 *                 # Quick sync call with lazy_kwargs
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 */
    goto __pyx_L11;
  }

  /* "chorde/decorators.py":740
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 *             else:
 *                 rv = __NONE             # <<<<<<<<<<<<<<
 *                 rvttl = -1
 * 
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v___NONE);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v___NONE);
    __pyx_cur_scope->__pyx_v_rv = __pyx_cur_scope->__pyx_v___NONE;

    /* "chorde/decorators.py":741
 *             else:
 *                 rv = __NONE
 *                 rvttl = -1             # <<<<<<<<<<<<<<
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl):
 */
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_v_rvttl = __pyx_int_neg_1;
  }
  __pyx_L11:;

  /* "chorde/decorators.py":743
 *                 rvttl = -1
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl):             # <<<<<<<<<<<<<<
 *                 # The hard way
 *                 clientf = fclient
 */
  __pyx_t_12 = (__pyx_cur_scope->__pyx_v_rv == __pyx_cur_scope->__pyx_v___NONE);
  __pyx_t_13 = (__pyx_t_12 != 0);
  if (!__pyx_t_13) {
  } else {
    __pyx_t_10 = __pyx_t_13;
    goto __pyx_L15_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 743, __pyx_L1_error) }
  __pyx_t_8 = PyObject_RichCompare(__pyx_v_rvttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 743, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_10 = __pyx_t_13;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_10) {

    /* "chorde/decorators.py":745
 *             if (rv is __NONE or rvttl < eff_async_ttl):
 *                 # The hard way
 *                 clientf = fclient             # <<<<<<<<<<<<<<
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 *                     # It was a preliminar miss, so wait for a recheck to set the value
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient)) { __Pyx_RaiseClosureNameError("fclient"); __PYX_ERR(0, 745, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient);
    __pyx_v_clientf = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient;

    /* "chorde/decorators.py":746
 *                 # The hard way
 *                 clientf = fclient
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):             # <<<<<<<<<<<<<<
 *                     # It was a preliminar miss, so wait for a recheck to set the value
 *                     def on_value(value):
 */
    __pyx_t_13 = (__pyx_cur_scope->__pyx_v_rv == __pyx_cur_scope->__pyx_v___NONE);
    __pyx_t_12 = (__pyx_t_13 != 0);
    if (__pyx_t_12) {
    } else {
      __pyx_t_10 = __pyx_t_12;
      goto __pyx_L18_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_future_sync_check)) { __Pyx_RaiseClosureNameError("future_sync_check"); __PYX_ERR(0, 746, __pyx_L1_error) }
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_future_sync_check); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
    __pyx_t_13 = ((!__pyx_t_12) != 0);
    if (!__pyx_t_13) {
    } else {
      __pyx_t_10 = __pyx_t_13;
      goto __pyx_L18_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_lazy_recheck)) { __Pyx_RaiseClosureNameError("async_lazy_recheck"); __PYX_ERR(0, 746, __pyx_L1_error) }
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_lazy_recheck); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
    __pyx_t_10 = __pyx_t_13;
    __pyx_L18_bool_binop_done:;
    if (__pyx_t_10) {

      /* "chorde/decorators.py":748
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 *                     # It was a preliminar miss, so wait for a recheck to set the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         if value[1] >= 0:
 *                             stats.hits += 1
 */
      __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_1on_value, 0, __pyx_n_s_cached_locals_decor_locals_futur_4, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_on_value = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "chorde/decorators.py":761
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         # Ok, real miss, report it and start the computation
 *                         frv.miss()
 */
      __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_3on_miss, 0, __pyx_n_s_cached_locals_decor_locals_futur_5, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_on_miss = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "chorde/decorators.py":768
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         frv.exc(exc_info)
 */
      __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_5on_exc, 0, __pyx_n_s_cached_locals_decor_locals_futur_6, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_on_exc = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "chorde/decorators.py":771
 *                         stats.errors += 1
 *                         frv.exc(exc_info)
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\             # <<<<<<<<<<<<<<
 *                         .on_any(on_value, on_miss, on_exc)
 *                 else:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_clientf, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_callkey);
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 771, __pyx_L1_error) }
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ttl_skip, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
      __pyx_t_6 = __pyx_t_7;
      __pyx_t_7 = 0;
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("eget_async_lazy_recheck_kwargs"); __PYX_ERR(0, 771, __pyx_L1_error) }
      if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 771, __pyx_L1_error)
      }
      if (__Pyx_MergeKeywords(__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 771, __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;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "chorde/decorators.py":772
 *                         frv.exc(exc_info)
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\
 *                         .on_any(on_value, on_miss, on_exc)             # <<<<<<<<<<<<<<
 *                 else:
 *                     # It was a stale hit or permanent miss, so set the value now, but start a touch-refresh
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_on_any); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_14 = 0;
      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_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_on_value, __pyx_v_on_miss, __pyx_v_on_exc};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 772, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_on_value, __pyx_v_on_miss, __pyx_v_on_exc};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 772, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 772, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_on_value);
        __Pyx_GIVEREF(__pyx_v_on_value);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_14, __pyx_v_on_value);
        __Pyx_INCREF(__pyx_v_on_miss);
        __Pyx_GIVEREF(__pyx_v_on_miss);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_14, __pyx_v_on_miss);
        __Pyx_INCREF(__pyx_v_on_exc);
        __Pyx_GIVEREF(__pyx_v_on_exc);
        PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_14, __pyx_v_on_exc);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 772, __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;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "chorde/decorators.py":746
 *                 # The hard way
 *                 clientf = fclient
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):             # <<<<<<<<<<<<<<
 *                     # It was a preliminar miss, so wait for a recheck to set the value
 *                     def on_value(value):
 */
      goto __pyx_L17;
    }

    /* "chorde/decorators.py":775
 *                 else:
 *                     # It was a stale hit or permanent miss, so set the value now, but start a touch-refresh
 *                     if rv is __NONE:             # <<<<<<<<<<<<<<
 *                         stats.misses += 1
 *                         frv._miss_nothreads()
 */
    /*else*/ {
      __pyx_t_10 = (__pyx_cur_scope->__pyx_v_rv == __pyx_cur_scope->__pyx_v___NONE);
      __pyx_t_13 = (__pyx_t_10 != 0);
      if (__pyx_t_13) {

        /* "chorde/decorators.py":776
 *                     # It was a stale hit or permanent miss, so set the value now, but start a touch-refresh
 *                     if rv is __NONE:
 *                         stats.misses += 1             # <<<<<<<<<<<<<<
 *                         frv._miss_nothreads()
 *                     else:
 */
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 776, __pyx_L1_error) }
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 776, __pyx_L1_error) }
        __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses + 1);

        /* "chorde/decorators.py":777
 *                     if rv is __NONE:
 *                         stats.misses += 1
 *                         frv._miss_nothreads()             # <<<<<<<<<<<<<<
 *                     else:
 *                         stats.hits += 1
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_miss_nothreads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 777, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __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_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, 777, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "chorde/decorators.py":775
 *                 else:
 *                     # It was a stale hit or permanent miss, so set the value now, but start a touch-refresh
 *                     if rv is __NONE:             # <<<<<<<<<<<<<<
 *                         stats.misses += 1
 *                         frv._miss_nothreads()
 */
        goto __pyx_L21;
      }

      /* "chorde/decorators.py":779
 *                         frv._miss_nothreads()
 *                     else:
 *                         stats.hits += 1             # <<<<<<<<<<<<<<
 *                         frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok
 */
      /*else*/ {
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 779, __pyx_L1_error) }
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 779, __pyx_L1_error) }
        __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits + 1);

        /* "chorde/decorators.py":780
 *                     else:
 *                         stats.hits += 1
 *                         frv._set_nothreads(rv)             # <<<<<<<<<<<<<<
 *                     def on_value(contains):  # lint:ok
 *                         if not contains:
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_set_nothreads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 780, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __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_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_cur_scope->__pyx_v_rv) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_rv);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 780, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_L21:;

      /* "chorde/decorators.py":781
 *                         stats.hits += 1
 *                         frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok             # <<<<<<<<<<<<<<
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
      __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_7on_value, 0, __pyx_n_s_cached_locals_decor_locals_futur_4, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_on_value = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "chorde/decorators.py":789
 *                             # just promote
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */
      __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_9on_miss, 0, __pyx_n_s_cached_locals_decor_locals_futur_5, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_on_miss = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "chorde/decorators.py":794
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 */
      __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_20future_lazy_cached_f_11on_exc, 0, __pyx_n_s_cached_locals_decor_locals_futur_6, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 794, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_on_exc = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "chorde/decorators.py":796
 *                     def on_exc(exc_info):  # lint:ok
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\             # <<<<<<<<<<<<<<
 *                         .on_any_once(on_value, on_miss, on_exc)
 *             else:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_clientf, __pyx_n_s_contains); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 796, __pyx_L1_error) }
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 796, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_callkey);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("easync_lazy_recheck_kwargs"); __PYX_ERR(0, 796, __pyx_L1_error) }
      if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 796, __pyx_L1_error)
      }
      if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs))) {
        __pyx_t_7 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 796, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      } else {
        __pyx_t_7 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 796, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      }
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __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;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "chorde/decorators.py":797
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 *                         .on_any_once(on_value, on_miss, on_exc)             # <<<<<<<<<<<<<<
 *             else:
 *                 stats.hits += 1
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_on_any_once); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 797, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_14 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_on_value, __pyx_v_on_miss, __pyx_v_on_exc};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 797, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_on_value, __pyx_v_on_miss, __pyx_v_on_exc};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 797, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 797, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_INCREF(__pyx_v_on_value);
        __Pyx_GIVEREF(__pyx_v_on_value);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_14, __pyx_v_on_value);
        __Pyx_INCREF(__pyx_v_on_miss);
        __Pyx_GIVEREF(__pyx_v_on_miss);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_14, __pyx_v_on_miss);
        __Pyx_INCREF(__pyx_v_on_exc);
        __Pyx_GIVEREF(__pyx_v_on_exc);
        PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_14, __pyx_v_on_exc);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 797, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_L17:;

    /* "chorde/decorators.py":743
 *                 rvttl = -1
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl):             # <<<<<<<<<<<<<<
 *                 # The hard way
 *                 clientf = fclient
 */
    goto __pyx_L14;
  }

  /* "chorde/decorators.py":799
 *                         .on_any_once(on_value, on_miss, on_exc)
 *             else:
 *                 stats.hits += 1             # <<<<<<<<<<<<<<
 *                 frv._set_nothreads(rv)
 *             return frv
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 799, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 799, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits + 1);

    /* "chorde/decorators.py":800
 *             else:
 *                 stats.hits += 1
 *                 frv._set_nothreads(rv)             # <<<<<<<<<<<<<<
 *             return frv
 *         if decorate is not None:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_set_nothreads); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_cur_scope->__pyx_v_rv) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_cur_scope->__pyx_v_rv);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_L14:;

  /* "chorde/decorators.py":801
 *                 stats.hits += 1
 *                 frv._set_nothreads(rv)
 *             return frv             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             future_lazy_cached_f = decorate(future_lazy_cached_f)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_frv);
  __pyx_r = __pyx_cur_scope->__pyx_v_frv;
  goto __pyx_L0;

  /* "chorde/decorators.py":723
 * 
 *         @wraps(of)
 *         def future_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("chorde.decorators.cached.decor.future_lazy_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rvttl);
  __Pyx_XDECREF(__pyx_v_clientf);
  __Pyx_XDECREF(__pyx_v_on_value);
  __Pyx_XDECREF(__pyx_v_on_miss);
  __Pyx_XDECREF(__pyx_v_on_exc);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":806
 * 
 *         @wraps(of)
 *         def future_peek_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_23future_peek_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_23future_peek_cached_f = {"future_peek_cached_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_23future_peek_cached_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_23future_peek_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("future_peek_cached_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "future_peek_cached_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_22future_peek_cached_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

/* "chorde/decorators.py":831
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         if value[1] >= 0:
 *                             stats.hits += 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_1on_value(PyObject *__pyx_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_1on_value = {"on_value", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_1on_value, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_1on_value(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_value (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_on_value(__pyx_self, ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_on_value(PyObject *__pyx_self, PyObject *__pyx_v_value) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_value", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":832
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):
 *                         if value[1] >= 0:             # <<<<<<<<<<<<<<
 *                             stats.hits += 1
 *                             return frv.set(value[0])
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error)
  __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, 832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "chorde/decorators.py":833
 *                     def on_value(value):
 *                         if value[1] >= 0:
 *                             stats.hits += 1             # <<<<<<<<<<<<<<
 *                             return frv.set(value[0])
 *                         else:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 833, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 833, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits + 1);

    /* "chorde/decorators.py":834
 *                         if value[1] >= 0:
 *                             stats.hits += 1
 *                             return frv.set(value[0])             # <<<<<<<<<<<<<<
 *                         else:
 *                             # Too stale
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 834, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __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;

    /* "chorde/decorators.py":832
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):
 *                         if value[1] >= 0:             # <<<<<<<<<<<<<<
 *                             stats.hits += 1
 *                             return frv.set(value[0])
 */
  }

  /* "chorde/decorators.py":837
 *                         else:
 *                             # Too stale
 *                             stats.misses += 1             # <<<<<<<<<<<<<<
 *                             return frv.miss()
 *                     def on_miss():
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 837, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 837, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses + 1);

    /* "chorde/decorators.py":838
 *                             # Too stale
 *                             stats.misses += 1
 *                             return frv.miss()             # <<<<<<<<<<<<<<
 *                     def on_miss():
 *                         # Ok, real miss, report it
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 838, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_miss); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __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;
  }

  /* "chorde/decorators.py":831
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         if value[1] >= 0:
 *                             stats.hits += 1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_peek_cached_f.on_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":839
 *                             stats.misses += 1
 *                             return frv.miss()
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         # Ok, real miss, report it
 *                         stats.misses += 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_3on_miss(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_3on_miss = {"on_miss", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_3on_miss, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_3on_miss(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_miss (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_2on_miss(__pyx_self);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_2on_miss(PyObject *__pyx_self) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_miss", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":841
 *                     def on_miss():
 *                         # Ok, real miss, report it
 *                         stats.misses += 1             # <<<<<<<<<<<<<<
 *                         return frv.miss()
 *                     def on_exc(exc_info):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 841, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 841, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses + 1);

  /* "chorde/decorators.py":842
 *                         # Ok, real miss, report it
 *                         stats.misses += 1
 *                         return frv.miss()             # <<<<<<<<<<<<<<
 *                     def on_exc(exc_info):
 *                         stats.errors += 1
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 842, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_miss); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __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;

  /* "chorde/decorators.py":839
 *                             stats.misses += 1
 *                             return frv.miss()
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         # Ok, real miss, report it
 *                         stats.misses += 1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_peek_cached_f.on_miss", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":843
 *                         stats.misses += 1
 *                         return frv.miss()
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_5on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_5on_exc = {"on_exc", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_5on_exc, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_5on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_exc (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_4on_exc(__pyx_self, ((PyObject *)__pyx_v_exc_info));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_4on_exc(PyObject *__pyx_self, PyObject *__pyx_v_exc_info) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_exc", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":844
 *                         return frv.miss()
 *                     def on_exc(exc_info):
 *                         stats.errors += 1             # <<<<<<<<<<<<<<
 *                         return frv.exc(exc_info)
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 844, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 844, __pyx_L1_error) }
  __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors + 1);

  /* "chorde/decorators.py":845
 *                     def on_exc(exc_info):
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)             # <<<<<<<<<<<<<<
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\
 *                         .on_any(on_value, on_miss, on_exc)
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_frv)) { __Pyx_RaiseClosureNameError("frv"); __PYX_ERR(0, 845, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_exc); 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_v_exc_info) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_exc_info);
  __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "chorde/decorators.py":843
 *                         stats.misses += 1
 *                         return frv.miss()
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_peek_cached_f.on_exc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":806
 * 
 *         @wraps(of)
 *         def future_peek_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_22future_peek_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *__pyx_cur_scope;
  PyObject *__pyx_v_callkey = NULL;
  PyObject *__pyx_v_client = NULL;
  PyObject *__pyx_v_clientf = NULL;
  PyObject *__pyx_v___NONE = NULL;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_v_rvttl = NULL;
  PyObject *__pyx_v_on_value = 0;
  PyObject *__pyx_v_on_miss = 0;
  PyObject *__pyx_v_on_exc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("future_peek_cached_f", 0);
  __pyx_cur_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *)__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f(__pyx_ptype_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 806, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);

  /* "chorde/decorators.py":807
 *         @wraps(of)
 *         def future_peek_cached_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":808
 *         def future_peek_cached_f(*p, **kw):
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 808, __pyx_L3_error) }
      __pyx_t_4 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 808, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 808, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_callkey = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "chorde/decorators.py":807
 *         @wraps(of)
 *         def future_peek_cached_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":809
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.future_peek_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 809, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "chorde/decorators.py":811
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 raise CacheMissError
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_logging); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 811, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 811, __pyx_L5_except_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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 811, __pyx_L5_except_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_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 811, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 811, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 811, __pyx_L5_except_error)
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__10, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 811, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "chorde/decorators.py":812
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 raise CacheMissError
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 812, __pyx_L5_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 812, __pyx_L5_except_error) }
      __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":813
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 raise CacheMissError             # <<<<<<<<<<<<<<
 * 
 *             client = aclient
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CacheMissError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 813, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 813, __pyx_L5_except_error)
    }
    __pyx_L5_except_error:;

    /* "chorde/decorators.py":807
 *         @wraps(of)
 *         def future_peek_cached_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L8_try_end:;
  }

  /* "chorde/decorators.py":815
 *                 raise CacheMissError
 * 
 *             client = aclient             # <<<<<<<<<<<<<<
 *             clientf = fclient
 *             frv = Future()
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 815, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient);
  __pyx_v_client = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient;

  /* "chorde/decorators.py":816
 * 
 *             client = aclient
 *             clientf = fclient             # <<<<<<<<<<<<<<
 *             frv = Future()
 *             __NONE = _NONE_
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient)) { __Pyx_RaiseClosureNameError("fclient"); __PYX_ERR(0, 816, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient);
  __pyx_v_clientf = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fclient;

  /* "chorde/decorators.py":817
 *             client = aclient
 *             clientf = fclient
 *             frv = Future()             # <<<<<<<<<<<<<<
 *             __NONE = _NONE_
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_Future)) { __Pyx_RaiseClosureNameError("Future"); __PYX_ERR(0, 817, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_Future);
  __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_Future; __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_6 = (__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_6)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_frv = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "chorde/decorators.py":818
 *             clientf = fclient
 *             frv = Future()
 *             __NONE = _NONE_             # <<<<<<<<<<<<<<
 * 
 *             if future_sync_check:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_)) { __Pyx_RaiseClosureNameError("_NONE_"); __PYX_ERR(0, 818, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_);
  __pyx_v___NONE = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_;

  /* "chorde/decorators.py":820
 *             __NONE = _NONE_
 * 
 *             if future_sync_check:             # <<<<<<<<<<<<<<
 *                 # Quick sync call with lazy_kwargs
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_future_sync_check)) { __Pyx_RaiseClosureNameError("future_sync_check"); __PYX_ERR(0, 820, __pyx_L1_error) }
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_future_sync_check); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 820, __pyx_L1_error)
  if (__pyx_t_10) {

    /* "chorde/decorators.py":822
 *             if future_sync_check:
 *                 # Quick sync call with lazy_kwargs
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)             # <<<<<<<<<<<<<<
 *             else:
 *                 rv = __NONE
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_client, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callkey);
    __Pyx_INCREF(__pyx_v___NONE);
    __Pyx_GIVEREF(__pyx_v___NONE);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v___NONE);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs)) { __Pyx_RaiseClosureNameError("elazy_kwargs"); __PYX_ERR(0, 822, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 822, __pyx_L1_error)
    }
    if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs))) {
      __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_5 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __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;
    if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
      PyObject* sequence = __pyx_t_8;
      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, 822, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L13_unpacking_done;
      __pyx_L12_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 822, __pyx_L1_error)
      __pyx_L13_unpacking_done:;
    }
    __pyx_v_rv = __pyx_t_5;
    __pyx_t_5 = 0;
    __pyx_v_rvttl = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":820
 *             __NONE = _NONE_
 * 
 *             if future_sync_check:             # <<<<<<<<<<<<<<
 *                 # Quick sync call with lazy_kwargs
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 */
    goto __pyx_L11;
  }

  /* "chorde/decorators.py":824
 *                 rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 *             else:
 *                 rv = __NONE             # <<<<<<<<<<<<<<
 *                 rvttl = -1
 * 
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v___NONE);
    __pyx_v_rv = __pyx_v___NONE;

    /* "chorde/decorators.py":825
 *             else:
 *                 rv = __NONE
 *                 rvttl = -1             # <<<<<<<<<<<<<<
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl):
 */
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_v_rvttl = __pyx_int_neg_1;
  }
  __pyx_L11:;

  /* "chorde/decorators.py":827
 *                 rvttl = -1
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl):             # <<<<<<<<<<<<<<
 *                 # The hard way
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 */
  __pyx_t_12 = (__pyx_v_rv == __pyx_v___NONE);
  __pyx_t_13 = (__pyx_t_12 != 0);
  if (!__pyx_t_13) {
  } else {
    __pyx_t_10 = __pyx_t_13;
    goto __pyx_L15_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 827, __pyx_L1_error) }
  __pyx_t_8 = PyObject_RichCompare(__pyx_v_rvttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 827, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_10 = __pyx_t_13;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_10) {

    /* "chorde/decorators.py":829
 *             if (rv is __NONE or rvttl < eff_async_ttl):
 *                 # The hard way
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):             # <<<<<<<<<<<<<<
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):
 */
    __pyx_t_13 = (__pyx_v_rv == __pyx_v___NONE);
    __pyx_t_12 = (__pyx_t_13 != 0);
    if (__pyx_t_12) {
    } else {
      __pyx_t_10 = __pyx_t_12;
      goto __pyx_L18_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_future_sync_check)) { __Pyx_RaiseClosureNameError("future_sync_check"); __PYX_ERR(0, 829, __pyx_L1_error) }
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_future_sync_check); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 829, __pyx_L1_error)
    __pyx_t_13 = ((!__pyx_t_12) != 0);
    if (!__pyx_t_13) {
    } else {
      __pyx_t_10 = __pyx_t_13;
      goto __pyx_L18_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_lazy_recheck)) { __Pyx_RaiseClosureNameError("async_lazy_recheck"); __PYX_ERR(0, 829, __pyx_L1_error) }
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_lazy_recheck); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 829, __pyx_L1_error)
    __pyx_t_10 = __pyx_t_13;
    __pyx_L18_bool_binop_done:;
    if (__pyx_t_10) {

      /* "chorde/decorators.py":831
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         if value[1] >= 0:
 *                             stats.hits += 1
 */
      __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_1on_value, 0, __pyx_n_s_cached_locals_decor_locals_futur_7, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_on_value = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "chorde/decorators.py":839
 *                             stats.misses += 1
 *                             return frv.miss()
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         # Ok, real miss, report it
 *                         stats.misses += 1
 */
      __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_3on_miss, 0, __pyx_n_s_cached_locals_decor_locals_futur_8, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 839, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_on_miss = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "chorde/decorators.py":843
 *                         stats.misses += 1
 *                         return frv.miss()
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)
 */
      __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_20future_peek_cached_f_5on_exc, 0, __pyx_n_s_cached_locals_decor_locals_futur_9, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_on_exc = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "chorde/decorators.py":846
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\             # <<<<<<<<<<<<<<
 *                         .on_any(on_value, on_miss, on_exc)
 *                 else:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_clientf, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 846, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_callkey);
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 846, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 846, __pyx_L1_error) }
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ttl_skip, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl) < 0) __PYX_ERR(0, 846, __pyx_L1_error)
      __pyx_t_6 = __pyx_t_7;
      __pyx_t_7 = 0;
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("eget_async_lazy_recheck_kwargs"); __PYX_ERR(0, 846, __pyx_L1_error) }
      if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 846, __pyx_L1_error)
      }
      if (__Pyx_MergeKeywords(__pyx_t_6, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs) < 0) __PYX_ERR(0, 846, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 846, __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;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "chorde/decorators.py":847
 *                         return frv.exc(exc_info)
 *                     clientf.getTtl(callkey, ttl_skip = eff_async_ttl, **eget_async_lazy_recheck_kwargs)\
 *                         .on_any(on_value, on_miss, on_exc)             # <<<<<<<<<<<<<<
 *                 else:
 *                     # It was a stale hit or permanent miss
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_on_any); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 847, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_14 = 0;
      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_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_on_value, __pyx_v_on_miss, __pyx_v_on_exc};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_on_value, __pyx_v_on_miss, __pyx_v_on_exc};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 847, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_INCREF(__pyx_v_on_value);
        __Pyx_GIVEREF(__pyx_v_on_value);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_14, __pyx_v_on_value);
        __Pyx_INCREF(__pyx_v_on_miss);
        __Pyx_GIVEREF(__pyx_v_on_miss);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_14, __pyx_v_on_miss);
        __Pyx_INCREF(__pyx_v_on_exc);
        __Pyx_GIVEREF(__pyx_v_on_exc);
        PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_14, __pyx_v_on_exc);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __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;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "chorde/decorators.py":829
 *             if (rv is __NONE or rvttl < eff_async_ttl):
 *                 # The hard way
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):             # <<<<<<<<<<<<<<
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):
 */
      goto __pyx_L17;
    }

    /* "chorde/decorators.py":850
 *                 else:
 *                     # It was a stale hit or permanent miss
 *                     if rv is __NONE or rvttl < 0:             # <<<<<<<<<<<<<<
 *                         stats.misses += 1
 *                         frv._miss_nothreads()
 */
    /*else*/ {
      __pyx_t_13 = (__pyx_v_rv == __pyx_v___NONE);
      __pyx_t_12 = (__pyx_t_13 != 0);
      if (!__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L22_bool_binop_done;
      }
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_rvttl, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 850, __pyx_L1_error)
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = __pyx_t_12;
      __pyx_L22_bool_binop_done:;
      if (__pyx_t_10) {

        /* "chorde/decorators.py":851
 *                     # It was a stale hit or permanent miss
 *                     if rv is __NONE or rvttl < 0:
 *                         stats.misses += 1             # <<<<<<<<<<<<<<
 *                         frv._miss_nothreads()
 *                     else:
 */
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 851, __pyx_L1_error) }
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 851, __pyx_L1_error) }
        __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses + 1);

        /* "chorde/decorators.py":852
 *                     if rv is __NONE or rvttl < 0:
 *                         stats.misses += 1
 *                         frv._miss_nothreads()             # <<<<<<<<<<<<<<
 *                     else:
 *                         stats.hits += 1
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_miss_nothreads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 852, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __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_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, 852, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "chorde/decorators.py":850
 *                 else:
 *                     # It was a stale hit or permanent miss
 *                     if rv is __NONE or rvttl < 0:             # <<<<<<<<<<<<<<
 *                         stats.misses += 1
 *                         frv._miss_nothreads()
 */
        goto __pyx_L21;
      }

      /* "chorde/decorators.py":854
 *                         frv._miss_nothreads()
 *                     else:
 *                         stats.hits += 1             # <<<<<<<<<<<<<<
 *                         frv._set_nothreads(rv)
 *             else:
 */
      /*else*/ {
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 854, __pyx_L1_error) }
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 854, __pyx_L1_error) }
        __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits + 1);

        /* "chorde/decorators.py":855
 *                     else:
 *                         stats.hits += 1
 *                         frv._set_nothreads(rv)             # <<<<<<<<<<<<<<
 *             else:
 *                 stats.hits += 1
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_set_nothreads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __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_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_rv) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_rv);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 855, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_L21:;
    }
    __pyx_L17:;

    /* "chorde/decorators.py":827
 *                 rvttl = -1
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl):             # <<<<<<<<<<<<<<
 *                 # The hard way
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 */
    goto __pyx_L14;
  }

  /* "chorde/decorators.py":857
 *                         frv._set_nothreads(rv)
 *             else:
 *                 stats.hits += 1             # <<<<<<<<<<<<<<
 *                 frv._set_nothreads(rv)
 *             return frv
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 857, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 857, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits + 1);

    /* "chorde/decorators.py":858
 *             else:
 *                 stats.hits += 1
 *                 frv._set_nothreads(rv)             # <<<<<<<<<<<<<<
 *             return frv
 *         if decorate is not None:
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frv, __pyx_n_s_set_nothreads); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_rv) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_rv);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_L14:;

  /* "chorde/decorators.py":859
 *                 stats.hits += 1
 *                 frv._set_nothreads(rv)
 *             return frv             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             future_peek_cached_f = decorate(future_peek_cached_f)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_frv);
  __pyx_r = __pyx_cur_scope->__pyx_v_frv;
  goto __pyx_L0;

  /* "chorde/decorators.py":806
 * 
 *         @wraps(of)
 *         def future_peek_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("chorde.decorators.cached.decor.future_peek_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XDECREF(__pyx_v_client);
  __Pyx_XDECREF(__pyx_v_clientf);
  __Pyx_XDECREF(__pyx_v___NONE);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XDECREF(__pyx_v_rvttl);
  __Pyx_XDECREF(__pyx_v_on_value);
  __Pyx_XDECREF(__pyx_v_on_miss);
  __Pyx_XDECREF(__pyx_v_on_exc);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":864
 * 
 *         @wraps(of)
 *         def future_get_ttl_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_25future_get_ttl_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_25future_get_ttl_f = {"future_get_ttl_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_25future_get_ttl_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_25future_get_ttl_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("future_get_ttl_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "future_get_ttl_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_24future_get_ttl_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_24future_get_ttl_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("future_get_ttl_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":865
 *         @wraps(of)
 *         def future_get_ttl_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":866
 *         def future_get_ttl_f(*p, **kw):
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 866, __pyx_L3_error) }
      __pyx_t_4 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 866, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 866, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_callkey = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "chorde/decorators.py":865
 *         @wraps(of)
 *         def future_get_ttl_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":867
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.future_get_ttl_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 867, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "chorde/decorators.py":869
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 raise CacheMissError
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_logging); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 869, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 869, __pyx_L5_except_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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 869, __pyx_L5_except_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_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 869, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 869, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 869, __pyx_L5_except_error)
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__10, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 869, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "chorde/decorators.py":870
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 raise CacheMissError
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 870, __pyx_L5_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 870, __pyx_L5_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":871
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 raise CacheMissError             # <<<<<<<<<<<<<<
 * 
 *             # To-Do: intercept hits/misses and update stats?
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CacheMissError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 871, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 871, __pyx_L5_except_error)
    }
    __pyx_L5_except_error:;

    /* "chorde/decorators.py":865
 *         @wraps(of)
 *         def future_get_ttl_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L8_try_end:;
  }

  /* "chorde/decorators.py":875
 *             # To-Do: intercept hits/misses and update stats?
 *             #   (involves considerable overhead...)
 *             return fclient.getTtl(callkey, **get_kwargs)             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             future_get_ttl_f = decorate(future_get_ttl_f)
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_fclient)) { __Pyx_RaiseClosureNameError("fclient"); __PYX_ERR(0, 875, __pyx_L1_error) }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fclient, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callkey);
  if (unlikely(!__pyx_cur_scope->__pyx_v_get_kwargs)) { __Pyx_RaiseClosureNameError("get_kwargs"); __PYX_ERR(0, 875, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_get_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 875, __pyx_L1_error)
  }
  __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_v_get_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __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;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "chorde/decorators.py":864
 * 
 *         @wraps(of)
 *         def future_get_ttl_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("chorde.decorators.cached.decor.future_get_ttl_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":880
 * 
 *         @wraps(of)
 *         def invalidate_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_27invalidate_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_27invalidate_f = {"invalidate_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_27invalidate_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_27invalidate_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("invalidate_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "invalidate_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_26invalidate_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_26invalidate_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("invalidate_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":881
 *         @wraps(of)
 *         def invalidate_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 881, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":882
 *         def invalidate_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 882, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":881
 *         @wraps(of)
 *         def invalidate_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":883
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":884
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 884, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 884, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":883
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":885
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.invalidate_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 885, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":886
 *                 callkey = key(*p, **kw)
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 886, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 886, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 886, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 886, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 886, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 886, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 886, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":887
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 *             nclient.delete(callkey)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 887, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 887, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":888
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 *             nclient.delete(callkey)
 *         if decorate is not None:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":883
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "chorde/decorators.py":889
 *                 stats.errors += 1
 *                 return
 *             nclient.delete(callkey)             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             invalidate_f = decorate(invalidate_f)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 889, __pyx_L1_error) }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_delete); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callkey) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callkey);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "chorde/decorators.py":880
 * 
 *         @wraps(of)
 *         def invalidate_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.invalidate_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":894
 * 
 *         @wraps(of)
 *         def future_invalidate_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_29future_invalidate_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_29future_invalidate_f = {"future_invalidate_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_29future_invalidate_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_29future_invalidate_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("future_invalidate_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "future_invalidate_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_28future_invalidate_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_28future_invalidate_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("future_invalidate_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":895
 *         @wraps(of)
 *         def future_invalidate_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":896
 *         def future_invalidate_f(*p, **kw):
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 896, __pyx_L3_error) }
      __pyx_t_4 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_callkey = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "chorde/decorators.py":895
 *         @wraps(of)
 *         def future_invalidate_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":897
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.future_invalidate_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 897, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "chorde/decorators.py":898
 *                 callkey = key(*p, **kw)
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_logging); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 898, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L5_except_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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L5_except_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_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 898, __pyx_L5_except_error)
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__10, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 898, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "chorde/decorators.py":899
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 *             return fclient.delete(callkey)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 899, __pyx_L5_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 899, __pyx_L5_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":900
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 *             return fclient.delete(callkey)
 *         if decorate is not None:
 */
      __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_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "chorde/decorators.py":895
 *         @wraps(of)
 *         def future_invalidate_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "chorde/decorators.py":901
 *                 stats.errors += 1
 *                 return
 *             return fclient.delete(callkey)             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             future_invalidate_f = decorate(future_invalidate_f)
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_fclient)) { __Pyx_RaiseClosureNameError("fclient"); __PYX_ERR(0, 901, __pyx_L1_error) }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fclient, __pyx_n_s_delete); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 901, __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_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_callkey) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_callkey);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "chorde/decorators.py":894
 * 
 *         @wraps(of)
 *         def future_invalidate_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("chorde.decorators.cached.decor.future_invalidate_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":906
 * 
 *         @wraps(of)
 *         def expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_31expire_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_31expire_f = {"expire_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_31expire_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_31expire_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("expire_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "expire_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_30expire_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_30expire_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("expire_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":907
 *         @wraps(of)
 *         def expire_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 907, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":908
 *         def expire_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 908, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":907
 *         @wraps(of)
 *         def expire_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":909
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":910
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 910, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 910, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":909
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":911
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.expire_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 911, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":912
 *                 callkey = key(*p, **kw)
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 912, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 912, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 912, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 912, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 912, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 912, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 912, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":913
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 *             nclient.expire(callkey)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 913, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 913, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":914
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 *             nclient.expire(callkey)
 *         if decorate is not None:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":909
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "chorde/decorators.py":915
 *                 stats.errors += 1
 *                 return
 *             nclient.expire(callkey)             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             expire_f = decorate(expire_f)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 915, __pyx_L1_error) }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_expire); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callkey) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callkey);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "chorde/decorators.py":906
 * 
 *         @wraps(of)
 *         def expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.expire_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":920
 * 
 *         @wraps(of)
 *         def async_expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_33async_expire_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_33async_expire_f = {"async_expire_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_33async_expire_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_33async_expire_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("async_expire_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "async_expire_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_32async_expire_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_32async_expire_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("async_expire_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":921
 *         @wraps(of)
 *         def async_expire_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 921, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":922
 *         def async_expire_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 922, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":921
 *         @wraps(of)
 *         def async_expire_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":923
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":924
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 924, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 924, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":923
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":925
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.async_expire_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 925, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":926
 *                 callkey = key(*p, **kw)
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 926, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 926, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 926, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 926, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 926, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 926, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 926, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":927
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 *             aclient.expire(callkey)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 927, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 927, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":928
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 *             aclient.expire(callkey)
 *         if decorate is not None:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":923
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "chorde/decorators.py":929
 *                 stats.errors += 1
 *                 return
 *             aclient.expire(callkey)             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             async_expire_f = decorate(async_expire_f)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 929, __pyx_L1_error) }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_aclient, __pyx_n_s_expire); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callkey) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callkey);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "chorde/decorators.py":920
 * 
 *         @wraps(of)
 *         def async_expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.async_expire_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":934
 * 
 *         @wraps(of)
 *         def future_expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_35future_expire_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_35future_expire_f = {"future_expire_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_35future_expire_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_35future_expire_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("future_expire_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "future_expire_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_34future_expire_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_34future_expire_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("future_expire_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":935
 *         @wraps(of)
 *         def future_expire_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":936
 *         def future_expire_f(*p, **kw):
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 936, __pyx_L3_error) }
      __pyx_t_4 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 936, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_callkey = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "chorde/decorators.py":935
 *         @wraps(of)
 *         def future_expire_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":937
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.future_expire_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 937, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "chorde/decorators.py":938
 *                 callkey = key(*p, **kw)
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_logging); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 938, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 938, __pyx_L5_except_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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L5_except_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_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 938, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 938, __pyx_L5_except_error)
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__10, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 938, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "chorde/decorators.py":939
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 *             return fclient.expire(callkey)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 939, __pyx_L5_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 939, __pyx_L5_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":940
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 *             return fclient.expire(callkey)
 *         if decorate is not None:
 */
      __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_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "chorde/decorators.py":935
 *         @wraps(of)
 *         def future_expire_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "chorde/decorators.py":941
 *                 stats.errors += 1
 *                 return
 *             return fclient.expire(callkey)             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             future_expire_f = decorate(future_expire_f)
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_fclient)) { __Pyx_RaiseClosureNameError("fclient"); __PYX_ERR(0, 941, __pyx_L1_error) }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fclient, __pyx_n_s_expire); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 941, __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_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_callkey) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_callkey);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "chorde/decorators.py":934
 * 
 *         @wraps(of)
 *         def future_expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("chorde.decorators.cached.decor.future_expire_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":946
 * 
 *         @wraps(of)
 *         def put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_37put_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_37put_f = {"put_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_37put_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_37put_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("put_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "put_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_36put_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_36put_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_put_kwargs = NULL;
  PyObject *__pyx_v_callkey = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("put_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":947
 *         @wraps(of)
 *         def put_f(*p, **kw):
 *             value = kw.pop('_cache_put')             # <<<<<<<<<<<<<<
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             if _initialize is not None:
 */
  __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_kw, __pyx_n_s_cache_put, ((PyObject *)NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":948
 *         def put_f(*p, **kw):
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_kw, __pyx_n_s_cache_put_kwargs, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_put_kwargs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":949
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 949, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "chorde/decorators.py":950
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 950, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "chorde/decorators.py":949
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":951
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":952
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 952, __pyx_L4_error) }
      __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":951
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":953
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.put_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 953, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":954
 *                 callkey = key(*p, **kw)
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 954, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 954, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 954, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 954, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 954, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 954, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 954, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":955
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 *             nclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 955, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 955, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":956
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 *             nclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":951
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "chorde/decorators.py":957
 *                 stats.errors += 1
 *                 return
 *             nclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             put_f = decorate(put_f)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 957, __pyx_L1_error) }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_put); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 957, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callkey);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_put_kwargs); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 957, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __Pyx_INCREF(__pyx_v_put_kwargs);
    __pyx_t_10 = __pyx_v_put_kwargs;
    goto __pyx_L12_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_EMPTY_KWARGS)) { __Pyx_RaiseClosureNameError("EMPTY_KWARGS"); __PYX_ERR(0, 957, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_EMPTY_KWARGS);
  __pyx_t_10 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_EMPTY_KWARGS;
  __pyx_L12_bool_binop_done:;
  if (unlikely(__pyx_t_10 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 957, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_t_10))) {
    __pyx_t_1 = PyDict_Copy(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else {
    __pyx_t_1 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "chorde/decorators.py":946
 * 
 *         @wraps(of)
 *         def put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.put_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_put_kwargs);
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":962
 * 
 *         @wraps(of)
 *         def async_put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_39async_put_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_39async_put_f = {"async_put_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_39async_put_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_39async_put_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("async_put_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "async_put_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_38async_put_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_38async_put_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_put_kwargs = NULL;
  PyObject *__pyx_v_callkey = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("async_put_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":963
 *         @wraps(of)
 *         def async_put_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             value = kw.pop('_cache_put')
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 963, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":964
 *         def async_put_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 964, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":963
 *         @wraps(of)
 *         def async_put_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             value = kw.pop('_cache_put')
 */
  }

  /* "chorde/decorators.py":965
 *             if _initialize is not None:
 *                 _initialize()
 *             value = kw.pop('_cache_put')             # <<<<<<<<<<<<<<
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             try:
 */
  __pyx_t_3 = __Pyx_PyDict_Pop(__pyx_v_kw, __pyx_n_s_cache_put, ((PyObject *)NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_value = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "chorde/decorators.py":966
 *                 _initialize()
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_t_3 = __Pyx_PyDict_Pop(__pyx_v_kw, __pyx_n_s_cache_put_kwargs, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_put_kwargs = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "chorde/decorators.py":967
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":968
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 968, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 968, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 968, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":967
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":969
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.async_put_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 969, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":970
 *                 callkey = key(*p, **kw)
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 970, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 970, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 970, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 970, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 970, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 970, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 970, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":971
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 *             aclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 971, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 971, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":972
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 *             aclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":967
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "chorde/decorators.py":973
 *                 stats.errors += 1
 *                 return
 *             aclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             async_put_f = decorate(async_put_f)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 973, __pyx_L1_error) }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_aclient, __pyx_n_s_put); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 973, __pyx_L1_error) }
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callkey);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_put_kwargs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_put_kwargs);
    __pyx_t_10 = __pyx_v_put_kwargs;
    goto __pyx_L12_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_EMPTY_KWARGS)) { __Pyx_RaiseClosureNameError("EMPTY_KWARGS"); __PYX_ERR(0, 973, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_EMPTY_KWARGS);
  __pyx_t_10 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_EMPTY_KWARGS;
  __pyx_L12_bool_binop_done:;
  if (unlikely(__pyx_t_10 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 973, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_t_10))) {
    __pyx_t_3 = PyDict_Copy(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else {
    __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "chorde/decorators.py":962
 * 
 *         @wraps(of)
 *         def async_put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.async_put_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_put_kwargs);
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":978
 * 
 *         @wraps(of)
 *         def future_put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_41future_put_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_41future_put_f = {"future_put_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_41future_put_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_41future_put_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("future_put_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "future_put_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_40future_put_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_40future_put_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_put_kwargs = NULL;
  PyObject *__pyx_v_callkey = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("future_put_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":979
 *         @wraps(of)
 *         def future_put_f(*p, **kw):
 *             value = kw.pop('_cache_put')             # <<<<<<<<<<<<<<
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             try:
 */
  __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_kw, __pyx_n_s_cache_put, ((PyObject *)NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":980
 *         def future_put_f(*p, **kw):
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_kw, __pyx_n_s_cache_put_kwargs, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_put_kwargs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "chorde/decorators.py":981
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "chorde/decorators.py":982
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 982, __pyx_L3_error) }
      __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 982, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_callkey = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "chorde/decorators.py":981
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":983
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.future_put_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_6) < 0) __PYX_ERR(0, 983, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_6);

      /* "chorde/decorators.py":984
 *                 callkey = key(*p, **kw)
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_logging); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 984, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 984, __pyx_L5_except_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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L5_except_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_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 984, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 984, __pyx_L5_except_error)
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__10, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 984, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "chorde/decorators.py":985
 *             except:
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 *             return fclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 985, __pyx_L5_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 985, __pyx_L5_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":986
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 *             return fclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "chorde/decorators.py":981
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "chorde/decorators.py":987
 *                 stats.errors += 1
 *                 return
 *             return fclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             future_put_f = decorate(future_put_f)
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_fclient)) { __Pyx_RaiseClosureNameError("fclient"); __PYX_ERR(0, 987, __pyx_L1_error) }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fclient, __pyx_n_s_put); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 987, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_callkey);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_put_kwargs); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 987, __pyx_L1_error)
  if (!__pyx_t_10) {
  } else {
    __Pyx_INCREF(__pyx_v_put_kwargs);
    __pyx_t_8 = __pyx_v_put_kwargs;
    goto __pyx_L11_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_EMPTY_KWARGS)) { __Pyx_RaiseClosureNameError("EMPTY_KWARGS"); __PYX_ERR(0, 987, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_EMPTY_KWARGS);
  __pyx_t_8 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_EMPTY_KWARGS;
  __pyx_L11_bool_binop_done:;
  if (unlikely(__pyx_t_8 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 987, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_t_8))) {
    __pyx_t_1 = PyDict_Copy(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else {
    __pyx_t_1 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 987, __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;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "chorde/decorators.py":978
 * 
 *         @wraps(of)
 *         def future_put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_put_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_put_kwargs);
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":992
 * 
 *         @wraps(of)
 *         def async_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_43async_lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_43async_lazy_cached_f = {"async_lazy_cached_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_43async_lazy_cached_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_43async_lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("async_lazy_cached_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "async_lazy_cached_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_42async_lazy_cached_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

/* "chorde/decorators.py":1014
 *                     # send a Defer that touches the client with recheck kwargs
 *                     # before doing the refresh. Needs not be coherent.
 *                     def touch_key(*p, **kw):             # <<<<<<<<<<<<<<
 *                         rv, rvttl = nclient.getTtl(callkey, __NONE, ttl_skip = eff_async_ttl,
 *                             **eget_async_lazy_recheck_kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_19async_lazy_cached_f_1touch_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_19async_lazy_cached_f_1touch_key = {"touch_key", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_19async_lazy_cached_f_1touch_key, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_19async_lazy_cached_f_1touch_key(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("touch_key (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "touch_key", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_19async_lazy_cached_f_touch_key(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_19async_lazy_cached_f_touch_key(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *__pyx_outer_scope;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_v_rvttl = 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)(PyObject *);
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("touch_key", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1015
 *                     # before doing the refresh. Needs not be coherent.
 *                     def touch_key(*p, **kw):
 *                         rv, rvttl = nclient.getTtl(callkey, __NONE, ttl_skip = eff_async_ttl,             # <<<<<<<<<<<<<<
 *                             **eget_async_lazy_recheck_kwargs)
 *                         if (rv is __NONE or rvttl < eff_async_ttl) and not nclient.contains(callkey, eff_async_ttl,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 1015, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 1015, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v___NONE)) { __Pyx_RaiseClosureNameError("__NONE"); __PYX_ERR(0, 1015, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_callkey);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v___NONE);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v___NONE);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v___NONE);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 1015, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ttl_skip, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl) < 0) __PYX_ERR(0, 1015, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "chorde/decorators.py":1016
 *                     def touch_key(*p, **kw):
 *                         rv, rvttl = nclient.getTtl(callkey, __NONE, ttl_skip = eff_async_ttl,
 *                             **eget_async_lazy_recheck_kwargs)             # <<<<<<<<<<<<<<
 *                         if (rv is __NONE or rvttl < eff_async_ttl) and not nclient.contains(callkey, eff_async_ttl,
 *                                 **easync_lazy_recheck_kwargs):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("eget_async_lazy_recheck_kwargs"); __PYX_ERR(0, 1016, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 1016, __pyx_L1_error)
  }
  if (__Pyx_MergeKeywords(__pyx_t_3, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs) < 0) __PYX_ERR(0, 1016, __pyx_L1_error)

  /* "chorde/decorators.py":1015
 *                     # before doing the refresh. Needs not be coherent.
 *                     def touch_key(*p, **kw):
 *                         rv, rvttl = nclient.getTtl(callkey, __NONE, ttl_skip = eff_async_ttl,             # <<<<<<<<<<<<<<
 *                             **eget_async_lazy_recheck_kwargs)
 *                         if (rv is __NONE or rvttl < eff_async_ttl) and not nclient.contains(callkey, eff_async_ttl,
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1015, __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;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1015, __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_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_1), 2) < 0) __PYX_ERR(0, 1015, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1015, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_rv = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_rvttl = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "chorde/decorators.py":1017
 *                         rv, rvttl = nclient.getTtl(callkey, __NONE, ttl_skip = eff_async_ttl,
 *                             **eget_async_lazy_recheck_kwargs)
 *                         if (rv is __NONE or rvttl < eff_async_ttl) and not nclient.contains(callkey, eff_async_ttl,             # <<<<<<<<<<<<<<
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v___NONE)) { __Pyx_RaiseClosureNameError("__NONE"); __PYX_ERR(0, 1017, __pyx_L1_error) }
  __pyx_t_7 = (__pyx_v_rv == __pyx_cur_scope->__pyx_v___NONE);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (!__pyx_t_8) {
  } else {
    goto __pyx_L7_next_and;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 1017, __pyx_L1_error) }
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_rvttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_L7_next_and:;
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 1017, __pyx_L1_error) }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_contains); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 1017, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 1017, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_callkey);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);

  /* "chorde/decorators.py":1018
 *                             **eget_async_lazy_recheck_kwargs)
 *                         if (rv is __NONE or rvttl < eff_async_ttl) and not nclient.contains(callkey, eff_async_ttl,
 *                                 **easync_lazy_recheck_kwargs):             # <<<<<<<<<<<<<<
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("easync_lazy_recheck_kwargs"); __PYX_ERR(0, 1018, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 1018, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs))) {
    __pyx_t_3 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_easync_lazy_recheck_kwargs, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }

  /* "chorde/decorators.py":1017
 *                         rv, rvttl = nclient.getTtl(callkey, __NONE, ttl_skip = eff_async_ttl,
 *                             **eget_async_lazy_recheck_kwargs)
 *                         if (rv is __NONE or rvttl < eff_async_ttl) and not nclient.contains(callkey, eff_async_ttl,             # <<<<<<<<<<<<<<
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = ((!__pyx_t_8) != 0);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_6) {

    /* "chorde/decorators.py":1019
 *                         if (rv is __NONE or rvttl < eff_async_ttl) and not nclient.contains(callkey, eff_async_ttl,
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):             # <<<<<<<<<<<<<<
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 1019, __pyx_L1_error) }
    __pyx_t_7 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time != Py_None);
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {
    } else {
      __pyx_t_6 = __pyx_t_8;
      goto __pyx_L10_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v___NONE)) { __Pyx_RaiseClosureNameError("__NONE"); __PYX_ERR(0, 1019, __pyx_L1_error) }
    __pyx_t_8 = (__pyx_v_rv != __pyx_cur_scope->__pyx_v___NONE);
    __pyx_t_7 = (__pyx_t_8 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L10_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_lazy_kwargs)) { __Pyx_RaiseClosureNameError("lazy_kwargs"); __PYX_ERR(0, 1019, __pyx_L1_error) }
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_lazy_kwargs); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1019, __pyx_L1_error)
    __pyx_t_6 = __pyx_t_7;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_6) {

      /* "chorde/decorators.py":1020
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)             # <<<<<<<<<<<<<<
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                         return base.NONE
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 1020, __pyx_L1_error) }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_nclient, __pyx_n_s_renew); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1020, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 1020, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 1020, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 1020, __pyx_L1_error) }
      __pyx_t_2 = PyNumber_Add(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_9 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_callkey, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_callkey, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1020, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "chorde/decorators.py":1019
 *                         if (rv is __NONE or rvttl < eff_async_ttl) and not nclient.contains(callkey, eff_async_ttl,
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):             # <<<<<<<<<<<<<<
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
    }

    /* "chorde/decorators.py":1021
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *                         return base.NONE
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 1021, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 1021, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 1021, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_callkey)) { __Pyx_RaiseClosureNameError("callkey"); __PYX_ERR(0, 1021, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 1021, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_client);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_cur_scope->__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "chorde/decorators.py":1017
 *                         rv, rvttl = nclient.getTtl(callkey, __NONE, ttl_skip = eff_async_ttl,
 *                             **eget_async_lazy_recheck_kwargs)
 *                         if (rv is __NONE or rvttl < eff_async_ttl) and not nclient.contains(callkey, eff_async_ttl,             # <<<<<<<<<<<<<<
 *                                 **easync_lazy_recheck_kwargs):
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  }

  /* "chorde/decorators.py":1022
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                         return base.NONE             # <<<<<<<<<<<<<<
 * 
 *                     # This will make contains return True for this key, until touch_key returns
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_base); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "chorde/decorators.py":1014
 *                     # send a Defer that touches the client with recheck kwargs
 *                     # before doing the refresh. Needs not be coherent.
 *                     def touch_key(*p, **kw):             # <<<<<<<<<<<<<<
 *                         rv, rvttl = nclient.getTtl(callkey, __NONE, ttl_skip = eff_async_ttl,
 *                             **eget_async_lazy_recheck_kwargs)
 */

  /* function exit code */
  __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_10);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.async_lazy_cached_f.touch_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XDECREF(__pyx_v_rvttl);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":992
 * 
 *         @wraps(of)
 *         def async_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_42async_lazy_cached_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *__pyx_cur_scope;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_v_rvttl = NULL;
  PyObject *__pyx_v_touch_key = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("async_lazy_cached_f", 0);
  __pyx_cur_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *)__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f(__pyx_ptype_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 992, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);

  /* "chorde/decorators.py":993
 *         @wraps(of)
 *         def async_lazy_cached_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 993, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":994
 *         def async_lazy_cached_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 994, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v__initialize; __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, 994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":993
 *         @wraps(of)
 *         def async_lazy_cached_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":995
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":996
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 996, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 996, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 996, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_cur_scope->__pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":995
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":997
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.async_lazy_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 997, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":999
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 raise CacheMissError
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 999, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 999, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 999, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 999, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 999, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 999, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 999, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":1000
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 raise CacheMissError
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1000, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1000, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":1001
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 raise CacheMissError             # <<<<<<<<<<<<<<
 * 
 *             __NONE = _NONE_
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_CacheMissError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1001, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(0, 1001, __pyx_L6_except_error)
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":995
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L9_try_end:;
  }

  /* "chorde/decorators.py":1003
 *                 raise CacheMissError
 * 
 *             __NONE = _NONE_             # <<<<<<<<<<<<<<
 *             client = aclient
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_)) { __Pyx_RaiseClosureNameError("_NONE_"); __PYX_ERR(0, 1003, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_);
  __pyx_cur_scope->__pyx_v___NONE = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__NONE_;

  /* "chorde/decorators.py":1004
 * 
 *             __NONE = _NONE_
 *             client = aclient             # <<<<<<<<<<<<<<
 * 
 *             rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 1004, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient);
  __pyx_cur_scope->__pyx_v_client = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_aclient;

  /* "chorde/decorators.py":1006
 *             client = aclient
 * 
 *             rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)             # <<<<<<<<<<<<<<
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl, **elazy_kwargs):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_client, __pyx_n_s_getTtl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_callkey);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v___NONE);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v___NONE);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v___NONE);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs)) { __Pyx_RaiseClosureNameError("elazy_kwargs"); __PYX_ERR(0, 1006, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 1006, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs))) {
    __pyx_t_4 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_4 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
    PyObject* sequence = __pyx_t_10;
    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, 1006, __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_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_4 = __pyx_t_12(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1006, __pyx_L1_error)
    __pyx_t_12 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L13_unpacking_done;
    __pyx_L12_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_12 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1006, __pyx_L1_error)
    __pyx_L13_unpacking_done:;
  }
  __pyx_v_rv = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_rvttl = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "chorde/decorators.py":1008
 *             rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl, **elazy_kwargs):             # <<<<<<<<<<<<<<
 *                 if async_lazy_recheck:
 *                     stats.misses += 1
 */
  __pyx_t_1 = (__pyx_v_rv == __pyx_cur_scope->__pyx_v___NONE);
  __pyx_t_13 = (__pyx_t_1 != 0);
  if (!__pyx_t_13) {
  } else {
    goto __pyx_L16_next_and;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 1008, __pyx_L1_error) }
  __pyx_t_10 = PyObject_RichCompare(__pyx_v_rvttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_13) {
  } else {
    __pyx_t_2 = __pyx_t_13;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_L16_next_and:;
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_client, __pyx_n_s_contains); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 1008, __pyx_L1_error) }
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_callkey);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs)) { __Pyx_RaiseClosureNameError("elazy_kwargs"); __PYX_ERR(0, 1008, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 1008, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs))) {
    __pyx_t_4 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    __pyx_t_4 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((!__pyx_t_13) != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1009
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl, **elazy_kwargs):
 *                 if async_lazy_recheck:             # <<<<<<<<<<<<<<
 *                     stats.misses += 1
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_lazy_recheck)) { __Pyx_RaiseClosureNameError("async_lazy_recheck"); __PYX_ERR(0, 1009, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_lazy_recheck); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1009, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "chorde/decorators.py":1010
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl, **elazy_kwargs):
 *                 if async_lazy_recheck:
 *                     stats.misses += 1             # <<<<<<<<<<<<<<
 * 
 *                     # send a Defer that touches the client with recheck kwargs
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1010, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1010, __pyx_L1_error) }
      __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses + 1);

      /* "chorde/decorators.py":1014
 *                     # send a Defer that touches the client with recheck kwargs
 *                     # before doing the refresh. Needs not be coherent.
 *                     def touch_key(*p, **kw):             # <<<<<<<<<<<<<<
 *                         rv, rvttl = nclient.getTtl(callkey, __NONE, ttl_skip = eff_async_ttl,
 *                             **eget_async_lazy_recheck_kwargs)
 */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_19async_lazy_cached_f_1touch_key, 0, __pyx_n_s_cached_locals_decor_locals_async, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_touch_key = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "chorde/decorators.py":1027
 *                     # This is actually good, since it'll result in immediate misses from now on,
 *                     # avoiding trying to queue up touch after touch
 *                     _lazy_recheck_put_deferred(client, touch_key, callkey, ttl, *p, **kw)             # <<<<<<<<<<<<<<
 *                 else:
 *                     _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__lazy_recheck_put_deferred)) { __Pyx_RaiseClosureNameError("_lazy_recheck_put_deferred"); __PYX_ERR(0, 1027, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_ttl)) { __Pyx_RaiseClosureNameError("ttl"); __PYX_ERR(0, 1027, __pyx_L1_error) }
      __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1027, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_client);
      __Pyx_INCREF(__pyx_v_touch_key);
      __Pyx_GIVEREF(__pyx_v_touch_key);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_touch_key);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_cur_scope->__pyx_v_callkey);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_ttl);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_ttl);
      PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_ttl);
      __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1027, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__lazy_recheck_put_deferred, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "chorde/decorators.py":1009
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl, **elazy_kwargs):
 *                 if async_lazy_recheck:             # <<<<<<<<<<<<<<
 *                     stats.misses += 1
 * 
 */
      goto __pyx_L18;
    }

    /* "chorde/decorators.py":1029
 *                     _lazy_recheck_put_deferred(client, touch_key, callkey, ttl, *p, **kw)
 *                 else:
 *                     _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *             elif rv is not __NONE:
 *                 if rvttl < eff_async_ttl:
 */
    /*else*/ {
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 1029, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 1029, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 1029, __pyx_L1_error) }
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_client);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_af);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_cur_scope->__pyx_v_callkey);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L18:;

    /* "chorde/decorators.py":1008
 *             rv, rvttl = client.getTtl(callkey, __NONE, **elazy_kwargs)
 * 
 *             if (rv is __NONE or rvttl < eff_async_ttl) and not client.contains(callkey, eff_async_ttl, **elazy_kwargs):             # <<<<<<<<<<<<<<
 *                 if async_lazy_recheck:
 *                     stats.misses += 1
 */
    goto __pyx_L14;
  }

  /* "chorde/decorators.py":1030
 *                 else:
 *                     _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *             elif rv is not __NONE:             # <<<<<<<<<<<<<<
 *                 if rvttl < eff_async_ttl:
 *                     if async_expire:
 */
  __pyx_t_2 = (__pyx_v_rv != __pyx_cur_scope->__pyx_v___NONE);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1031
 *                     _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *             elif rv is not __NONE:
 *                 if rvttl < eff_async_ttl:             # <<<<<<<<<<<<<<
 *                     if async_expire:
 *                         async_expire(callkey)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 1031, __pyx_L1_error) }
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_rvttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1031, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "chorde/decorators.py":1032
 *             elif rv is not __NONE:
 *                 if rvttl < eff_async_ttl:
 *                     if async_expire:             # <<<<<<<<<<<<<<
 *                         async_expire(callkey)
 *                     else:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_expire)) { __Pyx_RaiseClosureNameError("async_expire"); __PYX_ERR(0, 1032, __pyx_L1_error) }
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_expire); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1032, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "chorde/decorators.py":1033
 *                 if rvttl < eff_async_ttl:
 *                     if async_expire:
 *                         async_expire(callkey)             # <<<<<<<<<<<<<<
 *                     else:
 *                         # means client.contains(callkey, eff_async_ttl), so promote
 */
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_expire)) { __Pyx_RaiseClosureNameError("async_expire"); __PYX_ERR(0, 1033, __pyx_L1_error) }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_expire);
        __pyx_t_5 = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_async_expire; __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(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_cur_scope->__pyx_v_callkey) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_v_callkey);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1033, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "chorde/decorators.py":1032
 *             elif rv is not __NONE:
 *                 if rvttl < eff_async_ttl:
 *                     if async_expire:             # <<<<<<<<<<<<<<
 *                         async_expire(callkey)
 *                     else:
 */
        goto __pyx_L20;
      }

      /* "chorde/decorators.py":1036
 *                     else:
 *                         # means client.contains(callkey, eff_async_ttl), so promote
 *                         client.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)             # <<<<<<<<<<<<<<
 *                 stats.hits += 1
 *             else:
 */
      /*else*/ {
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_client, __pyx_n_s_promote); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1036, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callkey);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callkey);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_callkey);
        __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1036, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl)) { __Pyx_RaiseClosureNameError("eff_async_ttl"); __PYX_ERR(0, 1036, __pyx_L1_error) }
        if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_ttl_skip, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_async_ttl) < 0) __PYX_ERR(0, 1036, __pyx_L1_error)
        __pyx_t_3 = __pyx_t_10;
        __pyx_t_10 = 0;
        if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_kwargs)) { __Pyx_RaiseClosureNameError("get_kwargs"); __PYX_ERR(0, 1036, __pyx_L1_error) }
        if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_kwargs == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
          __PYX_ERR(0, 1036, __pyx_L1_error)
        }
        if (__Pyx_MergeKeywords(__pyx_t_3, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_kwargs) < 0) __PYX_ERR(0, 1036, __pyx_L1_error)
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1036, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __pyx_L20:;

      /* "chorde/decorators.py":1031
 *                     _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *             elif rv is not __NONE:
 *                 if rvttl < eff_async_ttl:             # <<<<<<<<<<<<<<
 *                     if async_expire:
 *                         async_expire(callkey)
 */
    }

    /* "chorde/decorators.py":1037
 *                         # means client.contains(callkey, eff_async_ttl), so promote
 *                         client.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                 stats.hits += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 stats.misses += 1
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1037, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1037, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->hits + 1);

    /* "chorde/decorators.py":1030
 *                 else:
 *                     _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *             elif rv is not __NONE:             # <<<<<<<<<<<<<<
 *                 if rvttl < eff_async_ttl:
 *                     if async_expire:
 */
    goto __pyx_L14;
  }

  /* "chorde/decorators.py":1039
 *                 stats.hits += 1
 *             else:
 *                 stats.misses += 1             # <<<<<<<<<<<<<<
 * 
 *             if rv is __NONE:
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1039, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1039, __pyx_L1_error) }
    __pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_stats->misses + 1);
  }
  __pyx_L14:;

  /* "chorde/decorators.py":1041
 *                 stats.misses += 1
 * 
 *             if rv is __NONE:             # <<<<<<<<<<<<<<
 *                 raise CacheMissError(callkey)
 *             else:
 */
  __pyx_t_1 = (__pyx_v_rv == __pyx_cur_scope->__pyx_v___NONE);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "chorde/decorators.py":1042
 * 
 *             if rv is __NONE:
 *                 raise CacheMissError(callkey)             # <<<<<<<<<<<<<<
 *             else:
 *                 return rv
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CacheMissError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_10 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_cur_scope->__pyx_v_callkey) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_callkey);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_10, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __PYX_ERR(0, 1042, __pyx_L1_error)

    /* "chorde/decorators.py":1041
 *                 stats.misses += 1
 * 
 *             if rv is __NONE:             # <<<<<<<<<<<<<<
 *                 raise CacheMissError(callkey)
 *             else:
 */
  }

  /* "chorde/decorators.py":1044
 *                 raise CacheMissError(callkey)
 *             else:
 *                 return rv             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             async_lazy_cached_f = decorate(async_lazy_cached_f)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_rv);
    __pyx_r = __pyx_v_rv;
    goto __pyx_L0;
  }

  /* "chorde/decorators.py":992
 * 
 *         @wraps(of)
 *         def async_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.async_lazy_cached_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XDECREF(__pyx_v_rvttl);
  __Pyx_XDECREF(__pyx_v_touch_key);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1049
 * 
 *         @wraps(of)
 *         def refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_45refresh_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_45refresh_f = {"refresh_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_45refresh_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_45refresh_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("refresh_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "refresh_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_44refresh_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_44refresh_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = NULL;
  PyObject *__pyx_v_rv = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("refresh_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1050
 *         @wraps(of)
 *         def refresh_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 1050, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1051
 *         def refresh_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 1051, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 1051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":1050
 *         @wraps(of)
 *         def refresh_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":1052
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":1053
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 1053, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":1052
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":1054
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.refresh_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 1054, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":1056
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1056, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1056, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1056, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1056, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1056, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 1056, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1056, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":1057
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1057, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1057, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":1058
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             rv = f(*p, **kw)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":1052
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "chorde/decorators.py":1060
 *                 return
 * 
 *             rv = f(*p, **kw)             # <<<<<<<<<<<<<<
 *             nclient.put(callkey, rv, eff_ttl())
 *             return rv
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_f)) { __Pyx_RaiseClosureNameError("f"); __PYX_ERR(0, 1060, __pyx_L1_error) }
  __pyx_t_5 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_f, __pyx_v_p, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_rv = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "chorde/decorators.py":1061
 * 
 *             rv = f(*p, **kw)
 *             nclient.put(callkey, rv, eff_ttl())             # <<<<<<<<<<<<<<
 *             return rv
 *         if decorate is not None:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 1061, __pyx_L1_error) }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_put); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 1061, __pyx_L1_error) }
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = NULL;
  __pyx_t_12 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_callkey, __pyx_v_rv, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_callkey, __pyx_v_rv, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_INCREF(__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_12, __pyx_v_callkey);
    __Pyx_INCREF(__pyx_v_rv);
    __Pyx_GIVEREF(__pyx_v_rv);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_12, __pyx_v_rv);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_12, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "chorde/decorators.py":1062
 *             rv = f(*p, **kw)
 *             nclient.put(callkey, rv, eff_ttl())
 *             return rv             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             refresh_f = decorate(refresh_f)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "chorde/decorators.py":1049
 * 
 *         @wraps(of)
 *         def refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.refresh_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1067
 * 
 *         @wraps(of)
 *         def async_refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_47async_refresh_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_47async_refresh_f = {"async_refresh_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_47async_refresh_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_47async_refresh_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("async_refresh_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "async_refresh_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_46async_refresh_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_46async_refresh_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = NULL;
  PyObject *__pyx_v_client = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("async_refresh_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1068
 *         @wraps(of)
 *         def async_refresh_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 1068, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1069
 *         def async_refresh_f(*p, **kw):
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 1069, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":1068
 *         @wraps(of)
 *         def async_refresh_f(*p, **kw):
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             try:
 */
  }

  /* "chorde/decorators.py":1070
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":1071
 *                 _initialize()
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 1071, __pyx_L4_error) }
      __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1071, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_callkey = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":1070
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":1072
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.async_refresh_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 1072, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_5);

      /* "chorde/decorators.py":1074
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1074, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1074, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1074, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1074, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1074, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 1074, __pyx_L6_except_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__10, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1074, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":1075
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1075, __pyx_L6_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1075, __pyx_L6_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":1076
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             client = aclient
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "chorde/decorators.py":1070
 *             if _initialize is not None:
 *                 _initialize()
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __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_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "chorde/decorators.py":1078
 *                 return
 * 
 *             client = aclient             # <<<<<<<<<<<<<<
 *             if not client.contains(callkey, 0):
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 1078, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_aclient);
  __pyx_v_client = __pyx_cur_scope->__pyx_v_aclient;

  /* "chorde/decorators.py":1079
 * 
 *             client = aclient
 *             if not client.contains(callkey, 0):             # <<<<<<<<<<<<<<
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *         if decorate is not None:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_client, __pyx_n_s_contains); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_12 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_callkey, __pyx_int_0};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_callkey, __pyx_int_0};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_v_callkey);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_int_0);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1080
 *             client = aclient
 *             if not client.contains(callkey, 0):
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             async_refresh_f = decorate(async_refresh_f)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__put_deferred)) { __Pyx_RaiseClosureNameError("_put_deferred"); __PYX_ERR(0, 1080, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 1080, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 1080, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_client);
    __Pyx_GIVEREF(__pyx_v_client);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_client);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_af);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_af);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_af);
    __Pyx_INCREF(__pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_v_callkey);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_callkey);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_v_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__put_deferred, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "chorde/decorators.py":1079
 * 
 *             client = aclient
 *             if not client.contains(callkey, 0):             # <<<<<<<<<<<<<<
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *         if decorate is not None:
 */
  }

  /* "chorde/decorators.py":1067
 * 
 *         @wraps(of)
 *         def async_refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.async_refresh_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XDECREF(__pyx_v_client);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1085
 * 
 *         @wraps(of)
 *         def future_refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_49future_refresh_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_49future_refresh_f = {"future_refresh_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_49future_refresh_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_49future_refresh_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("future_refresh_f (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "future_refresh_f", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_48future_refresh_f(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_48future_refresh_f(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_callkey = NULL;
  PyObject *__pyx_v_frv = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("future_refresh_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1086
 *         @wraps(of)
 *         def future_refresh_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
  {
    __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:*/ {

      /* "chorde/decorators.py":1087
 *         def future_refresh_f(*p, **kw):
 *             try:
 *                 callkey = key(*p, **kw)             # <<<<<<<<<<<<<<
 *             except:
 *                 # Bummer
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 1087, __pyx_L3_error) }
      __pyx_t_4 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key, __pyx_v_p, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1087, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_callkey = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "chorde/decorators.py":1086
 *         @wraps(of)
 *         def future_refresh_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":1088
 *             try:
 *                 callkey = key(*p, **kw)
 *             except:             # <<<<<<<<<<<<<<
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 */
    /*except:*/ {
      __Pyx_AddTraceback("chorde.decorators.cached.decor.future_refresh_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 1088, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "chorde/decorators.py":1090
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_logging); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1090, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1090, __pyx_L5_except_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_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_n_s_chorde) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_n_s_chorde);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1090, __pyx_L5_except_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_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1090, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1090, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 1090, __pyx_L5_except_error)
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__10, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1090, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "chorde/decorators.py":1091
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1091, __pyx_L5_except_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_v_stats)) { __Pyx_RaiseClosureNameError("stats"); __PYX_ERR(0, 1091, __pyx_L5_except_error) }
      __pyx_cur_scope->__pyx_v_stats->errors = (__pyx_cur_scope->__pyx_v_stats->errors + 1);

      /* "chorde/decorators.py":1092
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)
 *                 stats.errors += 1
 *                 return             # <<<<<<<<<<<<<<
 * 
 *             frv = Future()
 */
      __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_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "chorde/decorators.py":1086
 *         @wraps(of)
 *         def future_refresh_f(*p, **kw):
 *             try:             # <<<<<<<<<<<<<<
 *                 callkey = key(*p, **kw)
 *             except:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "chorde/decorators.py":1094
 *                 return
 * 
 *             frv = Future()             # <<<<<<<<<<<<<<
 *             _fput_deferred(frv, aclient, af, callkey, eff_ttl(), *p, **kw)
 *             return frv
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_Future)) { __Pyx_RaiseClosureNameError("Future"); __PYX_ERR(0, 1094, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_Future);
  __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_Future; __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_6 = (__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_6)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_frv = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "chorde/decorators.py":1095
 * 
 *             frv = Future()
 *             _fput_deferred(frv, aclient, af, callkey, eff_ttl(), *p, **kw)             # <<<<<<<<<<<<<<
 *             return frv
 *         if decorate is not None:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__fput_deferred)) { __Pyx_RaiseClosureNameError("_fput_deferred"); __PYX_ERR(0, 1095, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 1095, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_af)) { __Pyx_RaiseClosureNameError("af"); __PYX_ERR(0, 1095, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl)) { __Pyx_RaiseClosureNameError("eff_ttl"); __PYX_ERR(0, 1095, __pyx_L1_error) }
  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eff_ttl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_frv);
  __Pyx_GIVEREF(__pyx_v_frv);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_frv);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_aclient);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_aclient);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_v_aclient);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_af);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_af);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_cur_scope->__pyx_v_af);
  __Pyx_INCREF(__pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_v_callkey);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_callkey);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_v_p); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__fput_deferred, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __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;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "chorde/decorators.py":1096
 *             frv = Future()
 *             _fput_deferred(frv, aclient, af, callkey, eff_ttl(), *p, **kw)
 *             return frv             # <<<<<<<<<<<<<<
 *         if decorate is not None:
 *             future_refresh_f = decorate(future_refresh_f)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_frv);
  __pyx_r = __pyx_v_frv;
  goto __pyx_L0;

  /* "chorde/decorators.py":1085
 * 
 *         @wraps(of)
 *         def future_refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("chorde.decorators.cached.decor.future_refresh_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_callkey);
  __Pyx_XDECREF(__pyx_v_frv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1111
 *         value_callbacks = []
 *         get_kwargs = {}
 *         def _promote_callback(*p, **kw):             # <<<<<<<<<<<<<<
 *             for cb in promote_callbacks:
 *                 cb(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_51_promote_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_51_promote_callback = {"_promote_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_51_promote_callback, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_51_promote_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_promote_callback (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_promote_callback", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_50_promote_callback(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_50_promote_callback(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_cb = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_promote_callback", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1112
 *         get_kwargs = {}
 *         def _promote_callback(*p, **kw):
 *             for cb in promote_callbacks:             # <<<<<<<<<<<<<<
 *                 cb(*p, **kw)
 *         def _value_callback(*p, **kw):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_promote_callbacks)) { __Pyx_RaiseClosureNameError("promote_callbacks"); __PYX_ERR(0, 1112, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_promote_callbacks == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1112, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_promote_callbacks; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1112, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_cb, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "chorde/decorators.py":1113
 *         def _promote_callback(*p, **kw):
 *             for cb in promote_callbacks:
 *                 cb(*p, **kw)             # <<<<<<<<<<<<<<
 *         def _value_callback(*p, **kw):
 *             for cb in value_callbacks:
 */
    __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_cb, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "chorde/decorators.py":1112
 *         get_kwargs = {}
 *         def _promote_callback(*p, **kw):
 *             for cb in promote_callbacks:             # <<<<<<<<<<<<<<
 *                 cb(*p, **kw)
 *         def _value_callback(*p, **kw):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":1111
 *         value_callbacks = []
 *         get_kwargs = {}
 *         def _promote_callback(*p, **kw):             # <<<<<<<<<<<<<<
 *             for cb in promote_callbacks:
 *                 cb(*p, **kw)
 */

  /* 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_AddTraceback("chorde.decorators.cached.decor._promote_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cb);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1114
 *             for cb in promote_callbacks:
 *                 cb(*p, **kw)
 *         def _value_callback(*p, **kw):             # <<<<<<<<<<<<<<
 *             for cb in value_callbacks:
 *                 cb(*p, **kw)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_53_value_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_53_value_callback = {"_value_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_53_value_callback, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_53_value_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_value_callback (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_value_callback", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_p = __pyx_args;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_52_value_callback(__pyx_self, __pyx_v_p, __pyx_v_kw);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_52_value_callback(PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_kw) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v_cb = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_value_callback", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1115
 *                 cb(*p, **kw)
 *         def _value_callback(*p, **kw):
 *             for cb in value_callbacks:             # <<<<<<<<<<<<<<
 *                 cb(*p, **kw)
 *         def on_promote_f(callback):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_value_callbacks)) { __Pyx_RaiseClosureNameError("value_callbacks"); __PYX_ERR(0, 1115, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_value_callbacks == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1115, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_value_callbacks; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1115, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_cb, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "chorde/decorators.py":1116
 *         def _value_callback(*p, **kw):
 *             for cb in value_callbacks:
 *                 cb(*p, **kw)             # <<<<<<<<<<<<<<
 *         def on_promote_f(callback):
 *             promote_callbacks.append(callback)
 */
    __pyx_t_3 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_cb, __pyx_v_p, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "chorde/decorators.py":1115
 *                 cb(*p, **kw)
 *         def _value_callback(*p, **kw):
 *             for cb in value_callbacks:             # <<<<<<<<<<<<<<
 *                 cb(*p, **kw)
 *         def on_promote_f(callback):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":1114
 *             for cb in promote_callbacks:
 *                 cb(*p, **kw)
 *         def _value_callback(*p, **kw):             # <<<<<<<<<<<<<<
 *             for cb in value_callbacks:
 *                 cb(*p, **kw)
 */

  /* 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_AddTraceback("chorde.decorators.cached.decor._value_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cb);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1117
 *             for cb in value_callbacks:
 *                 cb(*p, **kw)
 *         def on_promote_f(callback):             # <<<<<<<<<<<<<<
 *             promote_callbacks.append(callback)
 *             get_kwargs.setdefault('promote_callback', _promote_callback)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_55on_promote_f(PyObject *__pyx_self, PyObject *__pyx_v_callback); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_55on_promote_f = {"on_promote_f", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_55on_promote_f, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_55on_promote_f(PyObject *__pyx_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_promote_f (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_54on_promote_f(__pyx_self, ((PyObject *)__pyx_v_callback));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_54on_promote_f(PyObject *__pyx_self, PyObject *__pyx_v_callback) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_promote_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1118
 *                 cb(*p, **kw)
 *         def on_promote_f(callback):
 *             promote_callbacks.append(callback)             # <<<<<<<<<<<<<<
 *             get_kwargs.setdefault('promote_callback', _promote_callback)
 *             elazy_kwargs.setdefault('promote_callback', _promote_callback)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_promote_callbacks)) { __Pyx_RaiseClosureNameError("promote_callbacks"); __PYX_ERR(0, 1118, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_promote_callbacks == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
    __PYX_ERR(0, 1118, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_promote_callbacks, __pyx_v_callback); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1118, __pyx_L1_error)

  /* "chorde/decorators.py":1119
 *         def on_promote_f(callback):
 *             promote_callbacks.append(callback)
 *             get_kwargs.setdefault('promote_callback', _promote_callback)             # <<<<<<<<<<<<<<
 *             elazy_kwargs.setdefault('promote_callback', _promote_callback)
 *             eget_async_lazy_recheck_kwargs.setdefault('promote_callback', _promote_callback)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_get_kwargs)) { __Pyx_RaiseClosureNameError("get_kwargs"); __PYX_ERR(0, 1119, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_get_kwargs == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "setdefault");
    __PYX_ERR(0, 1119, __pyx_L1_error)
  }
  if (unlikely(!__pyx_cur_scope->__pyx_v__promote_callback)) { __Pyx_RaiseClosureNameError("_promote_callback"); __PYX_ERR(0, 1119, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyDict_SetDefault(__pyx_cur_scope->__pyx_v_get_kwargs, __pyx_n_s_promote_callback, __pyx_cur_scope->__pyx_v__promote_callback, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":1120
 *             promote_callbacks.append(callback)
 *             get_kwargs.setdefault('promote_callback', _promote_callback)
 *             elazy_kwargs.setdefault('promote_callback', _promote_callback)             # <<<<<<<<<<<<<<
 *             eget_async_lazy_recheck_kwargs.setdefault('promote_callback', _promote_callback)
 *             return callback
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs)) { __Pyx_RaiseClosureNameError("elazy_kwargs"); __PYX_ERR(0, 1120, __pyx_L1_error) }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_elazy_kwargs, __pyx_n_s_setdefault); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_cur_scope->__pyx_v__promote_callback)) { __Pyx_RaiseClosureNameError("_promote_callback"); __PYX_ERR(0, 1120, __pyx_L1_error) }
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_promote_callback, __pyx_cur_scope->__pyx_v__promote_callback};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_promote_callback, __pyx_cur_scope->__pyx_v__promote_callback};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_promote_callback);
    __Pyx_GIVEREF(__pyx_n_s_promote_callback);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_s_promote_callback);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__promote_callback);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v__promote_callback);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_cur_scope->__pyx_v__promote_callback);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":1121
 *             get_kwargs.setdefault('promote_callback', _promote_callback)
 *             elazy_kwargs.setdefault('promote_callback', _promote_callback)
 *             eget_async_lazy_recheck_kwargs.setdefault('promote_callback', _promote_callback)             # <<<<<<<<<<<<<<
 *             return callback
 *         def on_value_f(callback):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("eget_async_lazy_recheck_kwargs"); __PYX_ERR(0, 1121, __pyx_L1_error) }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_eget_async_lazy_recheck_kwargs, __pyx_n_s_setdefault); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_cur_scope->__pyx_v__promote_callback)) { __Pyx_RaiseClosureNameError("_promote_callback"); __PYX_ERR(0, 1121, __pyx_L1_error) }
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  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_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_promote_callback, __pyx_cur_scope->__pyx_v__promote_callback};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_promote_callback, __pyx_cur_scope->__pyx_v__promote_callback};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_promote_callback);
    __Pyx_GIVEREF(__pyx_n_s_promote_callback);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_n_s_promote_callback);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__promote_callback);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v__promote_callback);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_cur_scope->__pyx_v__promote_callback);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":1122
 *             elazy_kwargs.setdefault('promote_callback', _promote_callback)
 *             eget_async_lazy_recheck_kwargs.setdefault('promote_callback', _promote_callback)
 *             return callback             # <<<<<<<<<<<<<<
 *         def on_value_f(callback):
 *             value_callbacks.append(callback)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_callback);
  __pyx_r = __pyx_v_callback;
  goto __pyx_L0;

  /* "chorde/decorators.py":1117
 *             for cb in value_callbacks:
 *                 cb(*p, **kw)
 *         def on_promote_f(callback):             # <<<<<<<<<<<<<<
 *             promote_callbacks.append(callback)
 *             get_kwargs.setdefault('promote_callback', _promote_callback)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.on_promote_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1123
 *             eget_async_lazy_recheck_kwargs.setdefault('promote_callback', _promote_callback)
 *             return callback
 *         def on_value_f(callback):             # <<<<<<<<<<<<<<
 *             value_callbacks.append(callback)
 *             return callback
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_57on_value_f(PyObject *__pyx_self, PyObject *__pyx_v_callback); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_57on_value_f = {"on_value_f", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_57on_value_f, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_57on_value_f(PyObject *__pyx_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_value_f (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_56on_value_f(__pyx_self, ((PyObject *)__pyx_v_callback));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_56on_value_f(PyObject *__pyx_self, PyObject *__pyx_v_callback) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_value_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1124
 *             return callback
 *         def on_value_f(callback):
 *             value_callbacks.append(callback)             # <<<<<<<<<<<<<<
 *             return callback
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_value_callbacks)) { __Pyx_RaiseClosureNameError("value_callbacks"); __PYX_ERR(0, 1124, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_value_callbacks == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
    __PYX_ERR(0, 1124, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_value_callbacks, __pyx_v_callback); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1124, __pyx_L1_error)

  /* "chorde/decorators.py":1125
 *         def on_value_f(callback):
 *             value_callbacks.append(callback)
 *             return callback             # <<<<<<<<<<<<<<
 * 
 *         placeholder_value_fn_cell = []
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_callback);
  __pyx_r = __pyx_v_callback;
  goto __pyx_L0;

  /* "chorde/decorators.py":1123
 *             eget_async_lazy_recheck_kwargs.setdefault('promote_callback', _promote_callback)
 *             return callback
 *         def on_value_f(callback):             # <<<<<<<<<<<<<<
 *             value_callbacks.append(callback)
 *             return callback
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("chorde.decorators.cached.decor.on_value_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1128
 * 
 *         placeholder_value_fn_cell = []
 *         def placeholder_value_f(fn):             # <<<<<<<<<<<<<<
 *             placeholder_value_fn_cell[:] = [fn]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_59placeholder_value_f(PyObject *__pyx_self, PyObject *__pyx_v_fn); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_59placeholder_value_f = {"placeholder_value_f", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_59placeholder_value_f, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_59placeholder_value_f(PyObject *__pyx_self, PyObject *__pyx_v_fn) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("placeholder_value_f (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_58placeholder_value_f(__pyx_self, ((PyObject *)__pyx_v_fn));

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_58placeholder_value_f(PyObject *__pyx_self, PyObject *__pyx_v_fn) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("placeholder_value_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1129
 *         placeholder_value_fn_cell = []
 *         def placeholder_value_f(fn):
 *             placeholder_value_fn_cell[:] = [fn]             # <<<<<<<<<<<<<<
 * 
 *         fclient = None
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_fn);
  __Pyx_GIVEREF(__pyx_v_fn);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_fn);
  if (unlikely(!__pyx_cur_scope->__pyx_v_placeholder_value_fn_cell)) { __Pyx_RaiseClosureNameError("placeholder_value_fn_cell"); __PYX_ERR(0, 1129, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_placeholder_value_fn_cell == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1129, __pyx_L1_error)
  }
  if (__Pyx_PyObject_SetSlice(__pyx_cur_scope->__pyx_v_placeholder_value_fn_cell, __pyx_t_1, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 1129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":1128
 * 
 *         placeholder_value_fn_cell = []
 *         def placeholder_value_f(fn):             # <<<<<<<<<<<<<<
 *             placeholder_value_fn_cell[:] = [fn]
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.placeholder_value_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1132
 * 
 *         fclient = None
 *         def future_f(initialize = True):             # <<<<<<<<<<<<<<
 *             nonlocal fclient
 *             if _initialize is not None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_61future_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_61future_f = {"future_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_61future_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_61future_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_initialize = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("future_f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_initialize,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initialize);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "future_f") < 0)) __PYX_ERR(0, 1132, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_initialize = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("future_f", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1132, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_60future_f(__pyx_self, __pyx_v_initialize);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_60future_f(PyObject *__pyx_self, PyObject *__pyx_v_initialize) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_v__client = 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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("future_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1134
 *         def future_f(initialize = True):
 *             nonlocal fclient
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             if fclient is None and initialize:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 1134, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1135
 *             nonlocal fclient
 *             if _initialize is not None:
 *                 _initialize()             # <<<<<<<<<<<<<<
 *             if fclient is None and initialize:
 *                 if aclient:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 1135, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 1135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":1134
 *         def future_f(initialize = True):
 *             nonlocal fclient
 *             if _initialize is not None:             # <<<<<<<<<<<<<<
 *                 _initialize()
 *             if fclient is None and initialize:
 */
  }

  /* "chorde/decorators.py":1136
 *             if _initialize is not None:
 *                 _initialize()
 *             if fclient is None and initialize:             # <<<<<<<<<<<<<<
 *                 if aclient:
 *                     _client = aclient
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_fclient)) { __Pyx_RaiseClosureNameError("fclient"); __PYX_ERR(0, 1136, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_fclient == Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_initialize); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1136, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1137
 *                 _initialize()
 *             if fclient is None and initialize:
 *                 if aclient:             # <<<<<<<<<<<<<<
 *                     _client = aclient
 *                 else:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 1137, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_aclient); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "chorde/decorators.py":1138
 *             if fclient is None and initialize:
 *                 if aclient:
 *                     _client = aclient             # <<<<<<<<<<<<<<
 *                 else:
 *                     async_f() # initializes aclient
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 1138, __pyx_L1_error) }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_aclient);
      __pyx_v__client = __pyx_cur_scope->__pyx_v_aclient;

      /* "chorde/decorators.py":1137
 *                 _initialize()
 *             if fclient is None and initialize:
 *                 if aclient:             # <<<<<<<<<<<<<<
 *                     _client = aclient
 *                 else:
 */
      goto __pyx_L7;
    }

    /* "chorde/decorators.py":1140
 *                     _client = aclient
 *                 else:
 *                     async_f() # initializes aclient             # <<<<<<<<<<<<<<
 *                     _client = aclient
 * 
 */
    /*else*/ {
      if (unlikely(!__pyx_cur_scope->__pyx_v_async_f)) { __Pyx_RaiseClosureNameError("async_f"); __PYX_ERR(0, 1140, __pyx_L1_error) }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_f);
      __pyx_t_4 = __pyx_cur_scope->__pyx_v_async_f; __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, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "chorde/decorators.py":1141
 *                 else:
 *                     async_f() # initializes aclient
 *                     _client = aclient             # <<<<<<<<<<<<<<
 * 
 *                 if async_processor:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 1141, __pyx_L1_error) }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_aclient);
      __pyx_v__client = __pyx_cur_scope->__pyx_v_aclient;
    }
    __pyx_L7:;

    /* "chorde/decorators.py":1143
 *                     _client = aclient
 * 
 *                 if async_processor:             # <<<<<<<<<<<<<<
 *                     _client = async_processor.bound(_client)
 *                 else:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor)) { __Pyx_RaiseClosureNameError("async_processor"); __PYX_ERR(0, 1143, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1143, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "chorde/decorators.py":1144
 * 
 *                 if async_processor:
 *                     _client = async_processor.bound(_client)             # <<<<<<<<<<<<<<
 *                 else:
 *                     _client = asyncache.AsyncCacheProcessor(async_processor_workers, _client,
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor)) { __Pyx_RaiseClosureNameError("async_processor"); __PYX_ERR(0, 1144, __pyx_L1_error) }
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor, __pyx_n_s_bound); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v__client) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v__client);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v__client, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "chorde/decorators.py":1143
 *                     _client = aclient
 * 
 *                 if async_processor:             # <<<<<<<<<<<<<<
 *                     _client = async_processor.bound(_client)
 *                 else:
 */
      goto __pyx_L8;
    }

    /* "chorde/decorators.py":1146
 *                     _client = async_processor.bound(_client)
 *                 else:
 *                     _client = asyncache.AsyncCacheProcessor(async_processor_workers, _client,             # <<<<<<<<<<<<<<
 *                         **async_processor_kwargs)
 *                 # atomic
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AsyncCacheProcessor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor_workers)) { __Pyx_RaiseClosureNameError("async_processor_workers"); __PYX_ERR(0, 1146, __pyx_L1_error) }
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor_workers);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor_workers);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor_workers);
      __Pyx_INCREF(__pyx_v__client);
      __Pyx_GIVEREF(__pyx_v__client);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v__client);

      /* "chorde/decorators.py":1147
 *                 else:
 *                     _client = asyncache.AsyncCacheProcessor(async_processor_workers, _client,
 *                         **async_processor_kwargs)             # <<<<<<<<<<<<<<
 *                 # atomic
 *                 fclient = _client
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor_kwargs)) { __Pyx_RaiseClosureNameError("async_processor_kwargs"); __PYX_ERR(0, 1147, __pyx_L1_error) }
      if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor_kwargs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
        __PYX_ERR(0, 1147, __pyx_L1_error)
      }
      if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor_kwargs))) {
        __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1147, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      } else {
        __pyx_t_5 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_processor_kwargs, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }

      /* "chorde/decorators.py":1146
 *                     _client = async_processor.bound(_client)
 *                 else:
 *                     _client = asyncache.AsyncCacheProcessor(async_processor_workers, _client,             # <<<<<<<<<<<<<<
 *                         **async_processor_kwargs)
 *                 # atomic
 */
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v__client, __pyx_t_7);
      __pyx_t_7 = 0;
    }
    __pyx_L8:;

    /* "chorde/decorators.py":1149
 *                         **async_processor_kwargs)
 *                 # atomic
 *                 fclient = _client             # <<<<<<<<<<<<<<
 *                 future_cached_f.client = fclient
 *             return future_cached_f
 */
    __Pyx_INCREF(__pyx_v__client);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fclient);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_fclient, __pyx_v__client);
    __Pyx_GIVEREF(__pyx_v__client);

    /* "chorde/decorators.py":1150
 *                 # atomic
 *                 fclient = _client
 *                 future_cached_f.client = fclient             # <<<<<<<<<<<<<<
 *             return future_cached_f
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_future_cached_f)) { __Pyx_RaiseClosureNameError("future_cached_f"); __PYX_ERR(0, 1150, __pyx_L1_error) }
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_client, __pyx_cur_scope->__pyx_v_fclient) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)

    /* "chorde/decorators.py":1136
 *             if _initialize is not None:
 *                 _initialize()
 *             if fclient is None and initialize:             # <<<<<<<<<<<<<<
 *                 if aclient:
 *                     _client = aclient
 */
  }

  /* "chorde/decorators.py":1151
 *                 fclient = _client
 *                 future_cached_f.client = fclient
 *             return future_cached_f             # <<<<<<<<<<<<<<
 * 
 *         if not client.is_async:
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_future_cached_f)) { __Pyx_RaiseClosureNameError("future_cached_f"); __PYX_ERR(0, 1151, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_future_cached_f);
  __pyx_r = __pyx_cur_scope->__pyx_v_future_cached_f;
  goto __pyx_L0;

  /* "chorde/decorators.py":1132
 * 
 *         fclient = None
 *         def future_f(initialize = True):             # <<<<<<<<<<<<<<
 *             nonlocal fclient
 *             if _initialize is not None:
 */

  /* 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_7);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.future_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__client);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1154
 * 
 *         if not client.is_async:
 *             def async_f(initialize = True):             # <<<<<<<<<<<<<<
 *                 nonlocal aclient
 *                 if _initialize is not None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_63async_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_63async_f = {"async_f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_5decor_63async_f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_63async_f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_initialize = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("async_f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_initialize,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initialize);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "async_f") < 0)) __PYX_ERR(0, 1154, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_initialize = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("async_f", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1154, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("chorde.decorators.cached.decor.async_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6chorde_10decorators_6cached_5decor_62async_f(__pyx_self, __pyx_v_initialize);

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

static PyObject *__pyx_pf_6chorde_10decorators_6cached_5decor_62async_f(PyObject *__pyx_self, PyObject *__pyx_v_initialize) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("async_f", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1156
 *             def async_f(initialize = True):
 *                 nonlocal aclient
 *                 if _initialize is not None:             # <<<<<<<<<<<<<<
 *                     _initialize()
 *                 if aclient is None and initialize:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 1156, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__initialize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1157
 *                 nonlocal aclient
 *                 if _initialize is not None:
 *                     _initialize()             # <<<<<<<<<<<<<<
 *                 if aclient is None and initialize:
 *                     # atomic
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__initialize)) { __Pyx_RaiseClosureNameError("_initialize"); __PYX_ERR(0, 1157, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v__initialize);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v__initialize; __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, 1157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "chorde/decorators.py":1156
 *             def async_f(initialize = True):
 *                 nonlocal aclient
 *                 if _initialize is not None:             # <<<<<<<<<<<<<<
 *                     _initialize()
 *                 if aclient is None and initialize:
 */
  }

  /* "chorde/decorators.py":1158
 *                 if _initialize is not None:
 *                     _initialize()
 *                 if aclient is None and initialize:             # <<<<<<<<<<<<<<
 *                     # atomic
 *                     aclient = asyncache.AsyncWriteCacheClient(nclient,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseClosureNameError("aclient"); __PYX_ERR(0, 1158, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_aclient == Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_initialize); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1160
 *                 if aclient is None and initialize:
 *                     # atomic
 *                     aclient = asyncache.AsyncWriteCacheClient(nclient,             # <<<<<<<<<<<<<<
 *                         async_writer_queue_size,
 *                         async_writer_workers,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AsyncWriteCacheClient); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_nclient)) { __Pyx_RaiseClosureNameError("nclient"); __PYX_ERR(0, 1160, __pyx_L1_error) }

    /* "chorde/decorators.py":1161
 *                     # atomic
 *                     aclient = asyncache.AsyncWriteCacheClient(nclient,
 *                         async_writer_queue_size,             # <<<<<<<<<<<<<<
 *                         async_writer_workers,
 *                         **async_writer_kwargs)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_queue_size)) { __Pyx_RaiseClosureNameError("async_writer_queue_size"); __PYX_ERR(0, 1161, __pyx_L1_error) }

    /* "chorde/decorators.py":1162
 *                     aclient = asyncache.AsyncWriteCacheClient(nclient,
 *                         async_writer_queue_size,
 *                         async_writer_workers,             # <<<<<<<<<<<<<<
 *                         **async_writer_kwargs)
 *                     async_cached_f.client = aclient
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_workers)) { __Pyx_RaiseClosureNameError("async_writer_workers"); __PYX_ERR(0, 1162, __pyx_L1_error) }

    /* "chorde/decorators.py":1160
 *                 if aclient is None and initialize:
 *                     # atomic
 *                     aclient = asyncache.AsyncWriteCacheClient(nclient,             # <<<<<<<<<<<<<<
 *                         async_writer_queue_size,
 *                         async_writer_workers,
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_nclient);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_nclient);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_nclient);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_queue_size);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_queue_size);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_queue_size);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_workers);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_workers);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_workers);

    /* "chorde/decorators.py":1163
 *                         async_writer_queue_size,
 *                         async_writer_workers,
 *                         **async_writer_kwargs)             # <<<<<<<<<<<<<<
 *                     async_cached_f.client = aclient
 *                 return async_cached_f
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_kwargs)) { __Pyx_RaiseClosureNameError("async_writer_kwargs"); __PYX_ERR(0, 1163, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_kwargs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 1163, __pyx_L1_error)
    }
    if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_kwargs))) {
      __pyx_t_5 = PyDict_Copy(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      __pyx_t_5 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_writer_kwargs, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }

    /* "chorde/decorators.py":1160
 *                 if aclient is None and initialize:
 *                     # atomic
 *                     aclient = asyncache.AsyncWriteCacheClient(nclient,             # <<<<<<<<<<<<<<
 *                         async_writer_queue_size,
 *                         async_writer_workers,
 */
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_aclient);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_aclient, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;

    /* "chorde/decorators.py":1164
 *                         async_writer_workers,
 *                         **async_writer_kwargs)
 *                     async_cached_f.client = aclient             # <<<<<<<<<<<<<<
 *                 return async_cached_f
 *             async_cached_f.clear = nclient.clear
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_async_cached_f)) { __Pyx_RaiseClosureNameError("async_cached_f"); __PYX_ERR(0, 1164, __pyx_L1_error) }
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_client, __pyx_cur_scope->__pyx_v_aclient) < 0) __PYX_ERR(0, 1164, __pyx_L1_error)

    /* "chorde/decorators.py":1158
 *                 if _initialize is not None:
 *                     _initialize()
 *                 if aclient is None and initialize:             # <<<<<<<<<<<<<<
 *                     # atomic
 *                     aclient = asyncache.AsyncWriteCacheClient(nclient,
 */
  }

  /* "chorde/decorators.py":1165
 *                         **async_writer_kwargs)
 *                     async_cached_f.client = aclient
 *                 return async_cached_f             # <<<<<<<<<<<<<<
 *             async_cached_f.clear = nclient.clear
 *             async_cached_f.client = aclient if aclient is not None else None
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_cached_f)) { __Pyx_RaiseClosureNameError("async_cached_f"); __PYX_ERR(0, 1165, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_cached_f);
  __pyx_r = __pyx_cur_scope->__pyx_v_async_cached_f;
  goto __pyx_L0;

  /* "chorde/decorators.py":1154
 * 
 *         if not client.is_async:
 *             def async_f(initialize = True):             # <<<<<<<<<<<<<<
 *                 nonlocal aclient
 *                 if _initialize is not None:
 */

  /* 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_7);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.async_f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1218
 *         cached_f.placeholder_value = placeholder_value_f
 * 
 *         future_cached_f.clear = lambda : fclient.clear()             # <<<<<<<<<<<<<<
 *         future_cached_f.client = None
 *         future_cached_f.bg = cached_f.bg
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_64lambda6(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_5decor_64lambda6 = {"lambda6", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_5decor_64lambda6, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_5decor_64lambda6(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda6 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda6(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda6(PyObject *__pyx_self) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda6", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_fclient)) { __Pyx_RaiseClosureNameError("fclient"); __PYX_ERR(0, 1218, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fclient, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1218, __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;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("chorde.decorators.cached.decor.lambda6", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":428
 *     Future = asyncache.Future
 * 
 *     def decor(f):             # <<<<<<<<<<<<<<
 *         if namespace is None:
 *             salt2 = repr((ttl,))
 */

static PyObject *__pyx_pf_6chorde_10decorators_6cached_decor(PyObject *__pyx_self, PyObject *__pyx_v_f) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_cur_scope;
  PyObject *__pyx_v_salt2 = NULL;
  PyObject *__pyx_v_nasync_client = NULL;
  PyObject *__pyx_v_cached_f = 0;
  PyObject *__pyx_v_get_ttl_f = 0;
  PyObject *__pyx_v_lazy_cached_f = 0;
  PyObject *__pyx_v_peek_cached_f = NULL;
  PyObject *__pyx_v_future_lazy_cached_f = 0;
  PyObject *__pyx_v_future_peek_cached_f = 0;
  PyObject *__pyx_v_future_get_ttl_f = 0;
  PyObject *__pyx_v_invalidate_f = 0;
  PyObject *__pyx_v_future_invalidate_f = 0;
  PyObject *__pyx_v_expire_f = 0;
  PyObject *__pyx_v_async_expire_f = 0;
  PyObject *__pyx_v_future_expire_f = 0;
  PyObject *__pyx_v_put_f = 0;
  PyObject *__pyx_v_async_put_f = 0;
  PyObject *__pyx_v_future_put_f = 0;
  PyObject *__pyx_v_async_lazy_cached_f = 0;
  PyObject *__pyx_v_refresh_f = 0;
  PyObject *__pyx_v_async_refresh_f = 0;
  PyObject *__pyx_v_future_refresh_f = 0;
  PyObject *__pyx_v_on_promote_f = 0;
  PyObject *__pyx_v_on_value_f = 0;
  PyObject *__pyx_v_placeholder_value_f = 0;
  PyObject *__pyx_v_future_f = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decor", 0);
  __pyx_cur_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *)__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_3_decor(__pyx_ptype_6chorde_10decorators___pyx_scope_struct_3_decor, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 428, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f);

  /* "chorde/decorators.py":429
 * 
 *     def decor(f):
 *         if namespace is None:             # <<<<<<<<<<<<<<
 *             salt2 = repr((ttl,))
 *             nclient = base.NamespaceWrapper(_make_namespace(
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_namespace)) { __Pyx_RaiseClosureNameError("namespace"); __PYX_ERR(0, 429, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_namespace == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":430
 *     def decor(f):
 *         if namespace is None:
 *             salt2 = repr((ttl,))             # <<<<<<<<<<<<<<
 *             nclient = base.NamespaceWrapper(_make_namespace(
 *                 f, salt = autonamespace_version_salt, salt2 = salt2), client)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl)) { __Pyx_RaiseClosureNameError("ttl"); __PYX_ERR(0, 430, __pyx_L1_error) }
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl);
    __pyx_t_4 = PyObject_Repr(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_salt2 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":431
 *         if namespace is None:
 *             salt2 = repr((ttl,))
 *             nclient = base.NamespaceWrapper(_make_namespace(             # <<<<<<<<<<<<<<
 *                 f, salt = autonamespace_version_salt, salt2 = salt2), client)
 *             if async_client:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_NamespaceWrapper); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_make_namespace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "chorde/decorators.py":432
 *             salt2 = repr((ttl,))
 *             nclient = base.NamespaceWrapper(_make_namespace(
 *                 f, salt = autonamespace_version_salt, salt2 = salt2), client)             # <<<<<<<<<<<<<<
 *             if async_client:
 *                 nasync_client = base.NamespaceMirrorWrapper(nclient, async_client)
 */
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_f);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_autonamespace_version_salt)) { __Pyx_RaiseClosureNameError("autonamespace_version_salt"); __PYX_ERR(0, 432, __pyx_L1_error) }
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_salt, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_autonamespace_version_salt) < 0) __PYX_ERR(0, 432, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_salt2, __pyx_v_salt2) < 0) __PYX_ERR(0, 432, __pyx_L1_error)

    /* "chorde/decorators.py":431
 *         if namespace is None:
 *             salt2 = repr((ttl,))
 *             nclient = base.NamespaceWrapper(_make_namespace(             # <<<<<<<<<<<<<<
 *                 f, salt = autonamespace_version_salt, salt2 = salt2), client)
 *             if async_client:
 */
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "chorde/decorators.py":432
 *             salt2 = repr((ttl,))
 *             nclient = base.NamespaceWrapper(_make_namespace(
 *                 f, salt = autonamespace_version_salt, salt2 = salt2), client)             # <<<<<<<<<<<<<<
 *             if async_client:
 *                 nasync_client = base.NamespaceMirrorWrapper(nclient, async_client)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 432, __pyx_L1_error) }
    __pyx_t_7 = NULL;
    __pyx_t_9 = 0;
    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_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_client};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_client};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_t_8);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_client);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_client);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_client);
      __pyx_t_8 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __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;
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_v_nclient = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":433
 *             nclient = base.NamespaceWrapper(_make_namespace(
 *                 f, salt = autonamespace_version_salt, salt2 = salt2), client)
 *             if async_client:             # <<<<<<<<<<<<<<
 *                 nasync_client = base.NamespaceMirrorWrapper(nclient, async_client)
 *             else:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client)) { __Pyx_RaiseClosureNameError("async_client"); __PYX_ERR(0, 433, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 433, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "chorde/decorators.py":434
 *                 f, salt = autonamespace_version_salt, salt2 = salt2), client)
 *             if async_client:
 *                 nasync_client = base.NamespaceMirrorWrapper(nclient, async_client)             # <<<<<<<<<<<<<<
 *             else:
 *                 nasync_client = async_client
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_base); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NamespaceMirrorWrapper); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client)) { __Pyx_RaiseClosureNameError("async_client"); __PYX_ERR(0, 434, __pyx_L1_error) }
      __pyx_t_5 = NULL;
      __pyx_t_9 = 0;
      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_9 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_nclient, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_nclient, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_nclient);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_nclient);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_cur_scope->__pyx_v_nclient);
        __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_nasync_client = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "chorde/decorators.py":433
 *             nclient = base.NamespaceWrapper(_make_namespace(
 *                 f, salt = autonamespace_version_salt, salt2 = salt2), client)
 *             if async_client:             # <<<<<<<<<<<<<<
 *                 nasync_client = base.NamespaceMirrorWrapper(nclient, async_client)
 *             else:
 */
      goto __pyx_L4;
    }

    /* "chorde/decorators.py":436
 *                 nasync_client = base.NamespaceMirrorWrapper(nclient, async_client)
 *             else:
 *                 nasync_client = async_client             # <<<<<<<<<<<<<<
 *         else:
 *             nclient = client
 */
    /*else*/ {
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client)) { __Pyx_RaiseClosureNameError("async_client"); __PYX_ERR(0, 436, __pyx_L1_error) }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client);
      __pyx_v_nasync_client = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client;
    }
    __pyx_L4:;

    /* "chorde/decorators.py":429
 * 
 *     def decor(f):
 *         if namespace is None:             # <<<<<<<<<<<<<<
 *             salt2 = repr((ttl,))
 *             nclient = base.NamespaceWrapper(_make_namespace(
 */
    goto __pyx_L3;
  }

  /* "chorde/decorators.py":438
 *                 nasync_client = async_client
 *         else:
 *             nclient = client             # <<<<<<<<<<<<<<
 *             nasync_client = async_client
 * 
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 438, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_client);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_client);
    __pyx_cur_scope->__pyx_v_nclient = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_client;

    /* "chorde/decorators.py":439
 *         else:
 *             nclient = client
 *             nasync_client = async_client             # <<<<<<<<<<<<<<
 * 
 *         stats = CacheStats()
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client)) { __Pyx_RaiseClosureNameError("async_client"); __PYX_ERR(0, 439, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client);
    __pyx_v_nasync_client = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_client;
  }
  __pyx_L3:;

  /* "chorde/decorators.py":441
 *             nasync_client = async_client
 * 
 *         stats = CacheStats()             # <<<<<<<<<<<<<<
 * 
 *         if initialize is not None:
 */
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6chorde_10decorators_CacheStats)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_stats = ((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "chorde/decorators.py":443
 *         stats = CacheStats()
 * 
 *         if initialize is not None:             # <<<<<<<<<<<<<<
 *             def _initialize():
 *                 nonlocal _initialize
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_initialize)) { __Pyx_RaiseClosureNameError("initialize"); __PYX_ERR(0, 443, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_initialize != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":444
 * 
 *         if initialize is not None:
 *             def _initialize():             # <<<<<<<<<<<<<<
 *                 nonlocal _initialize
 *                 stop_initializing = initialize()
 */
    __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_1_initialize, 0, __pyx_n_s_cached_locals_decor_locals__init, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_cur_scope->__pyx_v__initialize = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":443
 *         stats = CacheStats()
 * 
 *         if initialize is not None:             # <<<<<<<<<<<<<<
 *             def _initialize():
 *                 nonlocal _initialize
 */
    goto __pyx_L5;
  }

  /* "chorde/decorators.py":450
 *                     _initialize = None
 *         else:
 *             _initialize = None             # <<<<<<<<<<<<<<
 * 
 *         # static async ttl spread, to avoid inter-process contention
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __pyx_cur_scope->__pyx_v__initialize = Py_None;
  }
  __pyx_L5:;

  /* "chorde/decorators.py":453
 * 
 *         # static async ttl spread, to avoid inter-process contention
 *         if ttl_spread:             # <<<<<<<<<<<<<<
 *             if _eff_async_ttl:
 *                 eff_async_ttl = _eff_async_ttl
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl_spread)) { __Pyx_RaiseClosureNameError("ttl_spread"); __PYX_ERR(0, 453, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl_spread); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 453, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "chorde/decorators.py":454
 *         # static async ttl spread, to avoid inter-process contention
 *         if ttl_spread:
 *             if _eff_async_ttl:             # <<<<<<<<<<<<<<
 *                 eff_async_ttl = _eff_async_ttl
 *             else:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__eff_async_ttl)) { __Pyx_RaiseClosureNameError("_eff_async_ttl"); __PYX_ERR(0, 454, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__eff_async_ttl); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 454, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "chorde/decorators.py":455
 *         if ttl_spread:
 *             if _eff_async_ttl:
 *                 eff_async_ttl = _eff_async_ttl             # <<<<<<<<<<<<<<
 *             else:
 *                 eff_async_ttl = max(async_ttl / 2, async_ttl - spread_type(ttl_spread * 0.25 * random.random()))
 */
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v__eff_async_ttl)) { __Pyx_RaiseClosureNameError("_eff_async_ttl"); __PYX_ERR(0, 455, __pyx_L1_error) }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__eff_async_ttl);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v__eff_async_ttl);
      __pyx_cur_scope->__pyx_v_eff_async_ttl = __pyx_cur_scope->__pyx_outer_scope->__pyx_v__eff_async_ttl;

      /* "chorde/decorators.py":454
 *         # static async ttl spread, to avoid inter-process contention
 *         if ttl_spread:
 *             if _eff_async_ttl:             # <<<<<<<<<<<<<<
 *                 eff_async_ttl = _eff_async_ttl
 *             else:
 */
      goto __pyx_L7;
    }

    /* "chorde/decorators.py":457
 *                 eff_async_ttl = _eff_async_ttl
 *             else:
 *                 eff_async_ttl = max(async_ttl / 2, async_ttl - spread_type(ttl_spread * 0.25 * random.random()))             # <<<<<<<<<<<<<<
 *         else:
 *             eff_async_ttl = async_ttl
 */
    /*else*/ {
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 457, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_spread_type)) { __Pyx_RaiseClosureNameError("spread_type"); __PYX_ERR(0, 457, __pyx_L1_error) }
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl_spread)) { __Pyx_RaiseClosureNameError("ttl_spread"); __PYX_ERR(0, 457, __pyx_L1_error) }
      __pyx_t_4 = PyNumber_Multiply(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl_spread, __pyx_float_0_25); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_random); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_random); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __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, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Multiply(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __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;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_spread_type), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Subtract(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 457, __pyx_L1_error) }
      __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl, __pyx_int_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 457, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_1) {
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_4 = __pyx_t_5;
      } else {
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_4 = __pyx_t_6;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_cur_scope->__pyx_v_eff_async_ttl = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __pyx_L7:;

    /* "chorde/decorators.py":453
 * 
 *         # static async ttl spread, to avoid inter-process contention
 *         if ttl_spread:             # <<<<<<<<<<<<<<
 *             if _eff_async_ttl:
 *                 eff_async_ttl = _eff_async_ttl
 */
    goto __pyx_L6;
  }

  /* "chorde/decorators.py":459
 *                 eff_async_ttl = max(async_ttl / 2, async_ttl - spread_type(ttl_spread * 0.25 * random.random()))
 *         else:
 *             eff_async_ttl = async_ttl             # <<<<<<<<<<<<<<
 * 
 *         # Wrap and track misses and timings
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 459, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl);
    __pyx_cur_scope->__pyx_v_eff_async_ttl = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl;
  }
  __pyx_L6:;

  /* "chorde/decorators.py":462
 * 
 *         # Wrap and track misses and timings
 *         if timings:             # <<<<<<<<<<<<<<
 *             of = f
 *             @wraps(of)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_timings)) { __Pyx_RaiseClosureNameError("timings"); __PYX_ERR(0, 462, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_timings); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 462, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "chorde/decorators.py":463
 *         # Wrap and track misses and timings
 *         if timings:
 *             of = f             # <<<<<<<<<<<<<<
 *             @wraps(of)
 *             @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f);
    __pyx_cur_scope->__pyx_v_of = __pyx_cur_scope->__pyx_v_f;

    /* "chorde/decorators.py":464
 *         if timings:
 *             of = f
 *             @wraps(of)             # <<<<<<<<<<<<<<
 *             @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *             def af(*p, **kw):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "chorde/decorators.py":466
 *             @wraps(of)
 *             @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *             def af(*p, **kw):             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *                 try:
 */
    __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_3af, 0, __pyx_n_s_cached_locals_decor_locals_af, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_cur_scope->__pyx_v_af = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":497
 *                     stats.errors += 1
 *                     raise
 *             @wraps(of)             # <<<<<<<<<<<<<<
 *             def f(*p, **kw):
 *                 stats.sync_misses += 1
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "chorde/decorators.py":498
 *                     raise
 *             @wraps(of)
 *             def f(*p, **kw):             # <<<<<<<<<<<<<<
 *                 stats.sync_misses += 1
 *                 return af(*p, **kw)
 */
    __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_5f, 0, __pyx_n_s_cached_locals_decor_locals_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":462
 * 
 *         # Wrap and track misses and timings
 *         if timings:             # <<<<<<<<<<<<<<
 *             of = f
 *             @wraps(of)
 */
    goto __pyx_L8;
  }

  /* "chorde/decorators.py":502
 *                 return af(*p, **kw)
 *         else:
 *             of = f             # <<<<<<<<<<<<<<
 *             @wraps(of)
 *             def af(*p, **kw):  # lint:ok
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f);
    __pyx_cur_scope->__pyx_v_of = __pyx_cur_scope->__pyx_v_f;

    /* "chorde/decorators.py":503
 *         else:
 *             of = f
 *             @wraps(of)             # <<<<<<<<<<<<<<
 *             def af(*p, **kw):  # lint:ok
 *                 stats.misses += 1
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "chorde/decorators.py":504
 *             of = f
 *             @wraps(of)
 *             def af(*p, **kw):  # lint:ok             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *                 try:
 */
    __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_7af, 0, __pyx_n_s_cached_locals_decor_locals_af, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_cur_scope->__pyx_v_af = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":519
 *                     stats.errors += 1
 *                     raise
 *             @wraps(of)             # <<<<<<<<<<<<<<
 *             def f(*p, **kw):  # lint:ok
 *                 stats.sync_misses += 1
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "chorde/decorators.py":520
 *                     raise
 *             @wraps(of)
 *             def f(*p, **kw):  # lint:ok             # <<<<<<<<<<<<<<
 *                 stats.sync_misses += 1
 *                 rv = af(*p, **kw)
 */
    __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_9f, 0, __pyx_n_s_cached_locals_decor_locals_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_f);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
  }
  __pyx_L8:;

  /* "chorde/decorators.py":532
 *                 return rv
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def cached_f(*p, **kw):
 *             if _initialize is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":533
 * 
 *         @wraps(of)
 *         def cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_11cached_f, 0, __pyx_n_s_cached_locals_decor_locals_cache, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_cached_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":551
 *                 nclient.put(callkey, rv, eff_ttl())
 *             return rv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             cached_f = decorate(cached_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 551, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":552
 *             return rv
 *         if decorate is not None:
 *             cached_f = decorate(cached_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 552, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_cached_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_cached_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_cached_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":551
 *                 nclient.put(callkey, rv, eff_ttl())
 *             return rv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             cached_f = decorate(cached_f)
 * 
 */
  }

  /* "chorde/decorators.py":554
 *             cached_f = decorate(cached_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def get_ttl_f(*p, **kw):
 *             if _initialize is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":555
 * 
 *         @wraps(of)
 *         def get_ttl_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_13get_ttl_f, 0, __pyx_n_s_cached_locals_decor_locals_get_t, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_get_ttl_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":571
 *                 stats.hits += 1
 *             return rv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             get_ttl_f = decorate(get_ttl_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 571, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":572
 *             return rv
 *         if decorate is not None:
 *             get_ttl_f = decorate(get_ttl_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 572, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_get_ttl_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_get_ttl_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_get_ttl_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":571
 *                 stats.hits += 1
 *             return rv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             get_ttl_f = decorate(get_ttl_f)
 * 
 */
  }

  /* "chorde/decorators.py":574
 *             get_ttl_f = decorate(get_ttl_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *         def async_cached_f(*p, **kw):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":576
 *         @wraps(of)
 *         @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *         def async_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_15async_cached_f, 0, __pyx_n_s_cached_locals_decor_locals_async_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_cur_scope->__pyx_v_async_cached_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":623
 * 
 *             return rv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             async_cached_f = decorate(async_cached_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 623, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":624
 *             return rv
 *         if decorate is not None:
 *             async_cached_f = decorate(async_cached_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 624, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_cur_scope->__pyx_v_async_cached_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_async_cached_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_cached_f);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":623
 * 
 *             return rv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             async_cached_f = decorate(async_cached_f)
 * 
 */
  }

  /* "chorde/decorators.py":626
 *             async_cached_f = decorate(async_cached_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def future_cached_f(*p, **kw):
 *             try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":627
 * 
 *         @wraps(of)
 *         def future_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_17future_cached_f, 0, __pyx_n_s_cached_locals_decor_locals_futur_10, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_cur_scope->__pyx_v_future_cached_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":696
 *                 frv._set_nothreads(rv)
 *             return frv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_cached_f = decorate(future_cached_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 696, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":697
 *             return frv
 *         if decorate is not None:
 *             future_cached_f = decorate(future_cached_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 697, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_cur_scope->__pyx_v_future_cached_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_future_cached_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_future_cached_f);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":696
 *                 frv._set_nothreads(rv)
 *             return frv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_cached_f = decorate(future_cached_f)
 * 
 */
  }

  /* "chorde/decorators.py":699
 *             future_cached_f = decorate(future_cached_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def lazy_cached_f(*p, **kw):
 *             if _initialize is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":700
 * 
 *         @wraps(of)
 *         def lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_19lazy_cached_f, 0, __pyx_n_s_cached_locals_decor_locals_lazy, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_lazy_cached_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":718
 *                 stats.misses += 1
 *                 raise
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             lazy_cached_f = decorate(lazy_cached_f)
 *         peek_cached_f = lazy_cached_f
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 718, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":719
 *                 raise
 *         if decorate is not None:
 *             lazy_cached_f = decorate(lazy_cached_f)             # <<<<<<<<<<<<<<
 *         peek_cached_f = lazy_cached_f
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 719, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_lazy_cached_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_lazy_cached_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_lazy_cached_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":718
 *                 stats.misses += 1
 *                 raise
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             lazy_cached_f = decorate(lazy_cached_f)
 *         peek_cached_f = lazy_cached_f
 */
  }

  /* "chorde/decorators.py":720
 *         if decorate is not None:
 *             lazy_cached_f = decorate(lazy_cached_f)
 *         peek_cached_f = lazy_cached_f             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
  __Pyx_INCREF(__pyx_v_lazy_cached_f);
  __pyx_v_peek_cached_f = __pyx_v_lazy_cached_f;

  /* "chorde/decorators.py":722
 *         peek_cached_f = lazy_cached_f
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def future_lazy_cached_f(*p, **kw):
 *             try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":723
 * 
 *         @wraps(of)
 *         def future_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_21future_lazy_cached_f, 0, __pyx_n_s_cached_locals_decor_locals_futur_11, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_future_lazy_cached_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":802
 *                 frv._set_nothreads(rv)
 *             return frv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_lazy_cached_f = decorate(future_lazy_cached_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 802, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":803
 *             return frv
 *         if decorate is not None:
 *             future_lazy_cached_f = decorate(future_lazy_cached_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 803, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_future_lazy_cached_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_future_lazy_cached_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_future_lazy_cached_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":802
 *                 frv._set_nothreads(rv)
 *             return frv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_lazy_cached_f = decorate(future_lazy_cached_f)
 * 
 */
  }

  /* "chorde/decorators.py":805
 *             future_lazy_cached_f = decorate(future_lazy_cached_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def future_peek_cached_f(*p, **kw):
 *             try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":806
 * 
 *         @wraps(of)
 *         def future_peek_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_23future_peek_cached_f, 0, __pyx_n_s_cached_locals_decor_locals_futur_12, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_future_peek_cached_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":860
 *                 frv._set_nothreads(rv)
 *             return frv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_peek_cached_f = decorate(future_peek_cached_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 860, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":861
 *             return frv
 *         if decorate is not None:
 *             future_peek_cached_f = decorate(future_peek_cached_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 861, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_future_peek_cached_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_future_peek_cached_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_future_peek_cached_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":860
 *                 frv._set_nothreads(rv)
 *             return frv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_peek_cached_f = decorate(future_peek_cached_f)
 * 
 */
  }

  /* "chorde/decorators.py":863
 *             future_peek_cached_f = decorate(future_peek_cached_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def future_get_ttl_f(*p, **kw):
 *             try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":864
 * 
 *         @wraps(of)
 *         def future_get_ttl_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_25future_get_ttl_f, 0, __pyx_n_s_cached_locals_decor_locals_futur_13, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_future_get_ttl_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":876
 *             #   (involves considerable overhead...)
 *             return fclient.getTtl(callkey, **get_kwargs)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_get_ttl_f = decorate(future_get_ttl_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 876, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":877
 *             return fclient.getTtl(callkey, **get_kwargs)
 *         if decorate is not None:
 *             future_get_ttl_f = decorate(future_get_ttl_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 877, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_future_get_ttl_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_future_get_ttl_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_future_get_ttl_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":876
 *             #   (involves considerable overhead...)
 *             return fclient.getTtl(callkey, **get_kwargs)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_get_ttl_f = decorate(future_get_ttl_f)
 * 
 */
  }

  /* "chorde/decorators.py":879
 *             future_get_ttl_f = decorate(future_get_ttl_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def invalidate_f(*p, **kw):
 *             if _initialize is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":880
 * 
 *         @wraps(of)
 *         def invalidate_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_27invalidate_f, 0, __pyx_n_s_cached_locals_decor_locals_inval, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_invalidate_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":890
 *                 return
 *             nclient.delete(callkey)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             invalidate_f = decorate(invalidate_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 890, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":891
 *             nclient.delete(callkey)
 *         if decorate is not None:
 *             invalidate_f = decorate(invalidate_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 891, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_invalidate_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_invalidate_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_invalidate_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":890
 *                 return
 *             nclient.delete(callkey)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             invalidate_f = decorate(invalidate_f)
 * 
 */
  }

  /* "chorde/decorators.py":893
 *             invalidate_f = decorate(invalidate_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def future_invalidate_f(*p, **kw):
 *             try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":894
 * 
 *         @wraps(of)
 *         def future_invalidate_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_29future_invalidate_f, 0, __pyx_n_s_cached_locals_decor_locals_futur_14, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_future_invalidate_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":902
 *                 return
 *             return fclient.delete(callkey)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_invalidate_f = decorate(future_invalidate_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 902, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":903
 *             return fclient.delete(callkey)
 *         if decorate is not None:
 *             future_invalidate_f = decorate(future_invalidate_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 903, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_future_invalidate_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_future_invalidate_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_future_invalidate_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":902
 *                 return
 *             return fclient.delete(callkey)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_invalidate_f = decorate(future_invalidate_f)
 * 
 */
  }

  /* "chorde/decorators.py":905
 *             future_invalidate_f = decorate(future_invalidate_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def expire_f(*p, **kw):
 *             if _initialize is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":906
 * 
 *         @wraps(of)
 *         def expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_31expire_f, 0, __pyx_n_s_cached_locals_decor_locals_expir, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_expire_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":916
 *                 return
 *             nclient.expire(callkey)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             expire_f = decorate(expire_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 916, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":917
 *             nclient.expire(callkey)
 *         if decorate is not None:
 *             expire_f = decorate(expire_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 917, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_expire_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_expire_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_expire_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":916
 *                 return
 *             nclient.expire(callkey)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             expire_f = decorate(expire_f)
 * 
 */
  }

  /* "chorde/decorators.py":919
 *             expire_f = decorate(expire_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def async_expire_f(*p, **kw):
 *             if _initialize is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":920
 * 
 *         @wraps(of)
 *         def async_expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_33async_expire_f, 0, __pyx_n_s_cached_locals_decor_locals_async_3, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_async_expire_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":930
 *                 return
 *             aclient.expire(callkey)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             async_expire_f = decorate(async_expire_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 930, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":931
 *             aclient.expire(callkey)
 *         if decorate is not None:
 *             async_expire_f = decorate(async_expire_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 931, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_async_expire_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_async_expire_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_async_expire_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":930
 *                 return
 *             aclient.expire(callkey)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             async_expire_f = decorate(async_expire_f)
 * 
 */
  }

  /* "chorde/decorators.py":933
 *             async_expire_f = decorate(async_expire_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def future_expire_f(*p, **kw):
 *             try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":934
 * 
 *         @wraps(of)
 *         def future_expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_35future_expire_f, 0, __pyx_n_s_cached_locals_decor_locals_futur_15, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_future_expire_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":942
 *                 return
 *             return fclient.expire(callkey)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_expire_f = decorate(future_expire_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 942, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":943
 *             return fclient.expire(callkey)
 *         if decorate is not None:
 *             future_expire_f = decorate(future_expire_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 943, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_future_expire_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_future_expire_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_future_expire_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":942
 *                 return
 *             return fclient.expire(callkey)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_expire_f = decorate(future_expire_f)
 * 
 */
  }

  /* "chorde/decorators.py":945
 *             future_expire_f = decorate(future_expire_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def put_f(*p, **kw):
 *             value = kw.pop('_cache_put')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":946
 * 
 *         @wraps(of)
 *         def put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_37put_f, 0, __pyx_n_s_cached_locals_decor_locals_put_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_put_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":958
 *                 return
 *             nclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             put_f = decorate(put_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 958, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":959
 *             nclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:
 *             put_f = decorate(put_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 959, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_put_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_put_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_put_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":958
 *                 return
 *             nclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             put_f = decorate(put_f)
 * 
 */
  }

  /* "chorde/decorators.py":961
 *             put_f = decorate(put_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def async_put_f(*p, **kw):
 *             if _initialize is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":962
 * 
 *         @wraps(of)
 *         def async_put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_39async_put_f, 0, __pyx_n_s_cached_locals_decor_locals_async_4, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_async_put_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":974
 *                 return
 *             aclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             async_put_f = decorate(async_put_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 974, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":975
 *             aclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:
 *             async_put_f = decorate(async_put_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 975, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_async_put_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_async_put_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_async_put_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":974
 *                 return
 *             aclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             async_put_f = decorate(async_put_f)
 * 
 */
  }

  /* "chorde/decorators.py":977
 *             async_put_f = decorate(async_put_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def future_put_f(*p, **kw):
 *             value = kw.pop('_cache_put')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":978
 * 
 *         @wraps(of)
 *         def future_put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_41future_put_f, 0, __pyx_n_s_cached_locals_decor_locals_futur_16, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_future_put_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":988
 *                 return
 *             return fclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_put_f = decorate(future_put_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 988, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":989
 *             return fclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:
 *             future_put_f = decorate(future_put_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 989, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_future_put_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_future_put_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_future_put_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":988
 *                 return
 *             return fclient.put(callkey, value, eff_ttl(), **(put_kwargs or EMPTY_KWARGS))
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_put_f = decorate(future_put_f)
 * 
 */
  }

  /* "chorde/decorators.py":991
 *             future_put_f = decorate(future_put_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def async_lazy_cached_f(*p, **kw):
 *             if _initialize is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":992
 * 
 *         @wraps(of)
 *         def async_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_43async_lazy_cached_f, 0, __pyx_n_s_cached_locals_decor_locals_async_5, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_async_lazy_cached_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1045
 *             else:
 *                 return rv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             async_lazy_cached_f = decorate(async_lazy_cached_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 1045, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1046
 *                 return rv
 *         if decorate is not None:
 *             async_lazy_cached_f = decorate(async_lazy_cached_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 1046, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_async_lazy_cached_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_async_lazy_cached_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_async_lazy_cached_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":1045
 *             else:
 *                 return rv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             async_lazy_cached_f = decorate(async_lazy_cached_f)
 * 
 */
  }

  /* "chorde/decorators.py":1048
 *             async_lazy_cached_f = decorate(async_lazy_cached_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def refresh_f(*p, **kw):
 *             if _initialize is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":1049
 * 
 *         @wraps(of)
 *         def refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_45refresh_f, 0, __pyx_n_s_cached_locals_decor_locals_refre, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_refresh_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1063
 *             nclient.put(callkey, rv, eff_ttl())
 *             return rv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             refresh_f = decorate(refresh_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 1063, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1064
 *             return rv
 *         if decorate is not None:
 *             refresh_f = decorate(refresh_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 1064, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_refresh_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_refresh_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_refresh_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":1063
 *             nclient.put(callkey, rv, eff_ttl())
 *             return rv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             refresh_f = decorate(refresh_f)
 * 
 */
  }

  /* "chorde/decorators.py":1066
 *             refresh_f = decorate(refresh_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def async_refresh_f(*p, **kw):
 *             if _initialize is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":1067
 * 
 *         @wraps(of)
 *         def async_refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_47async_refresh_f, 0, __pyx_n_s_cached_locals_decor_locals_async_6, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_async_refresh_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1081
 *             if not client.contains(callkey, 0):
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             async_refresh_f = decorate(async_refresh_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 1081, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1082
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *         if decorate is not None:
 *             async_refresh_f = decorate(async_refresh_f)             # <<<<<<<<<<<<<<
 * 
 *         @wraps(of)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 1082, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_async_refresh_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_async_refresh_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_async_refresh_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":1081
 *             if not client.contains(callkey, 0):
 *                 _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             async_refresh_f = decorate(async_refresh_f)
 * 
 */
  }

  /* "chorde/decorators.py":1084
 *             async_refresh_f = decorate(async_refresh_f)
 * 
 *         @wraps(of)             # <<<<<<<<<<<<<<
 *         def future_refresh_f(*p, **kw):
 *             try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_of) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_of);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":1085
 * 
 *         @wraps(of)
 *         def future_refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_49future_refresh_f, 0, __pyx_n_s_cached_locals_decor_locals_futur_17, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_future_refresh_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1097
 *             _fput_deferred(frv, aclient, af, callkey, eff_ttl(), *p, **kw)
 *             return frv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_refresh_f = decorate(future_refresh_f)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 1097, __pyx_L1_error) }
  __pyx_t_2 = (__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1098
 *             return frv
 *         if decorate is not None:
 *             future_refresh_f = decorate(future_refresh_f)             # <<<<<<<<<<<<<<
 * 
 *         if client.is_async:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 1098, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate);
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_decorate; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_future_refresh_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_future_refresh_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_future_refresh_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":1097
 *             _fput_deferred(frv, aclient, af, callkey, eff_ttl(), *p, **kw)
 *             return frv
 *         if decorate is not None:             # <<<<<<<<<<<<<<
 *             future_refresh_f = decorate(future_refresh_f)
 * 
 */
  }

  /* "chorde/decorators.py":1100
 *             future_refresh_f = decorate(future_refresh_f)
 * 
 *         if client.is_async:             # <<<<<<<<<<<<<<
 *             cached_f = async_cached_f
 *             lazy_cached_f = async_lazy_cached_f
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 1100, __pyx_L1_error) }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_client, __pyx_n_s_is_async); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1101
 * 
 *         if client.is_async:
 *             cached_f = async_cached_f             # <<<<<<<<<<<<<<
 *             lazy_cached_f = async_lazy_cached_f
 *         elif nasync_client:
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_cached_f);
    __Pyx_DECREF_SET(__pyx_v_cached_f, __pyx_cur_scope->__pyx_v_async_cached_f);

    /* "chorde/decorators.py":1102
 *         if client.is_async:
 *             cached_f = async_cached_f
 *             lazy_cached_f = async_lazy_cached_f             # <<<<<<<<<<<<<<
 *         elif nasync_client:
 *             aclient = nasync_client
 */
    __Pyx_INCREF(__pyx_v_async_lazy_cached_f);
    __Pyx_DECREF_SET(__pyx_v_lazy_cached_f, __pyx_v_async_lazy_cached_f);

    /* "chorde/decorators.py":1100
 *             future_refresh_f = decorate(future_refresh_f)
 * 
 *         if client.is_async:             # <<<<<<<<<<<<<<
 *             cached_f = async_cached_f
 *             lazy_cached_f = async_lazy_cached_f
 */
    goto __pyx_L29;
  }

  /* "chorde/decorators.py":1103
 *             cached_f = async_cached_f
 *             lazy_cached_f = async_lazy_cached_f
 *         elif nasync_client:             # <<<<<<<<<<<<<<
 *             aclient = nasync_client
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_nasync_client); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1103, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1104
 *             lazy_cached_f = async_lazy_cached_f
 *         elif nasync_client:
 *             aclient = nasync_client             # <<<<<<<<<<<<<<
 *         else:
 *             aclient = None
 */
    __Pyx_INCREF(__pyx_v_nasync_client);
    __Pyx_GIVEREF(__pyx_v_nasync_client);
    __pyx_cur_scope->__pyx_v_aclient = __pyx_v_nasync_client;

    /* "chorde/decorators.py":1103
 *             cached_f = async_cached_f
 *             lazy_cached_f = async_lazy_cached_f
 *         elif nasync_client:             # <<<<<<<<<<<<<<
 *             aclient = nasync_client
 *         else:
 */
    goto __pyx_L29;
  }

  /* "chorde/decorators.py":1106
 *             aclient = nasync_client
 *         else:
 *             aclient = None             # <<<<<<<<<<<<<<
 * 
 *         promote_callbacks = []
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __pyx_cur_scope->__pyx_v_aclient = Py_None;
  }
  __pyx_L29:;

  /* "chorde/decorators.py":1108
 *             aclient = None
 * 
 *         promote_callbacks = []             # <<<<<<<<<<<<<<
 *         value_callbacks = []
 *         get_kwargs = {}
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_cur_scope->__pyx_v_promote_callbacks = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1109
 * 
 *         promote_callbacks = []
 *         value_callbacks = []             # <<<<<<<<<<<<<<
 *         get_kwargs = {}
 *         def _promote_callback(*p, **kw):
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_cur_scope->__pyx_v_value_callbacks = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1110
 *         promote_callbacks = []
 *         value_callbacks = []
 *         get_kwargs = {}             # <<<<<<<<<<<<<<
 *         def _promote_callback(*p, **kw):
 *             for cb in promote_callbacks:
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_cur_scope->__pyx_v_get_kwargs = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1111
 *         value_callbacks = []
 *         get_kwargs = {}
 *         def _promote_callback(*p, **kw):             # <<<<<<<<<<<<<<
 *             for cb in promote_callbacks:
 *                 cb(*p, **kw)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_51_promote_callback, 0, __pyx_n_s_cached_locals_decor_locals__prom, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_cur_scope->__pyx_v__promote_callback = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1114
 *             for cb in promote_callbacks:
 *                 cb(*p, **kw)
 *         def _value_callback(*p, **kw):             # <<<<<<<<<<<<<<
 *             for cb in value_callbacks:
 *                 cb(*p, **kw)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_53_value_callback, 0, __pyx_n_s_cached_locals_decor_locals__valu, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_cur_scope->__pyx_v__value_callback = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1117
 *             for cb in value_callbacks:
 *                 cb(*p, **kw)
 *         def on_promote_f(callback):             # <<<<<<<<<<<<<<
 *             promote_callbacks.append(callback)
 *             get_kwargs.setdefault('promote_callback', _promote_callback)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_55on_promote_f, 0, __pyx_n_s_cached_locals_decor_locals_on_pr, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_on_promote_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1123
 *             eget_async_lazy_recheck_kwargs.setdefault('promote_callback', _promote_callback)
 *             return callback
 *         def on_value_f(callback):             # <<<<<<<<<<<<<<
 *             value_callbacks.append(callback)
 *             return callback
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_57on_value_f, 0, __pyx_n_s_cached_locals_decor_locals_on_va, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_on_value_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1127
 *             return callback
 * 
 *         placeholder_value_fn_cell = []             # <<<<<<<<<<<<<<
 *         def placeholder_value_f(fn):
 *             placeholder_value_fn_cell[:] = [fn]
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_cur_scope->__pyx_v_placeholder_value_fn_cell = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1128
 * 
 *         placeholder_value_fn_cell = []
 *         def placeholder_value_f(fn):             # <<<<<<<<<<<<<<
 *             placeholder_value_fn_cell[:] = [fn]
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_59placeholder_value_f, 0, __pyx_n_s_cached_locals_decor_locals_place, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_placeholder_value_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1131
 *             placeholder_value_fn_cell[:] = [fn]
 * 
 *         fclient = None             # <<<<<<<<<<<<<<
 *         def future_f(initialize = True):
 *             nonlocal fclient
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __pyx_cur_scope->__pyx_v_fclient = Py_None;

  /* "chorde/decorators.py":1132
 * 
 *         fclient = None
 *         def future_f(initialize = True):             # <<<<<<<<<<<<<<
 *             nonlocal fclient
 *             if _initialize is not None:
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_61future_f, 0, __pyx_n_s_cached_locals_decor_locals_futur_18, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__104);
  __pyx_v_future_f = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "chorde/decorators.py":1153
 *             return future_cached_f
 * 
 *         if not client.is_async:             # <<<<<<<<<<<<<<
 *             def async_f(initialize = True):
 *                 nonlocal aclient
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_client)) { __Pyx_RaiseClosureNameError("client"); __PYX_ERR(0, 1153, __pyx_L1_error) }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_client, __pyx_n_s_is_async); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1154
 * 
 *         if not client.is_async:
 *             def async_f(initialize = True):             # <<<<<<<<<<<<<<
 *                 nonlocal aclient
 *                 if _initialize is not None:
 */
    __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_63async_f, 0, __pyx_n_s_cached_locals_decor_locals_async_7, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__107);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_cur_scope->__pyx_v_async_f = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":1166
 *                     async_cached_f.client = aclient
 *                 return async_cached_f
 *             async_cached_f.clear = nclient.clear             # <<<<<<<<<<<<<<
 *             async_cached_f.client = aclient if aclient is not None else None
 *             async_cached_f.bg = weakref.ref(async_cached_f)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_clear, __pyx_t_5) < 0) __PYX_ERR(0, 1166, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":1167
 *                 return async_cached_f
 *             async_cached_f.clear = nclient.clear
 *             async_cached_f.client = aclient if aclient is not None else None             # <<<<<<<<<<<<<<
 *             async_cached_f.bg = weakref.ref(async_cached_f)
 *             async_cached_f.lazy = async_lazy_cached_f
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseUnboundLocalError("aclient"); __PYX_ERR(0, 1167, __pyx_L1_error) }
    __pyx_t_2 = (__pyx_cur_scope->__pyx_v_aclient != Py_None);
    if ((__pyx_t_2 != 0)) {
      if (unlikely(!__pyx_cur_scope->__pyx_v_aclient)) { __Pyx_RaiseUnboundLocalError("aclient"); __PYX_ERR(0, 1167, __pyx_L1_error) }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_aclient);
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_aclient;
    } else {
      __Pyx_INCREF(Py_None);
      __pyx_t_5 = Py_None;
    }
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_client, __pyx_t_5) < 0) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":1168
 *             async_cached_f.clear = nclient.clear
 *             async_cached_f.client = aclient if aclient is not None else None
 *             async_cached_f.bg = weakref.ref(async_cached_f)             # <<<<<<<<<<<<<<
 *             async_cached_f.lazy = async_lazy_cached_f
 *             async_cached_f.refresh = async_refresh_f
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_weakref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ref); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_cur_scope->__pyx_v_async_cached_f) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_async_cached_f);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_bg, __pyx_t_5) < 0) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":1169
 *             async_cached_f.client = aclient if aclient is not None else None
 *             async_cached_f.bg = weakref.ref(async_cached_f)
 *             async_cached_f.lazy = async_lazy_cached_f             # <<<<<<<<<<<<<<
 *             async_cached_f.refresh = async_refresh_f
 *             async_cached_f.peek = peek_cached_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_lazy, __pyx_v_async_lazy_cached_f) < 0) __PYX_ERR(0, 1169, __pyx_L1_error)

    /* "chorde/decorators.py":1170
 *             async_cached_f.bg = weakref.ref(async_cached_f)
 *             async_cached_f.lazy = async_lazy_cached_f
 *             async_cached_f.refresh = async_refresh_f             # <<<<<<<<<<<<<<
 *             async_cached_f.peek = peek_cached_f
 *             async_cached_f.invalidate = invalidate_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_refresh, __pyx_v_async_refresh_f) < 0) __PYX_ERR(0, 1170, __pyx_L1_error)

    /* "chorde/decorators.py":1171
 *             async_cached_f.lazy = async_lazy_cached_f
 *             async_cached_f.refresh = async_refresh_f
 *             async_cached_f.peek = peek_cached_f             # <<<<<<<<<<<<<<
 *             async_cached_f.invalidate = invalidate_f
 *             async_cached_f.expire = async_expire_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_peek, __pyx_v_peek_cached_f) < 0) __PYX_ERR(0, 1171, __pyx_L1_error)

    /* "chorde/decorators.py":1172
 *             async_cached_f.refresh = async_refresh_f
 *             async_cached_f.peek = peek_cached_f
 *             async_cached_f.invalidate = invalidate_f             # <<<<<<<<<<<<<<
 *             async_cached_f.expire = async_expire_f
 *             async_cached_f.uncached = of
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_invalidate, __pyx_v_invalidate_f) < 0) __PYX_ERR(0, 1172, __pyx_L1_error)

    /* "chorde/decorators.py":1173
 *             async_cached_f.peek = peek_cached_f
 *             async_cached_f.invalidate = invalidate_f
 *             async_cached_f.expire = async_expire_f             # <<<<<<<<<<<<<<
 *             async_cached_f.uncached = of
 *             async_cached_f.put = async_put_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_expire, __pyx_v_async_expire_f) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)

    /* "chorde/decorators.py":1174
 *             async_cached_f.invalidate = invalidate_f
 *             async_cached_f.expire = async_expire_f
 *             async_cached_f.uncached = of             # <<<<<<<<<<<<<<
 *             async_cached_f.put = async_put_f
 *             async_cached_f.ttl = ttl
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_uncached, __pyx_cur_scope->__pyx_v_of) < 0) __PYX_ERR(0, 1174, __pyx_L1_error)

    /* "chorde/decorators.py":1175
 *             async_cached_f.expire = async_expire_f
 *             async_cached_f.uncached = of
 *             async_cached_f.put = async_put_f             # <<<<<<<<<<<<<<
 *             async_cached_f.ttl = ttl
 *             async_cached_f.async_ttl = async_ttl
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_put, __pyx_v_async_put_f) < 0) __PYX_ERR(0, 1175, __pyx_L1_error)

    /* "chorde/decorators.py":1176
 *             async_cached_f.uncached = of
 *             async_cached_f.put = async_put_f
 *             async_cached_f.ttl = ttl             # <<<<<<<<<<<<<<
 *             async_cached_f.async_ttl = async_ttl
 *             async_cached_f.callkey = key
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl)) { __Pyx_RaiseClosureNameError("ttl"); __PYX_ERR(0, 1176, __pyx_L1_error) }
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl) < 0) __PYX_ERR(0, 1176, __pyx_L1_error)

    /* "chorde/decorators.py":1177
 *             async_cached_f.put = async_put_f
 *             async_cached_f.ttl = ttl
 *             async_cached_f.async_ttl = async_ttl             # <<<<<<<<<<<<<<
 *             async_cached_f.callkey = key
 *             async_cached_f.stats = stats
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 1177, __pyx_L1_error) }
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl) < 0) __PYX_ERR(0, 1177, __pyx_L1_error)

    /* "chorde/decorators.py":1178
 *             async_cached_f.ttl = ttl
 *             async_cached_f.async_ttl = async_ttl
 *             async_cached_f.callkey = key             # <<<<<<<<<<<<<<
 *             async_cached_f.stats = stats
 *             async_cached_f.get_ttl = get_ttl_f
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 1178, __pyx_L1_error) }
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_callkey, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key) < 0) __PYX_ERR(0, 1178, __pyx_L1_error)

    /* "chorde/decorators.py":1179
 *             async_cached_f.async_ttl = async_ttl
 *             async_cached_f.callkey = key
 *             async_cached_f.stats = stats             # <<<<<<<<<<<<<<
 *             async_cached_f.get_ttl = get_ttl_f
 *             async_cached_f._promote_callbacks = promote_callbacks
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_stats, ((PyObject *)__pyx_cur_scope->__pyx_v_stats)) < 0) __PYX_ERR(0, 1179, __pyx_L1_error)

    /* "chorde/decorators.py":1180
 *             async_cached_f.callkey = key
 *             async_cached_f.stats = stats
 *             async_cached_f.get_ttl = get_ttl_f             # <<<<<<<<<<<<<<
 *             async_cached_f._promote_callbacks = promote_callbacks
 *             async_cached_f._value_callbacks = value_callbacks
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_get_ttl, __pyx_v_get_ttl_f) < 0) __PYX_ERR(0, 1180, __pyx_L1_error)

    /* "chorde/decorators.py":1181
 *             async_cached_f.stats = stats
 *             async_cached_f.get_ttl = get_ttl_f
 *             async_cached_f._promote_callbacks = promote_callbacks             # <<<<<<<<<<<<<<
 *             async_cached_f._value_callbacks = value_callbacks
 *             async_cached_f.on_promote = on_promote_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_promote_callbacks, __pyx_cur_scope->__pyx_v_promote_callbacks) < 0) __PYX_ERR(0, 1181, __pyx_L1_error)

    /* "chorde/decorators.py":1182
 *             async_cached_f.get_ttl = get_ttl_f
 *             async_cached_f._promote_callbacks = promote_callbacks
 *             async_cached_f._value_callbacks = value_callbacks             # <<<<<<<<<<<<<<
 *             async_cached_f.on_promote = on_promote_f
 *             async_cached_f.on_value = on_value_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_value_callbacks, __pyx_cur_scope->__pyx_v_value_callbacks) < 0) __PYX_ERR(0, 1182, __pyx_L1_error)

    /* "chorde/decorators.py":1183
 *             async_cached_f._promote_callbacks = promote_callbacks
 *             async_cached_f._value_callbacks = value_callbacks
 *             async_cached_f.on_promote = on_promote_f             # <<<<<<<<<<<<<<
 *             async_cached_f.on_value = on_value_f
 *             async_cached_f.placeholder_value = placeholder_value_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_on_promote, __pyx_v_on_promote_f) < 0) __PYX_ERR(0, 1183, __pyx_L1_error)

    /* "chorde/decorators.py":1184
 *             async_cached_f._value_callbacks = value_callbacks
 *             async_cached_f.on_promote = on_promote_f
 *             async_cached_f.on_value = on_value_f             # <<<<<<<<<<<<<<
 *             async_cached_f.placeholder_value = placeholder_value_f
 *             cached_f.bg = async_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_on_value, __pyx_v_on_value_f) < 0) __PYX_ERR(0, 1184, __pyx_L1_error)

    /* "chorde/decorators.py":1185
 *             async_cached_f.on_promote = on_promote_f
 *             async_cached_f.on_value = on_value_f
 *             async_cached_f.placeholder_value = placeholder_value_f             # <<<<<<<<<<<<<<
 *             cached_f.bg = async_f
 *             cached_f.lazy = lazy_cached_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_async_cached_f, __pyx_n_s_placeholder_value, __pyx_v_placeholder_value_f) < 0) __PYX_ERR(0, 1185, __pyx_L1_error)

    /* "chorde/decorators.py":1186
 *             async_cached_f.on_value = on_value_f
 *             async_cached_f.placeholder_value = placeholder_value_f
 *             cached_f.bg = async_f             # <<<<<<<<<<<<<<
 *             cached_f.lazy = lazy_cached_f
 *             cached_f.refresh = refresh_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_bg, __pyx_cur_scope->__pyx_v_async_f) < 0) __PYX_ERR(0, 1186, __pyx_L1_error)

    /* "chorde/decorators.py":1187
 *             async_cached_f.placeholder_value = placeholder_value_f
 *             cached_f.bg = async_f
 *             cached_f.lazy = lazy_cached_f             # <<<<<<<<<<<<<<
 *             cached_f.refresh = refresh_f
 *             cached_f.peek = peek_cached_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_lazy, __pyx_v_lazy_cached_f) < 0) __PYX_ERR(0, 1187, __pyx_L1_error)

    /* "chorde/decorators.py":1188
 *             cached_f.bg = async_f
 *             cached_f.lazy = lazy_cached_f
 *             cached_f.refresh = refresh_f             # <<<<<<<<<<<<<<
 *             cached_f.peek = peek_cached_f
 *             cached_f.invalidate = invalidate_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_refresh, __pyx_v_refresh_f) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)

    /* "chorde/decorators.py":1189
 *             cached_f.lazy = lazy_cached_f
 *             cached_f.refresh = refresh_f
 *             cached_f.peek = peek_cached_f             # <<<<<<<<<<<<<<
 *             cached_f.invalidate = invalidate_f
 *             cached_f.expire = expire_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_peek, __pyx_v_peek_cached_f) < 0) __PYX_ERR(0, 1189, __pyx_L1_error)

    /* "chorde/decorators.py":1190
 *             cached_f.refresh = refresh_f
 *             cached_f.peek = peek_cached_f
 *             cached_f.invalidate = invalidate_f             # <<<<<<<<<<<<<<
 *             cached_f.expire = expire_f
 *             cached_f.put = put_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_invalidate, __pyx_v_invalidate_f) < 0) __PYX_ERR(0, 1190, __pyx_L1_error)

    /* "chorde/decorators.py":1191
 *             cached_f.peek = peek_cached_f
 *             cached_f.invalidate = invalidate_f
 *             cached_f.expire = expire_f             # <<<<<<<<<<<<<<
 *             cached_f.put = put_f
 *         else:
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_expire, __pyx_v_expire_f) < 0) __PYX_ERR(0, 1191, __pyx_L1_error)

    /* "chorde/decorators.py":1192
 *             cached_f.invalidate = invalidate_f
 *             cached_f.expire = expire_f
 *             cached_f.put = put_f             # <<<<<<<<<<<<<<
 *         else:
 *             aclient = nclient
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_put, __pyx_v_put_f) < 0) __PYX_ERR(0, 1192, __pyx_L1_error)

    /* "chorde/decorators.py":1153
 *             return future_cached_f
 * 
 *         if not client.is_async:             # <<<<<<<<<<<<<<
 *             def async_f(initialize = True):
 *                 nonlocal aclient
 */
    goto __pyx_L30;
  }

  /* "chorde/decorators.py":1194
 *             cached_f.put = put_f
 *         else:
 *             aclient = nclient             # <<<<<<<<<<<<<<
 *             cached_f.bg = async_f = weakref.ref(cached_f)
 *             cached_f.lazy = async_lazy_cached_f
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_nclient);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_aclient);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_aclient, __pyx_cur_scope->__pyx_v_nclient);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_nclient);

    /* "chorde/decorators.py":1195
 *         else:
 *             aclient = nclient
 *             cached_f.bg = async_f = weakref.ref(cached_f)             # <<<<<<<<<<<<<<
 *             cached_f.lazy = async_lazy_cached_f
 *             cached_f.refresh = async_refresh_f
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_weakref); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_cached_f) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_cached_f);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_bg, __pyx_t_5) < 0) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_cur_scope->__pyx_v_async_f = __pyx_t_5;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "chorde/decorators.py":1196
 *             aclient = nclient
 *             cached_f.bg = async_f = weakref.ref(cached_f)
 *             cached_f.lazy = async_lazy_cached_f             # <<<<<<<<<<<<<<
 *             cached_f.refresh = async_refresh_f
 *             cached_f.peek = peek_cached_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_lazy, __pyx_v_async_lazy_cached_f) < 0) __PYX_ERR(0, 1196, __pyx_L1_error)

    /* "chorde/decorators.py":1197
 *             cached_f.bg = async_f = weakref.ref(cached_f)
 *             cached_f.lazy = async_lazy_cached_f
 *             cached_f.refresh = async_refresh_f             # <<<<<<<<<<<<<<
 *             cached_f.peek = peek_cached_f
 *             cached_f.invalidate = invalidate_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_refresh, __pyx_v_async_refresh_f) < 0) __PYX_ERR(0, 1197, __pyx_L1_error)

    /* "chorde/decorators.py":1198
 *             cached_f.lazy = async_lazy_cached_f
 *             cached_f.refresh = async_refresh_f
 *             cached_f.peek = peek_cached_f             # <<<<<<<<<<<<<<
 *             cached_f.invalidate = invalidate_f
 *             cached_f.expire = expire_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_peek, __pyx_v_peek_cached_f) < 0) __PYX_ERR(0, 1198, __pyx_L1_error)

    /* "chorde/decorators.py":1199
 *             cached_f.refresh = async_refresh_f
 *             cached_f.peek = peek_cached_f
 *             cached_f.invalidate = invalidate_f             # <<<<<<<<<<<<<<
 *             cached_f.expire = expire_f
 *             cached_f.put = async_put_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_invalidate, __pyx_v_invalidate_f) < 0) __PYX_ERR(0, 1199, __pyx_L1_error)

    /* "chorde/decorators.py":1200
 *             cached_f.peek = peek_cached_f
 *             cached_f.invalidate = invalidate_f
 *             cached_f.expire = expire_f             # <<<<<<<<<<<<<<
 *             cached_f.put = async_put_f
 * 
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_expire, __pyx_v_expire_f) < 0) __PYX_ERR(0, 1200, __pyx_L1_error)

    /* "chorde/decorators.py":1201
 *             cached_f.invalidate = invalidate_f
 *             cached_f.expire = expire_f
 *             cached_f.put = async_put_f             # <<<<<<<<<<<<<<
 * 
 *         cached_f.future = future_f
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_put, __pyx_v_async_put_f) < 0) __PYX_ERR(0, 1201, __pyx_L1_error)
  }
  __pyx_L30:;

  /* "chorde/decorators.py":1203
 *             cached_f.put = async_put_f
 * 
 *         cached_f.future = future_f             # <<<<<<<<<<<<<<
 *         cached_f.clear = nclient.clear
 *         cached_f.client = nclient
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_future, __pyx_v_future_f) < 0) __PYX_ERR(0, 1203, __pyx_L1_error)

  /* "chorde/decorators.py":1204
 * 
 *         cached_f.future = future_f
 *         cached_f.clear = nclient.clear             # <<<<<<<<<<<<<<
 *         cached_f.client = nclient
 *         cached_f.ttl = ttl
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_nclient, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_clear, __pyx_t_5) < 0) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "chorde/decorators.py":1205
 *         cached_f.future = future_f
 *         cached_f.clear = nclient.clear
 *         cached_f.client = nclient             # <<<<<<<<<<<<<<
 *         cached_f.ttl = ttl
 *         cached_f.async_ttl = async_ttl or ttl
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_client, __pyx_cur_scope->__pyx_v_nclient) < 0) __PYX_ERR(0, 1205, __pyx_L1_error)

  /* "chorde/decorators.py":1206
 *         cached_f.clear = nclient.clear
 *         cached_f.client = nclient
 *         cached_f.ttl = ttl             # <<<<<<<<<<<<<<
 *         cached_f.async_ttl = async_ttl or ttl
 *         cached_f.callkey = key
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl)) { __Pyx_RaiseClosureNameError("ttl"); __PYX_ERR(0, 1206, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl) < 0) __PYX_ERR(0, 1206, __pyx_L1_error)

  /* "chorde/decorators.py":1207
 *         cached_f.client = nclient
 *         cached_f.ttl = ttl
 *         cached_f.async_ttl = async_ttl or ttl             # <<<<<<<<<<<<<<
 *         cached_f.callkey = key
 *         cached_f.stats = stats
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 1207, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1207, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl);
    __pyx_t_5 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl;
    goto __pyx_L31_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl)) { __Pyx_RaiseClosureNameError("ttl"); __PYX_ERR(0, 1207, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl);
  __pyx_t_5 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl;
  __pyx_L31_bool_binop_done:;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_async_ttl, __pyx_t_5) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "chorde/decorators.py":1208
 *         cached_f.ttl = ttl
 *         cached_f.async_ttl = async_ttl or ttl
 *         cached_f.callkey = key             # <<<<<<<<<<<<<<
 *         cached_f.stats = stats
 *         cached_f.uncached = of
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 1208, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_callkey, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key) < 0) __PYX_ERR(0, 1208, __pyx_L1_error)

  /* "chorde/decorators.py":1209
 *         cached_f.async_ttl = async_ttl or ttl
 *         cached_f.callkey = key
 *         cached_f.stats = stats             # <<<<<<<<<<<<<<
 *         cached_f.uncached = of
 *         cached_f.get_ttl = get_ttl_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_stats, ((PyObject *)__pyx_cur_scope->__pyx_v_stats)) < 0) __PYX_ERR(0, 1209, __pyx_L1_error)

  /* "chorde/decorators.py":1210
 *         cached_f.callkey = key
 *         cached_f.stats = stats
 *         cached_f.uncached = of             # <<<<<<<<<<<<<<
 *         cached_f.get_ttl = get_ttl_f
 *         cached_f._promote_callbacks = promote_callbacks
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_uncached, __pyx_cur_scope->__pyx_v_of) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)

  /* "chorde/decorators.py":1211
 *         cached_f.stats = stats
 *         cached_f.uncached = of
 *         cached_f.get_ttl = get_ttl_f             # <<<<<<<<<<<<<<
 *         cached_f._promote_callbacks = promote_callbacks
 *         cached_f._value_callbacks = value_callbacks
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_get_ttl, __pyx_v_get_ttl_f) < 0) __PYX_ERR(0, 1211, __pyx_L1_error)

  /* "chorde/decorators.py":1212
 *         cached_f.uncached = of
 *         cached_f.get_ttl = get_ttl_f
 *         cached_f._promote_callbacks = promote_callbacks             # <<<<<<<<<<<<<<
 *         cached_f._value_callbacks = value_callbacks
 *         cached_f.on_promote = on_promote_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_promote_callbacks, __pyx_cur_scope->__pyx_v_promote_callbacks) < 0) __PYX_ERR(0, 1212, __pyx_L1_error)

  /* "chorde/decorators.py":1213
 *         cached_f.get_ttl = get_ttl_f
 *         cached_f._promote_callbacks = promote_callbacks
 *         cached_f._value_callbacks = value_callbacks             # <<<<<<<<<<<<<<
 *         cached_f.on_promote = on_promote_f
 *         cached_f.on_value = on_value_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_value_callbacks, __pyx_cur_scope->__pyx_v_value_callbacks) < 0) __PYX_ERR(0, 1213, __pyx_L1_error)

  /* "chorde/decorators.py":1214
 *         cached_f._promote_callbacks = promote_callbacks
 *         cached_f._value_callbacks = value_callbacks
 *         cached_f.on_promote = on_promote_f             # <<<<<<<<<<<<<<
 *         cached_f.on_value = on_value_f
 *         cached_f.placeholder_value = placeholder_value_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_on_promote, __pyx_v_on_promote_f) < 0) __PYX_ERR(0, 1214, __pyx_L1_error)

  /* "chorde/decorators.py":1215
 *         cached_f._value_callbacks = value_callbacks
 *         cached_f.on_promote = on_promote_f
 *         cached_f.on_value = on_value_f             # <<<<<<<<<<<<<<
 *         cached_f.placeholder_value = placeholder_value_f
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_on_value, __pyx_v_on_value_f) < 0) __PYX_ERR(0, 1215, __pyx_L1_error)

  /* "chorde/decorators.py":1216
 *         cached_f.on_promote = on_promote_f
 *         cached_f.on_value = on_value_f
 *         cached_f.placeholder_value = placeholder_value_f             # <<<<<<<<<<<<<<
 * 
 *         future_cached_f.clear = lambda : fclient.clear()
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cached_f, __pyx_n_s_placeholder_value, __pyx_v_placeholder_value_f) < 0) __PYX_ERR(0, 1216, __pyx_L1_error)

  /* "chorde/decorators.py":1218
 *         cached_f.placeholder_value = placeholder_value_f
 * 
 *         future_cached_f.clear = lambda : fclient.clear()             # <<<<<<<<<<<<<<
 *         future_cached_f.client = None
 *         future_cached_f.bg = cached_f.bg
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_5decor_64lambda6, 0, __pyx_n_s_cached_locals_decor_locals_lambd, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_clear, __pyx_t_5) < 0) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "chorde/decorators.py":1219
 * 
 *         future_cached_f.clear = lambda : fclient.clear()
 *         future_cached_f.client = None             # <<<<<<<<<<<<<<
 *         future_cached_f.bg = cached_f.bg
 *         future_cached_f.lazy = future_lazy_cached_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_client, Py_None) < 0) __PYX_ERR(0, 1219, __pyx_L1_error)

  /* "chorde/decorators.py":1220
 *         future_cached_f.clear = lambda : fclient.clear()
 *         future_cached_f.client = None
 *         future_cached_f.bg = cached_f.bg             # <<<<<<<<<<<<<<
 *         future_cached_f.lazy = future_lazy_cached_f
 *         future_cached_f.refresh = future_refresh_f
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cached_f, __pyx_n_s_bg); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_bg, __pyx_t_5) < 0) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "chorde/decorators.py":1221
 *         future_cached_f.client = None
 *         future_cached_f.bg = cached_f.bg
 *         future_cached_f.lazy = future_lazy_cached_f             # <<<<<<<<<<<<<<
 *         future_cached_f.refresh = future_refresh_f
 *         future_cached_f.peek = future_peek_cached_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_lazy, __pyx_v_future_lazy_cached_f) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)

  /* "chorde/decorators.py":1222
 *         future_cached_f.bg = cached_f.bg
 *         future_cached_f.lazy = future_lazy_cached_f
 *         future_cached_f.refresh = future_refresh_f             # <<<<<<<<<<<<<<
 *         future_cached_f.peek = future_peek_cached_f
 *         future_cached_f.invalidate = future_invalidate_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_refresh, __pyx_v_future_refresh_f) < 0) __PYX_ERR(0, 1222, __pyx_L1_error)

  /* "chorde/decorators.py":1223
 *         future_cached_f.lazy = future_lazy_cached_f
 *         future_cached_f.refresh = future_refresh_f
 *         future_cached_f.peek = future_peek_cached_f             # <<<<<<<<<<<<<<
 *         future_cached_f.invalidate = future_invalidate_f
 *         future_cached_f.expire = future_expire_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_peek, __pyx_v_future_peek_cached_f) < 0) __PYX_ERR(0, 1223, __pyx_L1_error)

  /* "chorde/decorators.py":1224
 *         future_cached_f.refresh = future_refresh_f
 *         future_cached_f.peek = future_peek_cached_f
 *         future_cached_f.invalidate = future_invalidate_f             # <<<<<<<<<<<<<<
 *         future_cached_f.expire = future_expire_f
 *         future_cached_f.put = future_put_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_invalidate, __pyx_v_future_invalidate_f) < 0) __PYX_ERR(0, 1224, __pyx_L1_error)

  /* "chorde/decorators.py":1225
 *         future_cached_f.peek = future_peek_cached_f
 *         future_cached_f.invalidate = future_invalidate_f
 *         future_cached_f.expire = future_expire_f             # <<<<<<<<<<<<<<
 *         future_cached_f.put = future_put_f
 *         future_cached_f.ttl = ttl
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_expire, __pyx_v_future_expire_f) < 0) __PYX_ERR(0, 1225, __pyx_L1_error)

  /* "chorde/decorators.py":1226
 *         future_cached_f.invalidate = future_invalidate_f
 *         future_cached_f.expire = future_expire_f
 *         future_cached_f.put = future_put_f             # <<<<<<<<<<<<<<
 *         future_cached_f.ttl = ttl
 *         future_cached_f.async_ttl = async_ttl
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_put, __pyx_v_future_put_f) < 0) __PYX_ERR(0, 1226, __pyx_L1_error)

  /* "chorde/decorators.py":1227
 *         future_cached_f.expire = future_expire_f
 *         future_cached_f.put = future_put_f
 *         future_cached_f.ttl = ttl             # <<<<<<<<<<<<<<
 *         future_cached_f.async_ttl = async_ttl
 *         future_cached_f.callkey = key
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl)) { __Pyx_RaiseClosureNameError("ttl"); __PYX_ERR(0, 1227, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_ttl) < 0) __PYX_ERR(0, 1227, __pyx_L1_error)

  /* "chorde/decorators.py":1228
 *         future_cached_f.put = future_put_f
 *         future_cached_f.ttl = ttl
 *         future_cached_f.async_ttl = async_ttl             # <<<<<<<<<<<<<<
 *         future_cached_f.callkey = key
 *         future_cached_f.stats = stats
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 1228, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_async_ttl, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_async_ttl) < 0) __PYX_ERR(0, 1228, __pyx_L1_error)

  /* "chorde/decorators.py":1229
 *         future_cached_f.ttl = ttl
 *         future_cached_f.async_ttl = async_ttl
 *         future_cached_f.callkey = key             # <<<<<<<<<<<<<<
 *         future_cached_f.stats = stats
 *         future_cached_f.uncached = of
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 1229, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_callkey, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_key) < 0) __PYX_ERR(0, 1229, __pyx_L1_error)

  /* "chorde/decorators.py":1230
 *         future_cached_f.async_ttl = async_ttl
 *         future_cached_f.callkey = key
 *         future_cached_f.stats = stats             # <<<<<<<<<<<<<<
 *         future_cached_f.uncached = of
 *         future_cached_f.get_ttl = future_get_ttl_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_stats, ((PyObject *)__pyx_cur_scope->__pyx_v_stats)) < 0) __PYX_ERR(0, 1230, __pyx_L1_error)

  /* "chorde/decorators.py":1231
 *         future_cached_f.callkey = key
 *         future_cached_f.stats = stats
 *         future_cached_f.uncached = of             # <<<<<<<<<<<<<<
 *         future_cached_f.get_ttl = future_get_ttl_f
 *         future_cached_f._promote_callbacks = promote_callbacks
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_uncached, __pyx_cur_scope->__pyx_v_of) < 0) __PYX_ERR(0, 1231, __pyx_L1_error)

  /* "chorde/decorators.py":1232
 *         future_cached_f.stats = stats
 *         future_cached_f.uncached = of
 *         future_cached_f.get_ttl = future_get_ttl_f             # <<<<<<<<<<<<<<
 *         future_cached_f._promote_callbacks = promote_callbacks
 *         future_cached_f._value_callbacks = value_callbacks
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_get_ttl, __pyx_v_future_get_ttl_f) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)

  /* "chorde/decorators.py":1233
 *         future_cached_f.uncached = of
 *         future_cached_f.get_ttl = future_get_ttl_f
 *         future_cached_f._promote_callbacks = promote_callbacks             # <<<<<<<<<<<<<<
 *         future_cached_f._value_callbacks = value_callbacks
 *         future_cached_f.on_promote = on_promote_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_promote_callbacks, __pyx_cur_scope->__pyx_v_promote_callbacks) < 0) __PYX_ERR(0, 1233, __pyx_L1_error)

  /* "chorde/decorators.py":1234
 *         future_cached_f.get_ttl = future_get_ttl_f
 *         future_cached_f._promote_callbacks = promote_callbacks
 *         future_cached_f._value_callbacks = value_callbacks             # <<<<<<<<<<<<<<
 *         future_cached_f.on_promote = on_promote_f
 *         future_cached_f.on_value = on_value_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_value_callbacks, __pyx_cur_scope->__pyx_v_value_callbacks) < 0) __PYX_ERR(0, 1234, __pyx_L1_error)

  /* "chorde/decorators.py":1235
 *         future_cached_f._promote_callbacks = promote_callbacks
 *         future_cached_f._value_callbacks = value_callbacks
 *         future_cached_f.on_promote = on_promote_f             # <<<<<<<<<<<<<<
 *         future_cached_f.on_value = on_value_f
 *         future_cached_f.placeholder_value = placeholder_value_f
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_on_promote, __pyx_v_on_promote_f) < 0) __PYX_ERR(0, 1235, __pyx_L1_error)

  /* "chorde/decorators.py":1236
 *         future_cached_f._value_callbacks = value_callbacks
 *         future_cached_f.on_promote = on_promote_f
 *         future_cached_f.on_value = on_value_f             # <<<<<<<<<<<<<<
 *         future_cached_f.placeholder_value = placeholder_value_f
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_on_value, __pyx_v_on_value_f) < 0) __PYX_ERR(0, 1236, __pyx_L1_error)

  /* "chorde/decorators.py":1237
 *         future_cached_f.on_promote = on_promote_f
 *         future_cached_f.on_value = on_value_f
 *         future_cached_f.placeholder_value = placeholder_value_f             # <<<<<<<<<<<<<<
 * 
 *         decorated_functions.add(cached_f)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_cur_scope->__pyx_v_future_cached_f, __pyx_n_s_placeholder_value, __pyx_v_placeholder_value_f) < 0) __PYX_ERR(0, 1237, __pyx_L1_error)

  /* "chorde/decorators.py":1239
 *         future_cached_f.placeholder_value = placeholder_value_f
 * 
 *         decorated_functions.add(cached_f)             # <<<<<<<<<<<<<<
 *         return cached_f
 *     return decor
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_decorated_functions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_add); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_v_cached_f) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_cached_f);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "chorde/decorators.py":1240
 * 
 *         decorated_functions.add(cached_f)
 *         return cached_f             # <<<<<<<<<<<<<<
 *     return decor
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cached_f);
  __pyx_r = __pyx_v_cached_f;
  goto __pyx_L0;

  /* "chorde/decorators.py":428
 *     Future = asyncache.Future
 * 
 *     def decor(f):             # <<<<<<<<<<<<<<
 *         if namespace is None:
 *             salt2 = repr((ttl,))
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("chorde.decorators.cached.decor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_salt2);
  __Pyx_XDECREF(__pyx_v_nasync_client);
  __Pyx_XDECREF(__pyx_v_cached_f);
  __Pyx_XDECREF(__pyx_v_get_ttl_f);
  __Pyx_XDECREF(__pyx_v_lazy_cached_f);
  __Pyx_XDECREF(__pyx_v_peek_cached_f);
  __Pyx_XDECREF(__pyx_v_future_lazy_cached_f);
  __Pyx_XDECREF(__pyx_v_future_peek_cached_f);
  __Pyx_XDECREF(__pyx_v_future_get_ttl_f);
  __Pyx_XDECREF(__pyx_v_invalidate_f);
  __Pyx_XDECREF(__pyx_v_future_invalidate_f);
  __Pyx_XDECREF(__pyx_v_expire_f);
  __Pyx_XDECREF(__pyx_v_async_expire_f);
  __Pyx_XDECREF(__pyx_v_future_expire_f);
  __Pyx_XDECREF(__pyx_v_put_f);
  __Pyx_XDECREF(__pyx_v_async_put_f);
  __Pyx_XDECREF(__pyx_v_future_put_f);
  __Pyx_XDECREF(__pyx_v_async_lazy_cached_f);
  __Pyx_XDECREF(__pyx_v_refresh_f);
  __Pyx_XDECREF(__pyx_v_async_refresh_f);
  __Pyx_XDECREF(__pyx_v_future_refresh_f);
  __Pyx_XDECREF(__pyx_v_on_promote_f);
  __Pyx_XDECREF(__pyx_v_on_value_f);
  __Pyx_XDECREF(__pyx_v_placeholder_value_f);
  __Pyx_XDECREF(__pyx_v_future_f);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":397
 *     if ttl_spread:
 *         spread_type = type(ttl_spread)
 *         eff_ttl = lambda r = random.random : ttl + spread_type(ttl_spread * (r() - 0.5))             # <<<<<<<<<<<<<<
 *     else:
 *         eff_ttl = lambda : ttl
 */

static PyObject *__pyx_pf_6chorde_10decorators_21__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_r);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_r);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __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("chorde.decorators.__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_6chorde_10decorators_6cached_2lambda4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_2lambda4 = {"lambda4", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_6cached_2lambda4, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_2lambda4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_r = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_r,0};
    PyObject* values[1] = {0};
    __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
    values[0] = __pyx_dynamic_args->__pyx_arg_r;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda4") < 0)) __PYX_ERR(0, 397, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_r = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda4", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 397, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("chorde.decorators.cached.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda4(__pyx_self, __pyx_v_r);

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

static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self, PyObject *__pyx_v_r) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda4", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_ttl)) { __Pyx_RaiseClosureNameError("ttl"); __PYX_ERR(0, 397, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_spread_type)) { __Pyx_RaiseClosureNameError("spread_type"); __PYX_ERR(0, 397, __pyx_L1_error) }
  if (unlikely(!__pyx_cur_scope->__pyx_v_ttl_spread)) { __Pyx_RaiseClosureNameError("ttl_spread"); __PYX_ERR(0, 397, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_v_r);
  __pyx_t_2 = __pyx_v_r; __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, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyFloat_SubtractObjC(__pyx_t_1, __pyx_float_0_5, 0.5, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_ttl_spread, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_cur_scope->__pyx_v_spread_type), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_cur_scope->__pyx_v_ttl, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __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;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("chorde.decorators.cached.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":399
 *         eff_ttl = lambda r = random.random : ttl + spread_type(ttl_spread * (r() - 0.5))
 *     else:
 *         eff_ttl = lambda : ttl             # <<<<<<<<<<<<<<
 * 
 *     if _put_deferred is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_6cached_3lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_6cached_3lambda5 = {"lambda5", (PyCFunction)__pyx_pw_6chorde_10decorators_6cached_3lambda5, METH_NOARGS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_6cached_3lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda5(__pyx_self);

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

static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda5", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_ttl)) { __Pyx_RaiseClosureNameError("ttl"); __PYX_ERR(0, 399, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ttl);
  __pyx_r = __pyx_cur_scope->__pyx_v_ttl;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("chorde.decorators.cached.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":133
 * decorated_functions = weakref.WeakSet()
 * 
 * def cached(client, ttl,             # <<<<<<<<<<<<<<
 *         key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *         namespace = None,
 */

static PyObject *__pyx_pf_6chorde_10decorators_8cached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_client, PyObject *__pyx_v_ttl, PyObject *__pyx_v_key, PyObject *__pyx_v_namespace, PyObject *__pyx_v_value_serialization_function, PyObject *__pyx_v_value_deserialization_function, PyObject *__pyx_v_async_writer_queue_size, PyObject *__pyx_v_async_writer_workers, PyObject *__pyx_v_async_writer_threadpool, PyObject *__pyx_v_async_writer_kwargs, PyObject *__pyx_v_async_ttl, PyObject *__pyx_v_async_client, PyObject *__pyx_v_async_expire, PyObject *__pyx_v_lazy_kwargs, PyObject *__pyx_v_async_lazy_recheck, PyObject *__pyx_v_async_lazy_recheck_kwargs, PyObject *__pyx_v_async_processor, PyObject *__pyx_v_async_processor_workers, PyObject *__pyx_v_async_processor_threadpool, PyObject *__pyx_v_async_processor_kwargs, PyObject *__pyx_v_renew_time, PyObject *__pyx_v_future_sync_check, PyObject *__pyx_v_initialize, PyObject *__pyx_v_decorate, PyObject *__pyx_v_timings, PyObject *__pyx_v_ttl_spread, PyObject *__pyx_v_autonamespace_version_salt, PyObject *__pyx_v__eff_async_ttl, PyObject *__pyx_v__put_deferred, PyObject *__pyx_v__fput_deferred, PyObject *__pyx_v__lazy_recheck_put_deferred, PyObject *__pyx_v__flazy_recheck_put_deferred) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *__pyx_cur_scope;
  PyObject *__pyx_v_decor = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cached", 0);
  __pyx_cur_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *)__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_2_cached(__pyx_ptype_6chorde_10decorators___pyx_scope_struct_2_cached, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 133, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_client = __pyx_v_client;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
  __pyx_cur_scope->__pyx_v_ttl = __pyx_v_ttl;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ttl);
  __pyx_cur_scope->__pyx_v_key = __pyx_v_key;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
  __pyx_cur_scope->__pyx_v_namespace = __pyx_v_namespace;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_namespace);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_namespace);
  __pyx_cur_scope->__pyx_v_async_writer_queue_size = __pyx_v_async_writer_queue_size;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_writer_queue_size);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_writer_queue_size);
  __pyx_cur_scope->__pyx_v_async_writer_workers = __pyx_v_async_writer_workers;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_writer_workers);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_writer_workers);
  __pyx_cur_scope->__pyx_v_async_writer_kwargs = __pyx_v_async_writer_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_writer_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_writer_kwargs);
  __pyx_cur_scope->__pyx_v_async_ttl = __pyx_v_async_ttl;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_ttl);
  __pyx_cur_scope->__pyx_v_async_client = __pyx_v_async_client;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_client);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_client);
  __pyx_cur_scope->__pyx_v_async_expire = __pyx_v_async_expire;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_expire);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_expire);
  __pyx_cur_scope->__pyx_v_lazy_kwargs = __pyx_v_lazy_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_lazy_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_lazy_kwargs);
  __pyx_cur_scope->__pyx_v_async_lazy_recheck = __pyx_v_async_lazy_recheck;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_lazy_recheck);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_lazy_recheck);
  __pyx_cur_scope->__pyx_v_async_processor = __pyx_v_async_processor;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_processor);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_processor);
  __pyx_cur_scope->__pyx_v_async_processor_workers = __pyx_v_async_processor_workers;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_processor_workers);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_processor_workers);
  __pyx_cur_scope->__pyx_v_async_processor_kwargs = __pyx_v_async_processor_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_processor_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_processor_kwargs);
  __pyx_cur_scope->__pyx_v_renew_time = __pyx_v_renew_time;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_renew_time);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_renew_time);
  __pyx_cur_scope->__pyx_v_future_sync_check = __pyx_v_future_sync_check;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_future_sync_check);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_future_sync_check);
  __pyx_cur_scope->__pyx_v_initialize = __pyx_v_initialize;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_initialize);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_initialize);
  __pyx_cur_scope->__pyx_v_decorate = __pyx_v_decorate;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_decorate);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_decorate);
  __pyx_cur_scope->__pyx_v_timings = __pyx_v_timings;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_timings);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_timings);
  __pyx_cur_scope->__pyx_v_ttl_spread = __pyx_v_ttl_spread;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ttl_spread);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ttl_spread);
  __pyx_cur_scope->__pyx_v_autonamespace_version_salt = __pyx_v_autonamespace_version_salt;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_autonamespace_version_salt);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_autonamespace_version_salt);
  __pyx_cur_scope->__pyx_v__eff_async_ttl = __pyx_v__eff_async_ttl;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v__eff_async_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v__eff_async_ttl);
  __pyx_cur_scope->__pyx_v__put_deferred = __pyx_v__put_deferred;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v__put_deferred);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v__put_deferred);
  __pyx_cur_scope->__pyx_v__fput_deferred = __pyx_v__fput_deferred;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v__fput_deferred);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v__fput_deferred);
  __pyx_cur_scope->__pyx_v__lazy_recheck_put_deferred = __pyx_v__lazy_recheck_put_deferred;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v__lazy_recheck_put_deferred);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v__lazy_recheck_put_deferred);
  __Pyx_INCREF(__pyx_v__flazy_recheck_put_deferred);

  /* "chorde/decorators.py":373
 *             will be added.
 *     """
 *     if value_serialization_function or value_deserialization_function:             # <<<<<<<<<<<<<<
 *         client = base.DecoratedWrapper(client,
 *             value_decorator = value_serialization_function,
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_value_serialization_function); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 373, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_value_deserialization_function); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 373, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "chorde/decorators.py":374
 *     """
 *     if value_serialization_function or value_deserialization_function:
 *         client = base.DecoratedWrapper(client,             # <<<<<<<<<<<<<<
 *             value_decorator = value_serialization_function,
 *             value_undecorator = value_deserialization_function )
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DecoratedWrapper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_client);

    /* "chorde/decorators.py":375
 *     if value_serialization_function or value_deserialization_function:
 *         client = base.DecoratedWrapper(client,
 *             value_decorator = value_serialization_function,             # <<<<<<<<<<<<<<
 *             value_undecorator = value_deserialization_function )
 *     if namespace is not None and namespace is not NO_NAMESPACE:
 */
    __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_value_decorator, __pyx_v_value_serialization_function) < 0) __PYX_ERR(0, 375, __pyx_L1_error)

    /* "chorde/decorators.py":376
 *         client = base.DecoratedWrapper(client,
 *             value_decorator = value_serialization_function,
 *             value_undecorator = value_deserialization_function )             # <<<<<<<<<<<<<<
 *     if namespace is not None and namespace is not NO_NAMESPACE:
 *         client = base.NamespaceWrapper(namespace, client)
 */
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_value_undecorator, __pyx_v_value_deserialization_function) < 0) __PYX_ERR(0, 375, __pyx_L1_error)

    /* "chorde/decorators.py":374
 *     """
 *     if value_serialization_function or value_deserialization_function:
 *         client = base.DecoratedWrapper(client,             # <<<<<<<<<<<<<<
 *             value_decorator = value_serialization_function,
 *             value_undecorator = value_deserialization_function )
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_client);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_client, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":373
 *             will be added.
 *     """
 *     if value_serialization_function or value_deserialization_function:             # <<<<<<<<<<<<<<
 *         client = base.DecoratedWrapper(client,
 *             value_decorator = value_serialization_function,
 */
  }

  /* "chorde/decorators.py":377
 *             value_decorator = value_serialization_function,
 *             value_undecorator = value_deserialization_function )
 *     if namespace is not None and namespace is not NO_NAMESPACE:             # <<<<<<<<<<<<<<
 *         client = base.NamespaceWrapper(namespace, client)
 *         if async_client:
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_namespace != Py_None);
  __pyx_t_7 = (__pyx_t_2 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L7_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NO_NAMESPACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = (__pyx_cur_scope->__pyx_v_namespace != __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_2 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "chorde/decorators.py":378
 *             value_undecorator = value_deserialization_function )
 *     if namespace is not None and namespace is not NO_NAMESPACE:
 *         client = base.NamespaceWrapper(namespace, client)             # <<<<<<<<<<<<<<
 *         if async_client:
 *             async_client = base.NamespaceMirrorWrapper(client, async_client)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_base); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_NamespaceWrapper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_namespace, __pyx_cur_scope->__pyx_v_client};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_namespace, __pyx_cur_scope->__pyx_v_client};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_namespace);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_namespace);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v_namespace);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_client);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_cur_scope->__pyx_v_client);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_client);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_client, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":379
 *     if namespace is not None and namespace is not NO_NAMESPACE:
 *         client = base.NamespaceWrapper(namespace, client)
 *         if async_client:             # <<<<<<<<<<<<<<
 *             async_client = base.NamespaceMirrorWrapper(client, async_client)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_async_client); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 379, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "chorde/decorators.py":380
 *         client = base.NamespaceWrapper(namespace, client)
 *         if async_client:
 *             async_client = base.NamespaceMirrorWrapper(client, async_client)             # <<<<<<<<<<<<<<
 * 
 *     if not client.is_async:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_NamespaceMirrorWrapper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_client, __pyx_cur_scope->__pyx_v_async_client};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 380, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_client, __pyx_cur_scope->__pyx_v_async_client};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 380, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 380, __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_cur_scope->__pyx_v_client);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_client);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v_client);
        __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_client);
        __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_client);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_cur_scope->__pyx_v_async_client);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 380, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_client);
      __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_client, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;

      /* "chorde/decorators.py":379
 *     if namespace is not None and namespace is not NO_NAMESPACE:
 *         client = base.NamespaceWrapper(namespace, client)
 *         if async_client:             # <<<<<<<<<<<<<<
 *             async_client = base.NamespaceMirrorWrapper(client, async_client)
 * 
 */
    }

    /* "chorde/decorators.py":377
 *             value_decorator = value_serialization_function,
 *             value_undecorator = value_deserialization_function )
 *     if namespace is not None and namespace is not NO_NAMESPACE:             # <<<<<<<<<<<<<<
 *         client = base.NamespaceWrapper(namespace, client)
 *         if async_client:
 */
  }

  /* "chorde/decorators.py":382
 *             async_client = base.NamespaceMirrorWrapper(client, async_client)
 * 
 *     if not client.is_async:             # <<<<<<<<<<<<<<
 *         if async_writer_queue_size is None:
 *             async_writer_queue_size = 100
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_client, __pyx_n_s_is_async); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":383
 * 
 *     if not client.is_async:
 *         if async_writer_queue_size is None:             # <<<<<<<<<<<<<<
 *             async_writer_queue_size = 100
 *         if async_writer_workers is None:
 */
    __pyx_t_2 = (__pyx_cur_scope->__pyx_v_async_writer_queue_size == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "chorde/decorators.py":384
 *     if not client.is_async:
 *         if async_writer_queue_size is None:
 *             async_writer_queue_size = 100             # <<<<<<<<<<<<<<
 *         if async_writer_workers is None:
 *             async_writer_workers = multiprocessing.cpu_count()
 */
      __Pyx_INCREF(__pyx_int_100);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_writer_queue_size);
      __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_writer_queue_size, __pyx_int_100);
      __Pyx_GIVEREF(__pyx_int_100);

      /* "chorde/decorators.py":383
 * 
 *     if not client.is_async:
 *         if async_writer_queue_size is None:             # <<<<<<<<<<<<<<
 *             async_writer_queue_size = 100
 *         if async_writer_workers is None:
 */
    }

    /* "chorde/decorators.py":385
 *         if async_writer_queue_size is None:
 *             async_writer_queue_size = 100
 *         if async_writer_workers is None:             # <<<<<<<<<<<<<<
 *             async_writer_workers = multiprocessing.cpu_count()
 * 
 */
    __pyx_t_1 = (__pyx_cur_scope->__pyx_v_async_writer_workers == Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "chorde/decorators.py":386
 *             async_writer_queue_size = 100
 *         if async_writer_workers is None:
 *             async_writer_workers = multiprocessing.cpu_count()             # <<<<<<<<<<<<<<
 * 
 *     if async_ttl is None:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_multiprocessing); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_cpu_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_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, 386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_writer_workers);
      __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_writer_workers, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;

      /* "chorde/decorators.py":385
 *         if async_writer_queue_size is None:
 *             async_writer_queue_size = 100
 *         if async_writer_workers is None:             # <<<<<<<<<<<<<<
 *             async_writer_workers = multiprocessing.cpu_count()
 * 
 */
    }

    /* "chorde/decorators.py":382
 *             async_client = base.NamespaceMirrorWrapper(client, async_client)
 * 
 *     if not client.is_async:             # <<<<<<<<<<<<<<
 *         if async_writer_queue_size is None:
 *             async_writer_queue_size = 100
 */
  }

  /* "chorde/decorators.py":388
 *             async_writer_workers = multiprocessing.cpu_count()
 * 
 *     if async_ttl is None:             # <<<<<<<<<<<<<<
 *         async_ttl = ttl / 2
 *     elif async_ttl < 0:
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_async_ttl == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":389
 * 
 *     if async_ttl is None:
 *         async_ttl = ttl / 2             # <<<<<<<<<<<<<<
 *     elif async_ttl < 0:
 *         async_ttl = ttl + async_ttl
 */
    __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_cur_scope->__pyx_v_ttl, __pyx_int_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_ttl);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_ttl, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":388
 *             async_writer_workers = multiprocessing.cpu_count()
 * 
 *     if async_ttl is None:             # <<<<<<<<<<<<<<
 *         async_ttl = ttl / 2
 *     elif async_ttl < 0:
 */
    goto __pyx_L13;
  }

  /* "chorde/decorators.py":390
 *     if async_ttl is None:
 *         async_ttl = ttl / 2
 *     elif async_ttl < 0:             # <<<<<<<<<<<<<<
 *         async_ttl = ttl + async_ttl
 * 
 */
  __pyx_t_6 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_async_ttl, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 390, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_1) {

    /* "chorde/decorators.py":391
 *         async_ttl = ttl / 2
 *     elif async_ttl < 0:
 *         async_ttl = ttl + async_ttl             # <<<<<<<<<<<<<<
 * 
 *     if ttl_spread is True:
 */
    __pyx_t_6 = PyNumber_Add(__pyx_cur_scope->__pyx_v_ttl, __pyx_cur_scope->__pyx_v_async_ttl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_ttl);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_ttl, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":390
 *     if async_ttl is None:
 *         async_ttl = ttl / 2
 *     elif async_ttl < 0:             # <<<<<<<<<<<<<<
 *         async_ttl = ttl + async_ttl
 * 
 */
  }
  __pyx_L13:;

  /* "chorde/decorators.py":393
 *         async_ttl = ttl + async_ttl
 * 
 *     if ttl_spread is True:             # <<<<<<<<<<<<<<
 *         ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2
 *     if ttl_spread:
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_ttl_spread == Py_True);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":394
 * 
 *     if ttl_spread is True:
 *         ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2             # <<<<<<<<<<<<<<
 *     if ttl_spread:
 *         spread_type = type(ttl_spread)
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_ttl);
    __pyx_t_6 = __pyx_cur_scope->__pyx_v_async_ttl;
    __pyx_t_5 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_ttl, __pyx_cur_scope->__pyx_v_async_ttl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyNumber_Absolute(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ttl);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_ttl;
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 394, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_2) {
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
    } else {
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_3 = __pyx_t_5;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 394, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_2) {
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_3 = __pyx_t_4;
    } else {
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_3 = __pyx_t_5;
    }
    __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;
    __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_int_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ttl_spread);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ttl_spread, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":393
 *         async_ttl = ttl + async_ttl
 * 
 *     if ttl_spread is True:             # <<<<<<<<<<<<<<
 *         ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2
 *     if ttl_spread:
 */
  }

  /* "chorde/decorators.py":395
 *     if ttl_spread is True:
 *         ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2
 *     if ttl_spread:             # <<<<<<<<<<<<<<
 *         spread_type = type(ttl_spread)
 *         eff_ttl = lambda r = random.random : ttl + spread_type(ttl_spread * (r() - 0.5))
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ttl_spread); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 395, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "chorde/decorators.py":396
 *         ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2
 *     if ttl_spread:
 *         spread_type = type(ttl_spread)             # <<<<<<<<<<<<<<
 *         eff_ttl = lambda r = random.random : ttl + spread_type(ttl_spread * (r() - 0.5))
 *     else:
 */
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_ttl_spread)));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_ttl_spread)));
    __pyx_cur_scope->__pyx_v_spread_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_ttl_spread)));

    /* "chorde/decorators.py":397
 *     if ttl_spread:
 *         spread_type = type(ttl_spread)
 *         eff_ttl = lambda r = random.random : ttl + spread_type(ttl_spread * (r() - 0.5))             # <<<<<<<<<<<<<<
 *     else:
 *         eff_ttl = lambda : ttl
 */
    __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_2lambda4, 0, __pyx_n_s_cached_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults2), 1)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_random); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_random); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_6)->__pyx_arg_r = __pyx_t_4;
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_6chorde_10decorators_21__defaults__);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_cur_scope->__pyx_v_eff_ttl = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":395
 *     if ttl_spread is True:
 *         ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2
 *     if ttl_spread:             # <<<<<<<<<<<<<<
 *         spread_type = type(ttl_spread)
 *         eff_ttl = lambda r = random.random : ttl + spread_type(ttl_spread * (r() - 0.5))
 */
    goto __pyx_L15;
  }

  /* "chorde/decorators.py":399
 *         eff_ttl = lambda r = random.random : ttl + spread_type(ttl_spread * (r() - 0.5))
 *     else:
 *         eff_ttl = lambda : ttl             # <<<<<<<<<<<<<<
 * 
 *     if _put_deferred is None:
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_3lambda5, 0, __pyx_n_s_cached_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_cur_scope->__pyx_v_eff_ttl = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L15:;

  /* "chorde/decorators.py":401
 *         eff_ttl = lambda : ttl
 * 
 *     if _put_deferred is None:             # <<<<<<<<<<<<<<
 *         _fput_deferred = _simple_put_deferred
 *         _put_deferred = partial(_fput_deferred, None)
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v__put_deferred == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":402
 * 
 *     if _put_deferred is None:
 *         _fput_deferred = _simple_put_deferred             # <<<<<<<<<<<<<<
 *         _put_deferred = partial(_fput_deferred, None)
 *     if _lazy_recheck_put_deferred is None:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_simple_put_deferred); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v__fput_deferred);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v__fput_deferred, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":403
 *     if _put_deferred is None:
 *         _fput_deferred = _simple_put_deferred
 *         _put_deferred = partial(_fput_deferred, None)             # <<<<<<<<<<<<<<
 *     if _lazy_recheck_put_deferred is None:
 *         _flazy_recheck_put_deferred = _simple_put_deferred
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v__fput_deferred, Py_None};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v__fput_deferred, Py_None};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __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_cur_scope->__pyx_v__fput_deferred);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v__fput_deferred);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_cur_scope->__pyx_v__fput_deferred);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, Py_None);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v__put_deferred);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v__put_deferred, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":401
 *         eff_ttl = lambda : ttl
 * 
 *     if _put_deferred is None:             # <<<<<<<<<<<<<<
 *         _fput_deferred = _simple_put_deferred
 *         _put_deferred = partial(_fput_deferred, None)
 */
  }

  /* "chorde/decorators.py":404
 *         _fput_deferred = _simple_put_deferred
 *         _put_deferred = partial(_fput_deferred, None)
 *     if _lazy_recheck_put_deferred is None:             # <<<<<<<<<<<<<<
 *         _flazy_recheck_put_deferred = _simple_put_deferred
 *         _lazy_recheck_put_deferred = partial(_flazy_recheck_put_deferred, None)
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v__lazy_recheck_put_deferred == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":405
 *         _put_deferred = partial(_fput_deferred, None)
 *     if _lazy_recheck_put_deferred is None:
 *         _flazy_recheck_put_deferred = _simple_put_deferred             # <<<<<<<<<<<<<<
 *         _lazy_recheck_put_deferred = partial(_flazy_recheck_put_deferred, None)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_simple_put_deferred); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v__flazy_recheck_put_deferred, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":406
 *     if _lazy_recheck_put_deferred is None:
 *         _flazy_recheck_put_deferred = _simple_put_deferred
 *         _lazy_recheck_put_deferred = partial(_flazy_recheck_put_deferred, None)             # <<<<<<<<<<<<<<
 * 
 *     if async_processor is not None and async_processor_workers is None:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v__flazy_recheck_put_deferred, Py_None};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 406, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v__flazy_recheck_put_deferred, Py_None};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 406, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v__flazy_recheck_put_deferred);
      __Pyx_GIVEREF(__pyx_v__flazy_recheck_put_deferred);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_v__flazy_recheck_put_deferred);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, Py_None);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v__lazy_recheck_put_deferred);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v__lazy_recheck_put_deferred, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":404
 *         _fput_deferred = _simple_put_deferred
 *         _put_deferred = partial(_fput_deferred, None)
 *     if _lazy_recheck_put_deferred is None:             # <<<<<<<<<<<<<<
 *         _flazy_recheck_put_deferred = _simple_put_deferred
 *         _lazy_recheck_put_deferred = partial(_flazy_recheck_put_deferred, None)
 */
  }

  /* "chorde/decorators.py":408
 *         _lazy_recheck_put_deferred = partial(_flazy_recheck_put_deferred, None)
 * 
 *     if async_processor is not None and async_processor_workers is None:             # <<<<<<<<<<<<<<
 *         async_processor_workers = multiprocessing.cpu_count()
 * 
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_async_processor != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_cur_scope->__pyx_v_async_processor_workers == Py_None);
  __pyx_t_1 = (__pyx_t_7 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L19_bool_binop_done:;
  if (__pyx_t_2) {

    /* "chorde/decorators.py":409
 * 
 *     if async_processor is not None and async_processor_workers is None:
 *         async_processor_workers = multiprocessing.cpu_count()             # <<<<<<<<<<<<<<
 * 
 *     if async_writer_kwargs is None:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_multiprocessing); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_cpu_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __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 && 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_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_processor_workers);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_processor_workers, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":408
 *         _lazy_recheck_put_deferred = partial(_flazy_recheck_put_deferred, None)
 * 
 *     if async_processor is not None and async_processor_workers is None:             # <<<<<<<<<<<<<<
 *         async_processor_workers = multiprocessing.cpu_count()
 * 
 */
  }

  /* "chorde/decorators.py":411
 *         async_processor_workers = multiprocessing.cpu_count()
 * 
 *     if async_writer_kwargs is None:             # <<<<<<<<<<<<<<
 *         async_writer_kwargs = {}
 *     async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_async_writer_kwargs == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":412
 * 
 *     if async_writer_kwargs is None:
 *         async_writer_kwargs = {}             # <<<<<<<<<<<<<<
 *     async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 * 
 */
    __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_writer_kwargs);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_writer_kwargs, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":411
 *         async_processor_workers = multiprocessing.cpu_count()
 * 
 *     if async_writer_kwargs is None:             # <<<<<<<<<<<<<<
 *         async_writer_kwargs = {}
 *     async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 */
  }

  /* "chorde/decorators.py":413
 *     if async_writer_kwargs is None:
 *         async_writer_kwargs = {}
 *     async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)             # <<<<<<<<<<<<<<
 * 
 *     if async_processor_kwargs is None:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_async_writer_kwargs, __pyx_n_s_setdefault); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_threadpool, __pyx_v_async_writer_threadpool};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_threadpool, __pyx_v_async_writer_threadpool};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_threadpool);
    __Pyx_GIVEREF(__pyx_n_s_threadpool);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_n_s_threadpool);
    __Pyx_INCREF(__pyx_v_async_writer_threadpool);
    __Pyx_GIVEREF(__pyx_v_async_writer_threadpool);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_v_async_writer_threadpool);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":415
 *     async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 * 
 *     if async_processor_kwargs is None:             # <<<<<<<<<<<<<<
 *         async_processor_kwargs = {}
 *     async_processor_kwargs.setdefault('threadpool', async_processor_threadpool)
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_async_processor_kwargs == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":416
 * 
 *     if async_processor_kwargs is None:
 *         async_processor_kwargs = {}             # <<<<<<<<<<<<<<
 *     async_processor_kwargs.setdefault('threadpool', async_processor_threadpool)
 * 
 */
    __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_processor_kwargs);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_processor_kwargs, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "chorde/decorators.py":415
 *     async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 * 
 *     if async_processor_kwargs is None:             # <<<<<<<<<<<<<<
 *         async_processor_kwargs = {}
 *     async_processor_kwargs.setdefault('threadpool', async_processor_threadpool)
 */
  }

  /* "chorde/decorators.py":417
 *     if async_processor_kwargs is None:
 *         async_processor_kwargs = {}
 *     async_processor_kwargs.setdefault('threadpool', async_processor_threadpool)             # <<<<<<<<<<<<<<
 * 
 *     # Copy to avoid modifying references to caller objects
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_async_processor_kwargs, __pyx_n_s_setdefault); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_threadpool, __pyx_v_async_processor_threadpool};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_s_threadpool, __pyx_v_async_processor_threadpool};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_6);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_threadpool);
    __Pyx_GIVEREF(__pyx_n_s_threadpool);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_n_s_threadpool);
    __Pyx_INCREF(__pyx_v_async_processor_threadpool);
    __Pyx_GIVEREF(__pyx_v_async_processor_threadpool);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_v_async_processor_threadpool);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "chorde/decorators.py":420
 * 
 *     # Copy to avoid modifying references to caller objects
 *     elazy_kwargs = lazy_kwargs.copy()             # <<<<<<<<<<<<<<
 *     easync_lazy_recheck_kwargs = async_lazy_recheck_kwargs.copy()
 *     eget_async_lazy_recheck_kwargs = easync_lazy_recheck_kwargs.copy()
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lazy_kwargs, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_elazy_kwargs = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "chorde/decorators.py":421
 *     # Copy to avoid modifying references to caller objects
 *     elazy_kwargs = lazy_kwargs.copy()
 *     easync_lazy_recheck_kwargs = async_lazy_recheck_kwargs.copy()             # <<<<<<<<<<<<<<
 *     eget_async_lazy_recheck_kwargs = easync_lazy_recheck_kwargs.copy()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_async_lazy_recheck_kwargs, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_easync_lazy_recheck_kwargs = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "chorde/decorators.py":422
 *     elazy_kwargs = lazy_kwargs.copy()
 *     easync_lazy_recheck_kwargs = async_lazy_recheck_kwargs.copy()
 *     eget_async_lazy_recheck_kwargs = easync_lazy_recheck_kwargs.copy()             # <<<<<<<<<<<<<<
 * 
 *     EMPTY_KWARGS = {}
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_easync_lazy_recheck_kwargs, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_eget_async_lazy_recheck_kwargs = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "chorde/decorators.py":424
 *     eget_async_lazy_recheck_kwargs = easync_lazy_recheck_kwargs.copy()
 * 
 *     EMPTY_KWARGS = {}             # <<<<<<<<<<<<<<
 *     _NONE_ = _NONE
 *     Future = asyncache.Future
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_EMPTY_KWARGS = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "chorde/decorators.py":425
 * 
 *     EMPTY_KWARGS = {}
 *     _NONE_ = _NONE             # <<<<<<<<<<<<<<
 *     Future = asyncache.Future
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NONE_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v__NONE_ = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "chorde/decorators.py":426
 *     EMPTY_KWARGS = {}
 *     _NONE_ = _NONE
 *     Future = asyncache.Future             # <<<<<<<<<<<<<<
 * 
 *     def decor(f):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_asyncache); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_Future = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "chorde/decorators.py":428
 *     Future = asyncache.Future
 * 
 *     def decor(f):             # <<<<<<<<<<<<<<
 *         if namespace is None:
 *             salt2 = repr((ttl,))
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_6cached_1decor, 0, __pyx_n_s_cached_locals_decor, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_decor = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "chorde/decorators.py":1241
 *         decorated_functions.add(cached_f)
 *         return cached_f
 *     return decor             # <<<<<<<<<<<<<<
 * 
 * if not no_coherence:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_decor);
  __pyx_r = __pyx_v_decor;
  goto __pyx_L0;

  /* "chorde/decorators.py":133
 * decorated_functions = weakref.WeakSet()
 * 
 * def cached(client, ttl,             # <<<<<<<<<<<<<<
 *         key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *         namespace = None,
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("chorde.decorators.cached", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_decor);
  __Pyx_XDECREF(__pyx_v__flazy_recheck_put_deferred);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1245
 * if not no_coherence:
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,             # <<<<<<<<<<<<<<
 *             key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *             tiered_ = None,
 */

static PyObject *__pyx_pf_6chorde_10decorators_19__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);

  /* "chorde/decorators.py":1274
 *             ttl_spread = True,
 *             wait_time = None,
 *             autonamespace_version_salt = None,             # <<<<<<<<<<<<<<
 *             **coherence_kwargs ):
 *         """
 */
  __pyx_t_1 = PyTuple_New(29); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_key);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_key);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject*)__pyx_n_s_pyobj));
  __Pyx_GIVEREF(((PyObject*)__pyx_n_s_pyobj));
  PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject*)__pyx_n_s_pyobj));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 5, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 7, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 8, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 9, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 10, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 11, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 12, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 13, ((PyObject *)Py_None));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_lazy_kwargs);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_lazy_kwargs);
  PyTuple_SET_ITEM(__pyx_t_1, 14, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_lazy_kwargs);
  __Pyx_INCREF(((PyObject *)Py_False));
  __Pyx_GIVEREF(((PyObject *)Py_False));
  PyTuple_SET_ITEM(__pyx_t_1, 15, ((PyObject *)Py_False));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_async_lazy_recheck_kwargs);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_async_lazy_recheck_kwargs);
  PyTuple_SET_ITEM(__pyx_t_1, 16, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_async_lazy_recheck_kwargs);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 17, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 18, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 19, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 20, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 21, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 22, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 23, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 24, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 25, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_True));
  __Pyx_GIVEREF(((PyObject *)Py_True));
  PyTuple_SET_ITEM(__pyx_t_1, 26, ((PyObject *)Py_True));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 27, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 28, ((PyObject *)Py_None));

  /* "chorde/decorators.py":1245
 * if not no_coherence:
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,             # <<<<<<<<<<<<<<
 *             key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *             tiered_ = None,
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __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("chorde.decorators.__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_6chorde_10decorators_11coherent_cached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6chorde_10decorators_10coherent_cached[] = "\n        This decorator provides cacheability to suitable functions, in a way that maintains coherency across\n        multiple compute nodes.\n\n        For suitability considerations and common parameters, refer to cached. The following describes the\n        aspects specific to the coherent version.\n\n        The decorated function will provide additional behavior through attributes:\n            coherence: the coherence manager created for this purpse\n\n            ipsub: the given IPSub channel\n\n        Params\n            ipsub: An IPSub channel that will be used to publish and subscribe to update events.\n\n            private: The private (local) cache client, the one that needs coherence.\n\n            shared: The shared cache client, that reflects changes made by other nodes, or a tuple\n                to specify multiple shared tiers.\n\n            tiered_: (optional) A client that queries both, private and shared. By default, a TieredInclusiveClient\n                is created with private and shared as first and second tier, which should be the most common case.\n                The private client will be wrapped in an async wrapper if not async already, to be able to execute\n                the coherence protocol asynchronously. This should be adequate for most cases, but in some,\n                it may be beneficial to provide a custom client.\n\n            tiered_opts: (optional) When using the default-constructed tiered client, you can pass additional (keyword)\n                arguments here.\n\n            coherence_namespace: (optional) There is usually no need to specify this value, the namespace in use\n                by caching will be used for messaging as well, or if caching uses NO_NAMESPACE, the default that\n                would be used instead. However, for really high-volume channels, sometimes it is beneficial to pick\n                a more compact namespace (an id formatted with struct.pack for example).\n\n            c""oherence_encoding: (optional) Keys will have to be transmitted accross the channel, and this specifies\n                the encoding that will be used. The default 'pyobj' should work most of the time, but it has to\n                be initialized, and 'json' or others could be more compact, depending on keys.\n                (see CoherenceManager for details on encodings)\n\n            coherence_timeout: (optional) Time (in ms) of peer silence that will be considered abnormal. Default\n                is 2000ms, which is sensible given the IPSub protocol. You may want to increase it if node load\n                creates longer hiccups.\n\n            wait_time: (optional) Time (in ms) a call that is being computed externally will wait blocking for\n                a result. Waiting forever (None, the default) could block the writer threadpool, so it's best to\n                specify a reasonably adequate (for the application) timeout.\n\n            Any extra argument are passed verbatim to CoherenceManager's constructor.\n        ";
static PyMethodDef __pyx_mdef_6chorde_10decorators_11coherent_cached = {"coherent_cached", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_11coherent_cached, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6chorde_10decorators_10coherent_cached};
static PyObject *__pyx_pw_6chorde_10decorators_11coherent_cached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_private = 0;
  PyObject *__pyx_v_shared = 0;
  PyObject *__pyx_v_ipsub = 0;
  PyObject *__pyx_v_ttl = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_tiered_ = 0;
  PyObject *__pyx_v_namespace = 0;
  PyObject *__pyx_v_coherence_namespace = 0;
  PyObject *__pyx_v_coherence_encoding = 0;
  PyObject *__pyx_v_coherence_timeout = 0;
  PyObject *__pyx_v_value_serialization_function = 0;
  PyObject *__pyx_v_value_deserialization_function = 0;
  PyObject *__pyx_v_async_writer_queue_size = 0;
  PyObject *__pyx_v_async_writer_workers = 0;
  PyObject *__pyx_v_async_writer_threadpool = 0;
  PyObject *__pyx_v_async_writer_kwargs = 0;
  PyObject *__pyx_v_async_ttl = 0;
  PyObject *__pyx_v_async_expire = 0;
  PyObject *__pyx_v_lazy_kwargs = 0;
  PyObject *__pyx_v_async_lazy_recheck = 0;
  PyObject *__pyx_v_async_lazy_recheck_kwargs = 0;
  PyObject *__pyx_v_async_processor = 0;
  PyObject *__pyx_v_async_processor_workers = 0;
  PyObject *__pyx_v_async_processor_threadpool = 0;
  PyObject *__pyx_v_async_processor_kwargs = 0;
  PyObject *__pyx_v_renew_time = 0;
  PyObject *__pyx_v_future_sync_check = 0;
  PyObject *__pyx_v_initialize = 0;
  PyObject *__pyx_v_decorate = 0;
  PyObject *__pyx_v_tiered_opts = 0;
  PyObject *__pyx_v_ttl_spread = 0;
  PyObject *__pyx_v_wait_time = 0;
  PyObject *__pyx_v_autonamespace_version_salt = 0;
  PyObject *__pyx_v_coherence_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("coherent_cached (wrapper)", 0);
  __pyx_v_coherence_kwargs = PyDict_New(); if (unlikely(!__pyx_v_coherence_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_coherence_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_private,&__pyx_n_s_shared,&__pyx_n_s_ipsub,&__pyx_n_s_ttl,&__pyx_n_s_key,&__pyx_n_s_tiered,&__pyx_n_s_namespace,&__pyx_n_s_coherence_namespace,&__pyx_n_s_coherence_encoding,&__pyx_n_s_coherence_timeout,&__pyx_n_s_value_serialization_function,&__pyx_n_s_value_deserialization_function,&__pyx_n_s_async_writer_queue_size,&__pyx_n_s_async_writer_workers,&__pyx_n_s_async_writer_threadpool,&__pyx_n_s_async_writer_kwargs,&__pyx_n_s_async_ttl,&__pyx_n_s_async_expire,&__pyx_n_s_lazy_kwargs,&__pyx_n_s_async_lazy_recheck,&__pyx_n_s_async_lazy_recheck_kwargs,&__pyx_n_s_async_processor,&__pyx_n_s_async_processor_workers,&__pyx_n_s_async_processor_threadpool,&__pyx_n_s_async_processor_kwargs,&__pyx_n_s_renew_time,&__pyx_n_s_future_sync_check,&__pyx_n_s_initialize,&__pyx_n_s_decorate,&__pyx_n_s_tiered_opts,&__pyx_n_s_ttl_spread,&__pyx_n_s_wait_time,&__pyx_n_s_autonamespace_version_salt,0};
    PyObject* values[33] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
    values[4] = __pyx_dynamic_args->__pyx_arg_key;
    values[5] = ((PyObject *)((PyObject *)Py_None));
    values[6] = ((PyObject *)((PyObject *)Py_None));
    values[7] = ((PyObject *)((PyObject *)Py_None));
    values[8] = ((PyObject *)((PyObject*)__pyx_n_s_pyobj));
    values[9] = ((PyObject *)((PyObject *)Py_None));
    values[10] = ((PyObject *)((PyObject *)Py_None));
    values[11] = ((PyObject *)((PyObject *)Py_None));
    values[12] = ((PyObject *)((PyObject *)Py_None));
    values[13] = ((PyObject *)((PyObject *)Py_None));
    values[14] = ((PyObject *)((PyObject *)Py_None));
    values[15] = ((PyObject *)((PyObject *)Py_None));
    values[16] = ((PyObject *)((PyObject *)Py_None));
    values[17] = ((PyObject *)((PyObject *)Py_None));
    values[18] = __pyx_dynamic_args->__pyx_arg_lazy_kwargs;
    values[19] = ((PyObject *)((PyObject *)Py_False));
    values[20] = __pyx_dynamic_args->__pyx_arg_async_lazy_recheck_kwargs;
    values[21] = ((PyObject *)((PyObject *)Py_None));
    values[22] = ((PyObject *)((PyObject *)Py_None));
    values[23] = ((PyObject *)((PyObject *)Py_None));
    values[24] = ((PyObject *)((PyObject *)Py_None));
    values[25] = ((PyObject *)((PyObject *)Py_None));
    values[26] = ((PyObject *)((PyObject *)Py_None));
    values[27] = ((PyObject *)((PyObject *)Py_None));
    values[28] = ((PyObject *)((PyObject *)Py_None));
    values[29] = ((PyObject *)((PyObject *)Py_None));
    values[30] = ((PyObject *)((PyObject *)Py_True));
    values[31] = ((PyObject *)((PyObject *)Py_None));
    values[32] = ((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 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
        CYTHON_FALLTHROUGH;
        case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
        CYTHON_FALLTHROUGH;
        case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
        CYTHON_FALLTHROUGH;
        case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
        CYTHON_FALLTHROUGH;
        case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
        CYTHON_FALLTHROUGH;
        case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
        CYTHON_FALLTHROUGH;
        case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
        CYTHON_FALLTHROUGH;
        case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
        CYTHON_FALLTHROUGH;
        case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
        CYTHON_FALLTHROUGH;
        case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
        CYTHON_FALLTHROUGH;
        case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
        CYTHON_FALLTHROUGH;
        case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
        CYTHON_FALLTHROUGH;
        case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
        CYTHON_FALLTHROUGH;
        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
        CYTHON_FALLTHROUGH;
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        CYTHON_FALLTHROUGH;
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        CYTHON_FALLTHROUGH;
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        CYTHON_FALLTHROUGH;
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_private)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shared)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("coherent_cached", 0, 4, 33, 1); __PYX_ERR(0, 1245, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ipsub)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("coherent_cached", 0, 4, 33, 2); __PYX_ERR(0, 1245, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ttl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("coherent_cached", 0, 4, 33, 3); __PYX_ERR(0, 1245, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tiered);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_namespace);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coherence_namespace);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coherence_encoding);
          if (value) { values[8] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coherence_timeout);
          if (value) { values[9] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_serialization_function);
          if (value) { values[10] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_deserialization_function);
          if (value) { values[11] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_writer_queue_size);
          if (value) { values[12] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_writer_workers);
          if (value) { values[13] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_writer_threadpool);
          if (value) { values[14] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 15:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_writer_kwargs);
          if (value) { values[15] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 16:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_ttl);
          if (value) { values[16] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 17:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_expire);
          if (value) { values[17] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 18:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lazy_kwargs);
          if (value) { values[18] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 19:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_lazy_recheck);
          if (value) { values[19] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 20:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_lazy_recheck_kwargs);
          if (value) { values[20] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 21:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_processor);
          if (value) { values[21] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 22:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_processor_workers);
          if (value) { values[22] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 23:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_processor_threadpool);
          if (value) { values[23] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 24:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_async_processor_kwargs);
          if (value) { values[24] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 25:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_renew_time);
          if (value) { values[25] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 26:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_future_sync_check);
          if (value) { values[26] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 27:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initialize);
          if (value) { values[27] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 28:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_decorate);
          if (value) { values[28] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 29:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tiered_opts);
          if (value) { values[29] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 30:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ttl_spread);
          if (value) { values[30] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 31:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wait_time);
          if (value) { values[31] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 32:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_autonamespace_version_salt);
          if (value) { values[32] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_coherence_kwargs, values, pos_args, "coherent_cached") < 0)) __PYX_ERR(0, 1245, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
        CYTHON_FALLTHROUGH;
        case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
        CYTHON_FALLTHROUGH;
        case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
        CYTHON_FALLTHROUGH;
        case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
        CYTHON_FALLTHROUGH;
        case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
        CYTHON_FALLTHROUGH;
        case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
        CYTHON_FALLTHROUGH;
        case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
        CYTHON_FALLTHROUGH;
        case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
        CYTHON_FALLTHROUGH;
        case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
        CYTHON_FALLTHROUGH;
        case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
        CYTHON_FALLTHROUGH;
        case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
        CYTHON_FALLTHROUGH;
        case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
        CYTHON_FALLTHROUGH;
        case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
        CYTHON_FALLTHROUGH;
        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
        CYTHON_FALLTHROUGH;
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        CYTHON_FALLTHROUGH;
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        CYTHON_FALLTHROUGH;
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        CYTHON_FALLTHROUGH;
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_private = values[0];
    __pyx_v_shared = values[1];
    __pyx_v_ipsub = values[2];
    __pyx_v_ttl = values[3];
    __pyx_v_key = values[4];
    __pyx_v_tiered_ = values[5];
    __pyx_v_namespace = values[6];
    __pyx_v_coherence_namespace = values[7];
    __pyx_v_coherence_encoding = values[8];
    __pyx_v_coherence_timeout = values[9];
    __pyx_v_value_serialization_function = values[10];
    __pyx_v_value_deserialization_function = values[11];
    __pyx_v_async_writer_queue_size = values[12];
    __pyx_v_async_writer_workers = values[13];
    __pyx_v_async_writer_threadpool = values[14];
    __pyx_v_async_writer_kwargs = values[15];
    __pyx_v_async_ttl = values[16];
    __pyx_v_async_expire = values[17];
    __pyx_v_lazy_kwargs = values[18];
    __pyx_v_async_lazy_recheck = values[19];
    __pyx_v_async_lazy_recheck_kwargs = values[20];
    __pyx_v_async_processor = values[21];
    __pyx_v_async_processor_workers = values[22];
    __pyx_v_async_processor_threadpool = values[23];
    __pyx_v_async_processor_kwargs = values[24];
    __pyx_v_renew_time = values[25];
    __pyx_v_future_sync_check = values[26];
    __pyx_v_initialize = values[27];
    __pyx_v_decorate = values[28];
    __pyx_v_tiered_opts = values[29];
    __pyx_v_ttl_spread = values[30];
    __pyx_v_wait_time = values[31];
    __pyx_v_autonamespace_version_salt = values[32];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coherent_cached", 0, 4, 33, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1245, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_CLEAR(__pyx_v_coherence_kwargs);
  __Pyx_AddTraceback("chorde.decorators.coherent_cached", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6chorde_10decorators_10coherent_cached(__pyx_self, __pyx_v_private, __pyx_v_shared, __pyx_v_ipsub, __pyx_v_ttl, __pyx_v_key, __pyx_v_tiered_, __pyx_v_namespace, __pyx_v_coherence_namespace, __pyx_v_coherence_encoding, __pyx_v_coherence_timeout, __pyx_v_value_serialization_function, __pyx_v_value_deserialization_function, __pyx_v_async_writer_queue_size, __pyx_v_async_writer_workers, __pyx_v_async_writer_threadpool, __pyx_v_async_writer_kwargs, __pyx_v_async_ttl, __pyx_v_async_expire, __pyx_v_lazy_kwargs, __pyx_v_async_lazy_recheck, __pyx_v_async_lazy_recheck_kwargs, __pyx_v_async_processor, __pyx_v_async_processor_workers, __pyx_v_async_processor_threadpool, __pyx_v_async_processor_kwargs, __pyx_v_renew_time, __pyx_v_future_sync_check, __pyx_v_initialize, __pyx_v_decorate, __pyx_v_tiered_opts, __pyx_v_ttl_spread, __pyx_v_wait_time, __pyx_v_autonamespace_version_salt, __pyx_v_coherence_kwargs);

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

/* "chorde/decorators.py":1343
 *         async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 * 
 *         def decor(f):             # <<<<<<<<<<<<<<
 *             if ttl_spread:
 *                 spread_type = type(ttl_spread)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_15coherent_cached_1decor(PyObject *__pyx_self, PyObject *__pyx_v_f); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_15coherent_cached_1decor = {"decor", (PyCFunction)__pyx_pw_6chorde_10decorators_15coherent_cached_1decor, METH_O, 0};
static PyObject *__pyx_pw_6chorde_10decorators_15coherent_cached_1decor(PyObject *__pyx_self, PyObject *__pyx_v_f) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decor (wrapper)", 0);
  __pyx_r = __pyx_pf_6chorde_10decorators_15coherent_cached_decor(__pyx_self, ((PyObject *)__pyx_v_f));

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

static PyObject *__pyx_pf_6chorde_10decorators_15coherent_cached_decor(PyObject *__pyx_self, PyObject *__pyx_v_f) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *__pyx_cur_scope;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *__pyx_outer_scope;
  PyTypeObject *__pyx_v_spread_type = NULL;
  PyObject *__pyx_v_eff_async_ttl = NULL;
  PyObject *__pyx_v_salt2 = NULL;
  PyObject *__pyx_v__coherence_namespace = NULL;
  PyObject *__pyx_v__namespace = NULL;
  PyObject *__pyx_v_nprivate = NULL;
  PyObject *__pyx_v_shareds = NULL;
  PyObject *__pyx_v_sharedt = NULL;
  PyObject *__pyx_v_ntiered = NULL;
  PyObject *__pyx_v_nshared = NULL;
  PyObject *__pyx_v_coherence_manager = NULL;
  PyObject *__pyx_v_nclient = NULL;
  PyObject *__pyx_v_expired_ttl = NULL;
  PyObject *__pyx_v_rv = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decor", 0);
  __pyx_outer_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "chorde/decorators.py":1344
 * 
 *         def decor(f):
 *             if ttl_spread:             # <<<<<<<<<<<<<<
 *                 spread_type = type(ttl_spread)
 *                 eff_async_ttl = max(async_ttl / 2, async_ttl - spread_type(ttl_spread * 0.25 * random.random()))
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_ttl_spread)) { __Pyx_RaiseClosureNameError("ttl_spread"); __PYX_ERR(0, 1344, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_ttl_spread); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1344, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1345
 *         def decor(f):
 *             if ttl_spread:
 *                 spread_type = type(ttl_spread)             # <<<<<<<<<<<<<<
 *                 eff_async_ttl = max(async_ttl / 2, async_ttl - spread_type(ttl_spread * 0.25 * random.random()))
 *             else:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_ttl_spread)) { __Pyx_RaiseClosureNameError("ttl_spread"); __PYX_ERR(0, 1345, __pyx_L1_error) }
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_ttl_spread)));
    __pyx_v_spread_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_ttl_spread)));

    /* "chorde/decorators.py":1346
 *             if ttl_spread:
 *                 spread_type = type(ttl_spread)
 *                 eff_async_ttl = max(async_ttl / 2, async_ttl - spread_type(ttl_spread * 0.25 * random.random()))             # <<<<<<<<<<<<<<
 *             else:
 *                 eff_async_ttl = None
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 1346, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_v_ttl_spread)) { __Pyx_RaiseClosureNameError("ttl_spread"); __PYX_ERR(0, 1346, __pyx_L1_error) }
    __pyx_t_2 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_ttl_spread, __pyx_float_0_25); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_random); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_random); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_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, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v_spread_type), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_async_ttl, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 1346, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_cur_scope->__pyx_v_async_ttl, __pyx_int_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1346, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_2 = __pyx_t_5;
    } else {
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_2 = __pyx_t_3;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_eff_async_ttl = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":1344
 * 
 *         def decor(f):
 *             if ttl_spread:             # <<<<<<<<<<<<<<
 *                 spread_type = type(ttl_spread)
 *                 eff_async_ttl = max(async_ttl / 2, async_ttl - spread_type(ttl_spread * 0.25 * random.random()))
 */
    goto __pyx_L3;
  }

  /* "chorde/decorators.py":1348
 *                 eff_async_ttl = max(async_ttl / 2, async_ttl - spread_type(ttl_spread * 0.25 * random.random()))
 *             else:
 *                 eff_async_ttl = None             # <<<<<<<<<<<<<<
 * 
 *             salt2 = repr((ttl,))
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __pyx_v_eff_async_ttl = Py_None;
  }
  __pyx_L3:;

  /* "chorde/decorators.py":1350
 *                 eff_async_ttl = None
 * 
 *             salt2 = repr((ttl,))             # <<<<<<<<<<<<<<
 *             if coherence_namespace is None:
 *                 _coherence_namespace = _make_namespace(f, salt = autonamespace_version_salt, salt2 = salt2)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_ttl)) { __Pyx_RaiseClosureNameError("ttl"); __PYX_ERR(0, 1350, __pyx_L1_error) }
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ttl);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_ttl);
  __pyx_t_2 = PyObject_Repr(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_salt2 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "chorde/decorators.py":1351
 * 
 *             salt2 = repr((ttl,))
 *             if coherence_namespace is None:             # <<<<<<<<<<<<<<
 *                 _coherence_namespace = _make_namespace(f, salt = autonamespace_version_salt, salt2 = salt2)
 *             else:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_coherence_namespace)) { __Pyx_RaiseClosureNameError("coherence_namespace"); __PYX_ERR(0, 1351, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_coherence_namespace == Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "chorde/decorators.py":1352
 *             salt2 = repr((ttl,))
 *             if coherence_namespace is None:
 *                 _coherence_namespace = _make_namespace(f, salt = autonamespace_version_salt, salt2 = salt2)             # <<<<<<<<<<<<<<
 *             else:
 *                 _coherence_namespace = coherence_namespace
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_make_namespace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_f);
    __Pyx_GIVEREF(__pyx_v_f);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_f);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(!__pyx_cur_scope->__pyx_v_autonamespace_version_salt)) { __Pyx_RaiseClosureNameError("autonamespace_version_salt"); __PYX_ERR(0, 1352, __pyx_L1_error) }
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_salt, __pyx_cur_scope->__pyx_v_autonamespace_version_salt) < 0) __PYX_ERR(0, 1352, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_salt2, __pyx_v_salt2) < 0) __PYX_ERR(0, 1352, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v__coherence_namespace = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":1351
 * 
 *             salt2 = repr((ttl,))
 *             if coherence_namespace is None:             # <<<<<<<<<<<<<<
 *                 _coherence_namespace = _make_namespace(f, salt = autonamespace_version_salt, salt2 = salt2)
 *             else:
 */
    goto __pyx_L4;
  }

  /* "chorde/decorators.py":1354
 *                 _coherence_namespace = _make_namespace(f, salt = autonamespace_version_salt, salt2 = salt2)
 *             else:
 *                 _coherence_namespace = coherence_namespace             # <<<<<<<<<<<<<<
 * 
 *             if namespace is None:
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_v_coherence_namespace)) { __Pyx_RaiseClosureNameError("coherence_namespace"); __PYX_ERR(0, 1354, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_coherence_namespace);
    __pyx_v__coherence_namespace = __pyx_cur_scope->__pyx_v_coherence_namespace;
  }
  __pyx_L4:;

  /* "chorde/decorators.py":1356
 *                 _coherence_namespace = coherence_namespace
 * 
 *             if namespace is None:             # <<<<<<<<<<<<<<
 *                 _namespace = _make_namespace(f, salt = autonamespace_version_salt, salt2 = salt2)
 *             else:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_namespace)) { __Pyx_RaiseClosureNameError("namespace"); __PYX_ERR(0, 1356, __pyx_L1_error) }
  __pyx_t_6 = (__pyx_cur_scope->__pyx_v_namespace == Py_None);
  __pyx_t_1 = (__pyx_t_6 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1357
 * 
 *             if namespace is None:
 *                 _namespace = _make_namespace(f, salt = autonamespace_version_salt, salt2 = salt2)             # <<<<<<<<<<<<<<
 *             else:
 *                 _namespace = namespace
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_make_namespace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_f);
    __Pyx_GIVEREF(__pyx_v_f);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(!__pyx_cur_scope->__pyx_v_autonamespace_version_salt)) { __Pyx_RaiseClosureNameError("autonamespace_version_salt"); __PYX_ERR(0, 1357, __pyx_L1_error) }
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_salt, __pyx_cur_scope->__pyx_v_autonamespace_version_salt) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_salt2, __pyx_v_salt2) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v__namespace = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "chorde/decorators.py":1356
 *                 _coherence_namespace = coherence_namespace
 * 
 *             if namespace is None:             # <<<<<<<<<<<<<<
 *                 _namespace = _make_namespace(f, salt = autonamespace_version_salt, salt2 = salt2)
 *             else:
 */
    goto __pyx_L5;
  }

  /* "chorde/decorators.py":1359
 *                 _namespace = _make_namespace(f, salt = autonamespace_version_salt, salt2 = salt2)
 *             else:
 *                 _namespace = namespace             # <<<<<<<<<<<<<<
 * 
 *             if not private.is_async:
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_v_namespace)) { __Pyx_RaiseClosureNameError("namespace"); __PYX_ERR(0, 1359, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_namespace);
    __pyx_v__namespace = __pyx_cur_scope->__pyx_v_namespace;
  }
  __pyx_L5:;

  /* "chorde/decorators.py":1361
 *                 _namespace = namespace
 * 
 *             if not private.is_async:             # <<<<<<<<<<<<<<
 *                 nprivate = asyncache.AsyncWriteCacheClient(private,
 *                     async_writer_queue_size,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_private)) { __Pyx_RaiseClosureNameError("private"); __PYX_ERR(0, 1361, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_private, __pyx_n_s_is_async); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1361, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = ((!__pyx_t_1) != 0);
  if (__pyx_t_6) {

    /* "chorde/decorators.py":1362
 * 
 *             if not private.is_async:
 *                 nprivate = asyncache.AsyncWriteCacheClient(private,             # <<<<<<<<<<<<<<
 *                     async_writer_queue_size,
 *                     async_writer_workers,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AsyncWriteCacheClient); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_private)) { __Pyx_RaiseClosureNameError("private"); __PYX_ERR(0, 1362, __pyx_L1_error) }

    /* "chorde/decorators.py":1363
 *             if not private.is_async:
 *                 nprivate = asyncache.AsyncWriteCacheClient(private,
 *                     async_writer_queue_size,             # <<<<<<<<<<<<<<
 *                     async_writer_workers,
 *                     **async_writer_kwargs)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_async_writer_queue_size)) { __Pyx_RaiseClosureNameError("async_writer_queue_size"); __PYX_ERR(0, 1363, __pyx_L1_error) }

    /* "chorde/decorators.py":1364
 *                 nprivate = asyncache.AsyncWriteCacheClient(private,
 *                     async_writer_queue_size,
 *                     async_writer_workers,             # <<<<<<<<<<<<<<
 *                     **async_writer_kwargs)
 *             else:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_async_writer_workers)) { __Pyx_RaiseClosureNameError("async_writer_workers"); __PYX_ERR(0, 1364, __pyx_L1_error) }

    /* "chorde/decorators.py":1362
 * 
 *             if not private.is_async:
 *                 nprivate = asyncache.AsyncWriteCacheClient(private,             # <<<<<<<<<<<<<<
 *                     async_writer_queue_size,
 *                     async_writer_workers,
 */
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_private);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_private);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_private);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_writer_queue_size);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_writer_queue_size);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_async_writer_queue_size);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_writer_workers);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_writer_workers);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_cur_scope->__pyx_v_async_writer_workers);

    /* "chorde/decorators.py":1365
 *                     async_writer_queue_size,
 *                     async_writer_workers,
 *                     **async_writer_kwargs)             # <<<<<<<<<<<<<<
 *             else:
 *                 nprivate = private
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_async_writer_kwargs)) { __Pyx_RaiseClosureNameError("async_writer_kwargs"); __PYX_ERR(0, 1365, __pyx_L1_error) }
    if (unlikely(__pyx_cur_scope->__pyx_v_async_writer_kwargs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 1365, __pyx_L1_error)
    }
    if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_v_async_writer_kwargs))) {
      __pyx_t_3 = PyDict_Copy(__pyx_cur_scope->__pyx_v_async_writer_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_v_async_writer_kwargs, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }

    /* "chorde/decorators.py":1362
 * 
 *             if not private.is_async:
 *                 nprivate = asyncache.AsyncWriteCacheClient(private,             # <<<<<<<<<<<<<<
 *                     async_writer_queue_size,
 *                     async_writer_workers,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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_v_nprivate = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":1361
 *                 _namespace = namespace
 * 
 *             if not private.is_async:             # <<<<<<<<<<<<<<
 *                 nprivate = asyncache.AsyncWriteCacheClient(private,
 *                     async_writer_queue_size,
 */
    goto __pyx_L6;
  }

  /* "chorde/decorators.py":1367
 *                     **async_writer_kwargs)
 *             else:
 *                 nprivate = private             # <<<<<<<<<<<<<<
 * 
 *             if not isinstance(shared, tuple):
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_v_private)) { __Pyx_RaiseClosureNameError("private"); __PYX_ERR(0, 1367, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_private);
    __pyx_v_nprivate = __pyx_cur_scope->__pyx_v_private;
  }
  __pyx_L6:;

  /* "chorde/decorators.py":1369
 *                 nprivate = private
 * 
 *             if not isinstance(shared, tuple):             # <<<<<<<<<<<<<<
 *                 shareds = (shared,)
 *                 sharedt = shared
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_shared)) { __Pyx_RaiseClosureNameError("shared"); __PYX_ERR(0, 1369, __pyx_L1_error) }
  __pyx_t_4 = __pyx_cur_scope->__pyx_v_shared;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = PyTuple_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((!(__pyx_t_6 != 0)) != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1370
 * 
 *             if not isinstance(shared, tuple):
 *                 shareds = (shared,)             # <<<<<<<<<<<<<<
 *                 sharedt = shared
 *             elif len(shared) == 1:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_shared)) { __Pyx_RaiseClosureNameError("shared"); __PYX_ERR(0, 1370, __pyx_L1_error) }
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_shared);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_shared);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_shared);
    __pyx_v_shareds = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":1371
 *             if not isinstance(shared, tuple):
 *                 shareds = (shared,)
 *                 sharedt = shared             # <<<<<<<<<<<<<<
 *             elif len(shared) == 1:
 *                 shareds = shared
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_shared)) { __Pyx_RaiseClosureNameError("shared"); __PYX_ERR(0, 1371, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_shared);
    __pyx_v_sharedt = __pyx_cur_scope->__pyx_v_shared;

    /* "chorde/decorators.py":1369
 *                 nprivate = private
 * 
 *             if not isinstance(shared, tuple):             # <<<<<<<<<<<<<<
 *                 shareds = (shared,)
 *                 sharedt = shared
 */
    goto __pyx_L7;
  }

  /* "chorde/decorators.py":1372
 *                 shareds = (shared,)
 *                 sharedt = shared
 *             elif len(shared) == 1:             # <<<<<<<<<<<<<<
 *                 shareds = shared
 *                 sharedt = shared[0]
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_shared)) { __Pyx_RaiseClosureNameError("shared"); __PYX_ERR(0, 1372, __pyx_L1_error) }
  __pyx_t_4 = __pyx_cur_scope->__pyx_v_shared;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((__pyx_t_7 == 1) != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1373
 *                 sharedt = shared
 *             elif len(shared) == 1:
 *                 shareds = shared             # <<<<<<<<<<<<<<
 *                 sharedt = shared[0]
 *             else:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_shared)) { __Pyx_RaiseClosureNameError("shared"); __PYX_ERR(0, 1373, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_shared);
    __pyx_v_shareds = __pyx_cur_scope->__pyx_v_shared;

    /* "chorde/decorators.py":1374
 *             elif len(shared) == 1:
 *                 shareds = shared
 *                 sharedt = shared[0]             # <<<<<<<<<<<<<<
 *             else:
 *                 shareds = shared
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_shared)) { __Pyx_RaiseClosureNameError("shared"); __PYX_ERR(0, 1374, __pyx_L1_error) }
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_shared, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_sharedt = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":1372
 *                 shareds = (shared,)
 *                 sharedt = shared
 *             elif len(shared) == 1:             # <<<<<<<<<<<<<<
 *                 shareds = shared
 *                 sharedt = shared[0]
 */
    goto __pyx_L7;
  }

  /* "chorde/decorators.py":1376
 *                 sharedt = shared[0]
 *             else:
 *                 shareds = shared             # <<<<<<<<<<<<<<
 *                 sharedt = tiered.TieredInclusiveClient(*shareds, **(tiered_opts or {}))
 * 
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_v_shared)) { __Pyx_RaiseClosureNameError("shared"); __PYX_ERR(0, 1376, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_shared);
    __pyx_v_shareds = __pyx_cur_scope->__pyx_v_shared;

    /* "chorde/decorators.py":1377
 *             else:
 *                 shareds = shared
 *                 sharedt = tiered.TieredInclusiveClient(*shareds, **(tiered_opts or {}))             # <<<<<<<<<<<<<<
 * 
 *             if tiered_ is None:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_tiered_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TieredInclusiveClient); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_shareds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(!__pyx_cur_scope->__pyx_v_tiered_opts)) { __Pyx_RaiseClosureNameError("tiered_opts"); __PYX_ERR(0, 1377, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_tiered_opts); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1377, __pyx_L1_error)
    if (!__pyx_t_1) {
    } else {
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tiered_opts);
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_tiered_opts;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_5 = __pyx_t_8;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_L8_bool_binop_done:;
    if (unlikely(__pyx_t_5 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 1377, __pyx_L1_error)
    }
    if (likely(PyDict_CheckExact(__pyx_t_5))) {
      __pyx_t_2 = PyDict_Copy(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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;
    __pyx_v_sharedt = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_L7:;

  /* "chorde/decorators.py":1379
 *                 sharedt = tiered.TieredInclusiveClient(*shareds, **(tiered_opts or {}))
 * 
 *             if tiered_ is None:             # <<<<<<<<<<<<<<
 *                 ntiered = tiered.TieredInclusiveClient(nprivate, *shareds, **(tiered_opts or {}))
 *             else:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_tiered_)) { __Pyx_RaiseClosureNameError("tiered_"); __PYX_ERR(0, 1379, __pyx_L1_error) }
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_tiered_ == Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "chorde/decorators.py":1380
 * 
 *             if tiered_ is None:
 *                 ntiered = tiered.TieredInclusiveClient(nprivate, *shareds, **(tiered_opts or {}))             # <<<<<<<<<<<<<<
 *             else:
 *                 ntiered = tiered_
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_tiered_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TieredInclusiveClient); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_nprivate);
    __Pyx_GIVEREF(__pyx_v_nprivate);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_nprivate);
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_shareds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_tiered_opts)) { __Pyx_RaiseClosureNameError("tiered_opts"); __PYX_ERR(0, 1380, __pyx_L1_error) }
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_tiered_opts); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1380, __pyx_L1_error)
    if (!__pyx_t_6) {
    } else {
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tiered_opts);
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_tiered_opts;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_5 = __pyx_t_8;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_L11_bool_binop_done:;
    if (unlikely(__pyx_t_5 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
      __PYX_ERR(0, 1380, __pyx_L1_error)
    }
    if (likely(PyDict_CheckExact(__pyx_t_5))) {
      __pyx_t_4 = PyDict_Copy(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_4 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_ntiered = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":1379
 *                 sharedt = tiered.TieredInclusiveClient(*shareds, **(tiered_opts or {}))
 * 
 *             if tiered_ is None:             # <<<<<<<<<<<<<<
 *                 ntiered = tiered.TieredInclusiveClient(nprivate, *shareds, **(tiered_opts or {}))
 *             else:
 */
    goto __pyx_L10;
  }

  /* "chorde/decorators.py":1382
 *                 ntiered = tiered.TieredInclusiveClient(nprivate, *shareds, **(tiered_opts or {}))
 *             else:
 *                 ntiered = tiered_             # <<<<<<<<<<<<<<
 * 
 *             if _namespace is not NO_NAMESPACE:
 */
  /*else*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_v_tiered_)) { __Pyx_RaiseClosureNameError("tiered_"); __PYX_ERR(0, 1382, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tiered_);
    __pyx_v_ntiered = __pyx_cur_scope->__pyx_v_tiered_;
  }
  __pyx_L10:;

  /* "chorde/decorators.py":1384
 *                 ntiered = tiered_
 * 
 *             if _namespace is not NO_NAMESPACE:             # <<<<<<<<<<<<<<
 *                 ntiered = base.NamespaceWrapper(_namespace, ntiered)
 *                 nprivate = base.NamespaceMirrorWrapper(ntiered, nprivate)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_NO_NAMESPACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = (__pyx_v__namespace != __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = (__pyx_t_6 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1385
 * 
 *             if _namespace is not NO_NAMESPACE:
 *                 ntiered = base.NamespaceWrapper(_namespace, ntiered)             # <<<<<<<<<<<<<<
 *                 nprivate = base.NamespaceMirrorWrapper(ntiered, nprivate)
 *                 nshared = base.NamespaceMirrorWrapper(ntiered, sharedt)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_base); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_NamespaceWrapper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_9 = 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_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v__namespace, __pyx_v_ntiered};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v__namespace, __pyx_v_ntiered};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v__namespace);
      __Pyx_GIVEREF(__pyx_v__namespace);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_9, __pyx_v__namespace);
      __Pyx_INCREF(__pyx_v_ntiered);
      __Pyx_GIVEREF(__pyx_v_ntiered);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_9, __pyx_v_ntiered);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_ntiered, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":1386
 *             if _namespace is not NO_NAMESPACE:
 *                 ntiered = base.NamespaceWrapper(_namespace, ntiered)
 *                 nprivate = base.NamespaceMirrorWrapper(ntiered, nprivate)             # <<<<<<<<<<<<<<
 *                 nshared = base.NamespaceMirrorWrapper(ntiered, sharedt)
 *             else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_NamespaceMirrorWrapper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_9 = 0;
    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_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ntiered, __pyx_v_nprivate};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1386, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_ntiered, __pyx_v_nprivate};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1386, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_ntiered);
      __Pyx_GIVEREF(__pyx_v_ntiered);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_v_ntiered);
      __Pyx_INCREF(__pyx_v_nprivate);
      __Pyx_GIVEREF(__pyx_v_nprivate);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_v_nprivate);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_nprivate, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":1387
 *                 ntiered = base.NamespaceWrapper(_namespace, ntiered)
 *                 nprivate = base.NamespaceMirrorWrapper(ntiered, nprivate)
 *                 nshared = base.NamespaceMirrorWrapper(ntiered, sharedt)             # <<<<<<<<<<<<<<
 *             else:
 *                 nshared = sharedt
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NamespaceMirrorWrapper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(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_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_ntiered, __pyx_v_sharedt};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_ntiered, __pyx_v_sharedt};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_INCREF(__pyx_v_ntiered);
      __Pyx_GIVEREF(__pyx_v_ntiered);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, __pyx_v_ntiered);
      __Pyx_INCREF(__pyx_v_sharedt);
      __Pyx_GIVEREF(__pyx_v_sharedt);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, __pyx_v_sharedt);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_nshared = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "chorde/decorators.py":1384
 *                 ntiered = tiered_
 * 
 *             if _namespace is not NO_NAMESPACE:             # <<<<<<<<<<<<<<
 *                 ntiered = base.NamespaceWrapper(_namespace, ntiered)
 *                 nprivate = base.NamespaceMirrorWrapper(ntiered, nprivate)
 */
    goto __pyx_L13;
  }

  /* "chorde/decorators.py":1389
 *                 nshared = base.NamespaceMirrorWrapper(ntiered, sharedt)
 *             else:
 *                 nshared = sharedt             # <<<<<<<<<<<<<<
 * 
 *             coherence_manager = coherence.CoherenceManager(
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_sharedt);
    __pyx_v_nshared = __pyx_v_sharedt;
  }
  __pyx_L13:;

  /* "chorde/decorators.py":1391
 *                 nshared = sharedt
 * 
 *             coherence_manager = coherence.CoherenceManager(             # <<<<<<<<<<<<<<
 *                 _coherence_namespace, nprivate, nshared, ipsub,
 *                 encoding = coherence_encoding,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_coherence); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_CoherenceManager); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "chorde/decorators.py":1392
 * 
 *             coherence_manager = coherence.CoherenceManager(
 *                 _coherence_namespace, nprivate, nshared, ipsub,             # <<<<<<<<<<<<<<
 *                 encoding = coherence_encoding,
 *                 **coherence_kwargs)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_ipsub)) { __Pyx_RaiseClosureNameError("ipsub"); __PYX_ERR(0, 1392, __pyx_L1_error) }

  /* "chorde/decorators.py":1391
 *                 nshared = sharedt
 * 
 *             coherence_manager = coherence.CoherenceManager(             # <<<<<<<<<<<<<<
 *                 _coherence_namespace, nprivate, nshared, ipsub,
 *                 encoding = coherence_encoding,
 */
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v__coherence_namespace);
  __Pyx_GIVEREF(__pyx_v__coherence_namespace);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__coherence_namespace);
  __Pyx_INCREF(__pyx_v_nprivate);
  __Pyx_GIVEREF(__pyx_v_nprivate);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_nprivate);
  __Pyx_INCREF(__pyx_v_nshared);
  __Pyx_GIVEREF(__pyx_v_nshared);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_nshared);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ipsub);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ipsub);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_cur_scope->__pyx_v_ipsub);

  /* "chorde/decorators.py":1393
 *             coherence_manager = coherence.CoherenceManager(
 *                 _coherence_namespace, nprivate, nshared, ipsub,
 *                 encoding = coherence_encoding,             # <<<<<<<<<<<<<<
 *                 **coherence_kwargs)
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_coherence_encoding)) { __Pyx_RaiseClosureNameError("coherence_encoding"); __PYX_ERR(0, 1393, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_cur_scope->__pyx_v_coherence_encoding) < 0) __PYX_ERR(0, 1393, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "chorde/decorators.py":1394
 *                 _coherence_namespace, nprivate, nshared, ipsub,
 *                 encoding = coherence_encoding,
 *                 **coherence_kwargs)             # <<<<<<<<<<<<<<
 * 
 *             nclient = coherent.CoherentWrapperClient(ntiered, coherence_manager, coherence_timeout)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_coherence_kwargs)) { __Pyx_RaiseClosureNameError("coherence_kwargs"); __PYX_ERR(0, 1394, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_coherence_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 1394, __pyx_L1_error)
  }
  if (__Pyx_MergeKeywords(__pyx_t_3, __pyx_cur_scope->__pyx_v_coherence_kwargs) < 0) __PYX_ERR(0, 1394, __pyx_L1_error)

  /* "chorde/decorators.py":1391
 *                 nshared = sharedt
 * 
 *             coherence_manager = coherence.CoherenceManager(             # <<<<<<<<<<<<<<
 *                 _coherence_namespace, nprivate, nshared, ipsub,
 *                 encoding = coherence_encoding,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_coherence_manager = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "chorde/decorators.py":1396
 *                 **coherence_kwargs)
 * 
 *             nclient = coherent.CoherentWrapperClient(ntiered, coherence_manager, coherence_timeout)             # <<<<<<<<<<<<<<
 * 
 *             expired_ttl = async_ttl
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_coherent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CoherentWrapperClient); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_v_coherence_timeout)) { __Pyx_RaiseClosureNameError("coherence_timeout"); __PYX_ERR(0, 1396, __pyx_L1_error) }
  __pyx_t_3 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(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_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_ntiered, __pyx_v_coherence_manager, __pyx_cur_scope->__pyx_v_coherence_timeout};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_ntiered, __pyx_v_coherence_manager, __pyx_cur_scope->__pyx_v_coherence_timeout};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_ntiered);
    __Pyx_GIVEREF(__pyx_v_ntiered);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_v_ntiered);
    __Pyx_INCREF(__pyx_v_coherence_manager);
    __Pyx_GIVEREF(__pyx_v_coherence_manager);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_v_coherence_manager);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_coherence_timeout);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_coherence_timeout);
    PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_9, __pyx_cur_scope->__pyx_v_coherence_timeout);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_nclient = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "chorde/decorators.py":1398
 *             nclient = coherent.CoherentWrapperClient(ntiered, coherence_manager, coherence_timeout)
 * 
 *             expired_ttl = async_ttl             # <<<<<<<<<<<<<<
 *             if eff_async_ttl:
 *                 expired_ttl = max(expired_ttl, eff_async_ttl)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 1398, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_ttl);
  __pyx_v_expired_ttl = __pyx_cur_scope->__pyx_v_async_ttl;

  /* "chorde/decorators.py":1399
 * 
 *             expired_ttl = async_ttl
 *             if eff_async_ttl:             # <<<<<<<<<<<<<<
 *                 expired_ttl = max(expired_ttl, eff_async_ttl)
 *             if renew_time:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eff_async_ttl); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1399, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1400
 *             expired_ttl = async_ttl
 *             if eff_async_ttl:
 *                 expired_ttl = max(expired_ttl, eff_async_ttl)             # <<<<<<<<<<<<<<
 *             if renew_time:
 *                 expired_ttl = max(expired_ttl, (eff_async_ttl or async_ttl) + renew_time)
 */
    __Pyx_INCREF(__pyx_v_eff_async_ttl);
    __pyx_t_2 = __pyx_v_eff_async_ttl;
    __Pyx_INCREF(__pyx_v_expired_ttl);
    __pyx_t_5 = __pyx_v_expired_ttl;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1400, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1400, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = __pyx_t_2;
    } else {
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_4 = __pyx_t_5;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __pyx_t_4;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_expired_ttl, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "chorde/decorators.py":1399
 * 
 *             expired_ttl = async_ttl
 *             if eff_async_ttl:             # <<<<<<<<<<<<<<
 *                 expired_ttl = max(expired_ttl, eff_async_ttl)
 *             if renew_time:
 */
  }

  /* "chorde/decorators.py":1401
 *             if eff_async_ttl:
 *                 expired_ttl = max(expired_ttl, eff_async_ttl)
 *             if renew_time:             # <<<<<<<<<<<<<<
 *                 expired_ttl = max(expired_ttl, (eff_async_ttl or async_ttl) + renew_time)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 1401, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_renew_time); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1401, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1402
 *                 expired_ttl = max(expired_ttl, eff_async_ttl)
 *             if renew_time:
 *                 expired_ttl = max(expired_ttl, (eff_async_ttl or async_ttl) + renew_time)             # <<<<<<<<<<<<<<
 * 
 *             rv = cached(nclient, ttl,
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eff_async_ttl); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1402, __pyx_L1_error)
    if (!__pyx_t_1) {
    } else {
      __Pyx_INCREF(__pyx_v_eff_async_ttl);
      __pyx_t_2 = __pyx_v_eff_async_ttl;
      goto __pyx_L16_bool_binop_done;
    }
    if (unlikely(!__pyx_cur_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 1402, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_ttl);
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_async_ttl;
    __pyx_L16_bool_binop_done:;
    if (unlikely(!__pyx_cur_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 1402, __pyx_L1_error) }
    __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_cur_scope->__pyx_v_renew_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v_expired_ttl);
    __pyx_t_2 = __pyx_v_expired_ttl;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __pyx_t_4;
    } else {
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = __pyx_t_2;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_expired_ttl, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "chorde/decorators.py":1401
 *             if eff_async_ttl:
 *                 expired_ttl = max(expired_ttl, eff_async_ttl)
 *             if renew_time:             # <<<<<<<<<<<<<<
 *                 expired_ttl = max(expired_ttl, (eff_async_ttl or async_ttl) + renew_time)
 * 
 */
  }

  /* "chorde/decorators.py":1404
 *                 expired_ttl = max(expired_ttl, (eff_async_ttl or async_ttl) + renew_time)
 * 
 *             rv = cached(nclient, ttl,             # <<<<<<<<<<<<<<
 *                 namespace = NO_NAMESPACE, # Already covered
 *                 key = key,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_cached); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(!__pyx_cur_scope->__pyx_v_ttl)) { __Pyx_RaiseClosureNameError("ttl"); __PYX_ERR(0, 1404, __pyx_L1_error) }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_nclient);
  __Pyx_GIVEREF(__pyx_v_nclient);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_nclient);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ttl);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_ttl);

  /* "chorde/decorators.py":1405
 * 
 *             rv = cached(nclient, ttl,
 *                 namespace = NO_NAMESPACE, # Already covered             # <<<<<<<<<<<<<<
 *                 key = key,
 *                 value_serialization_function = value_serialization_function,
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NO_NAMESPACE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_namespace, __pyx_t_8) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "chorde/decorators.py":1406
 *             rv = cached(nclient, ttl,
 *                 namespace = NO_NAMESPACE, # Already covered
 *                 key = key,             # <<<<<<<<<<<<<<
 *                 value_serialization_function = value_serialization_function,
 *                 value_deserialization_function = value_deserialization_function,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_key)) { __Pyx_RaiseClosureNameError("key"); __PYX_ERR(0, 1406, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_key, __pyx_cur_scope->__pyx_v_key) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1407
 *                 namespace = NO_NAMESPACE, # Already covered
 *                 key = key,
 *                 value_serialization_function = value_serialization_function,             # <<<<<<<<<<<<<<
 *                 value_deserialization_function = value_deserialization_function,
 *                 async_writer_queue_size = async_writer_queue_size,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_value_serialization_function)) { __Pyx_RaiseClosureNameError("value_serialization_function"); __PYX_ERR(0, 1407, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_value_serialization_function, __pyx_cur_scope->__pyx_v_value_serialization_function) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1408
 *                 key = key,
 *                 value_serialization_function = value_serialization_function,
 *                 value_deserialization_function = value_deserialization_function,             # <<<<<<<<<<<<<<
 *                 async_writer_queue_size = async_writer_queue_size,
 *                 async_writer_workers = async_writer_workers,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_value_deserialization_function)) { __Pyx_RaiseClosureNameError("value_deserialization_function"); __PYX_ERR(0, 1408, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_value_deserialization_function, __pyx_cur_scope->__pyx_v_value_deserialization_function) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1409
 *                 value_serialization_function = value_serialization_function,
 *                 value_deserialization_function = value_deserialization_function,
 *                 async_writer_queue_size = async_writer_queue_size,             # <<<<<<<<<<<<<<
 *                 async_writer_workers = async_writer_workers,
 *                 async_writer_threadpool = async_writer_threadpool,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_writer_queue_size)) { __Pyx_RaiseClosureNameError("async_writer_queue_size"); __PYX_ERR(0, 1409, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_writer_queue_size, __pyx_cur_scope->__pyx_v_async_writer_queue_size) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1410
 *                 value_deserialization_function = value_deserialization_function,
 *                 async_writer_queue_size = async_writer_queue_size,
 *                 async_writer_workers = async_writer_workers,             # <<<<<<<<<<<<<<
 *                 async_writer_threadpool = async_writer_threadpool,
 *                 async_writer_kwargs = async_writer_kwargs,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_writer_workers)) { __Pyx_RaiseClosureNameError("async_writer_workers"); __PYX_ERR(0, 1410, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_writer_workers, __pyx_cur_scope->__pyx_v_async_writer_workers) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1411
 *                 async_writer_queue_size = async_writer_queue_size,
 *                 async_writer_workers = async_writer_workers,
 *                 async_writer_threadpool = async_writer_threadpool,             # <<<<<<<<<<<<<<
 *                 async_writer_kwargs = async_writer_kwargs,
 *                 async_ttl = async_ttl,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_writer_threadpool)) { __Pyx_RaiseClosureNameError("async_writer_threadpool"); __PYX_ERR(0, 1411, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_writer_threadpool, __pyx_cur_scope->__pyx_v_async_writer_threadpool) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1412
 *                 async_writer_workers = async_writer_workers,
 *                 async_writer_threadpool = async_writer_threadpool,
 *                 async_writer_kwargs = async_writer_kwargs,             # <<<<<<<<<<<<<<
 *                 async_ttl = async_ttl,
 *                 async_expire = async_expire,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_writer_kwargs)) { __Pyx_RaiseClosureNameError("async_writer_kwargs"); __PYX_ERR(0, 1412, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_writer_kwargs, __pyx_cur_scope->__pyx_v_async_writer_kwargs) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1413
 *                 async_writer_threadpool = async_writer_threadpool,
 *                 async_writer_kwargs = async_writer_kwargs,
 *                 async_ttl = async_ttl,             # <<<<<<<<<<<<<<
 *                 async_expire = async_expire,
 *                 initialize = initialize,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_ttl)) { __Pyx_RaiseClosureNameError("async_ttl"); __PYX_ERR(0, 1413, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_ttl, __pyx_cur_scope->__pyx_v_async_ttl) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1414
 *                 async_writer_kwargs = async_writer_kwargs,
 *                 async_ttl = async_ttl,
 *                 async_expire = async_expire,             # <<<<<<<<<<<<<<
 *                 initialize = initialize,
 *                 decorate = decorate,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_expire)) { __Pyx_RaiseClosureNameError("async_expire"); __PYX_ERR(0, 1414, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_expire, __pyx_cur_scope->__pyx_v_async_expire) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1415
 *                 async_ttl = async_ttl,
 *                 async_expire = async_expire,
 *                 initialize = initialize,             # <<<<<<<<<<<<<<
 *                 decorate = decorate,
 *                 lazy_kwargs = lazy_kwargs,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_initialize)) { __Pyx_RaiseClosureNameError("initialize"); __PYX_ERR(0, 1415, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_initialize, __pyx_cur_scope->__pyx_v_initialize) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1416
 *                 async_expire = async_expire,
 *                 initialize = initialize,
 *                 decorate = decorate,             # <<<<<<<<<<<<<<
 *                 lazy_kwargs = lazy_kwargs,
 *                 async_lazy_recheck = async_lazy_recheck,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_decorate)) { __Pyx_RaiseClosureNameError("decorate"); __PYX_ERR(0, 1416, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_decorate, __pyx_cur_scope->__pyx_v_decorate) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1417
 *                 initialize = initialize,
 *                 decorate = decorate,
 *                 lazy_kwargs = lazy_kwargs,             # <<<<<<<<<<<<<<
 *                 async_lazy_recheck = async_lazy_recheck,
 *                 async_lazy_recheck_kwargs = async_lazy_recheck_kwargs,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_lazy_kwargs)) { __Pyx_RaiseClosureNameError("lazy_kwargs"); __PYX_ERR(0, 1417, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_lazy_kwargs, __pyx_cur_scope->__pyx_v_lazy_kwargs) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1418
 *                 decorate = decorate,
 *                 lazy_kwargs = lazy_kwargs,
 *                 async_lazy_recheck = async_lazy_recheck,             # <<<<<<<<<<<<<<
 *                 async_lazy_recheck_kwargs = async_lazy_recheck_kwargs,
 *                 async_processor = async_processor,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_lazy_recheck)) { __Pyx_RaiseClosureNameError("async_lazy_recheck"); __PYX_ERR(0, 1418, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_lazy_recheck, __pyx_cur_scope->__pyx_v_async_lazy_recheck) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1419
 *                 lazy_kwargs = lazy_kwargs,
 *                 async_lazy_recheck = async_lazy_recheck,
 *                 async_lazy_recheck_kwargs = async_lazy_recheck_kwargs,             # <<<<<<<<<<<<<<
 *                 async_processor = async_processor,
 *                 async_processor_workers = async_processor_workers,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_lazy_recheck_kwargs)) { __Pyx_RaiseClosureNameError("async_lazy_recheck_kwargs"); __PYX_ERR(0, 1419, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_lazy_recheck_kwargs, __pyx_cur_scope->__pyx_v_async_lazy_recheck_kwargs) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1420
 *                 async_lazy_recheck = async_lazy_recheck,
 *                 async_lazy_recheck_kwargs = async_lazy_recheck_kwargs,
 *                 async_processor = async_processor,             # <<<<<<<<<<<<<<
 *                 async_processor_workers = async_processor_workers,
 *                 async_processor_threadpool = async_processor_threadpool,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_processor)) { __Pyx_RaiseClosureNameError("async_processor"); __PYX_ERR(0, 1420, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_processor, __pyx_cur_scope->__pyx_v_async_processor) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1421
 *                 async_lazy_recheck_kwargs = async_lazy_recheck_kwargs,
 *                 async_processor = async_processor,
 *                 async_processor_workers = async_processor_workers,             # <<<<<<<<<<<<<<
 *                 async_processor_threadpool = async_processor_threadpool,
 *                 async_processor_kwargs = async_processor_kwargs,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_processor_workers)) { __Pyx_RaiseClosureNameError("async_processor_workers"); __PYX_ERR(0, 1421, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_processor_workers, __pyx_cur_scope->__pyx_v_async_processor_workers) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1422
 *                 async_processor = async_processor,
 *                 async_processor_workers = async_processor_workers,
 *                 async_processor_threadpool = async_processor_threadpool,             # <<<<<<<<<<<<<<
 *                 async_processor_kwargs = async_processor_kwargs,
 *                 renew_time = renew_time,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_processor_threadpool)) { __Pyx_RaiseClosureNameError("async_processor_threadpool"); __PYX_ERR(0, 1422, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_processor_threadpool, __pyx_cur_scope->__pyx_v_async_processor_threadpool) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1423
 *                 async_processor_workers = async_processor_workers,
 *                 async_processor_threadpool = async_processor_threadpool,
 *                 async_processor_kwargs = async_processor_kwargs,             # <<<<<<<<<<<<<<
 *                 renew_time = renew_time,
 *                 future_sync_check = future_sync_check,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_async_processor_kwargs)) { __Pyx_RaiseClosureNameError("async_processor_kwargs"); __PYX_ERR(0, 1423, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_async_processor_kwargs, __pyx_cur_scope->__pyx_v_async_processor_kwargs) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1424
 *                 async_processor_threadpool = async_processor_threadpool,
 *                 async_processor_kwargs = async_processor_kwargs,
 *                 renew_time = renew_time,             # <<<<<<<<<<<<<<
 *                 future_sync_check = future_sync_check,
 *                 ttl_spread = ttl_spread,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_renew_time)) { __Pyx_RaiseClosureNameError("renew_time"); __PYX_ERR(0, 1424, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_renew_time, __pyx_cur_scope->__pyx_v_renew_time) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1425
 *                 async_processor_kwargs = async_processor_kwargs,
 *                 renew_time = renew_time,
 *                 future_sync_check = future_sync_check,             # <<<<<<<<<<<<<<
 *                 ttl_spread = ttl_spread,
 *                 _eff_async_ttl = eff_async_ttl,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_future_sync_check)) { __Pyx_RaiseClosureNameError("future_sync_check"); __PYX_ERR(0, 1425, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_future_sync_check, __pyx_cur_scope->__pyx_v_future_sync_check) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1426
 *                 renew_time = renew_time,
 *                 future_sync_check = future_sync_check,
 *                 ttl_spread = ttl_spread,             # <<<<<<<<<<<<<<
 *                 _eff_async_ttl = eff_async_ttl,
 *                 _put_deferred = partial(_coherent_put_deferred, nshared, expired_ttl, None,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_ttl_spread)) { __Pyx_RaiseClosureNameError("ttl_spread"); __PYX_ERR(0, 1426, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ttl_spread, __pyx_cur_scope->__pyx_v_ttl_spread) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1427
 *                 future_sync_check = future_sync_check,
 *                 ttl_spread = ttl_spread,
 *                 _eff_async_ttl = eff_async_ttl,             # <<<<<<<<<<<<<<
 *                 _put_deferred = partial(_coherent_put_deferred, nshared, expired_ttl, None,
 *                     expire_private = nprivate.expire),
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_eff_async_ttl, __pyx_v_eff_async_ttl) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)

  /* "chorde/decorators.py":1428
 *                 ttl_spread = ttl_spread,
 *                 _eff_async_ttl = eff_async_ttl,
 *                 _put_deferred = partial(_coherent_put_deferred, nshared, expired_ttl, None,             # <<<<<<<<<<<<<<
 *                     expire_private = nprivate.expire),
 *                 _fput_deferred = partial(_coherent_put_deferred, nshared, expired_ttl,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_partial); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_coherent_put_deferred); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
  __Pyx_INCREF(__pyx_v_nshared);
  __Pyx_GIVEREF(__pyx_v_nshared);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_nshared);
  __Pyx_INCREF(__pyx_v_expired_ttl);
  __Pyx_GIVEREF(__pyx_v_expired_ttl);
  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_expired_ttl);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_11, 3, Py_None);
  __pyx_t_10 = 0;

  /* "chorde/decorators.py":1429
 *                 _eff_async_ttl = eff_async_ttl,
 *                 _put_deferred = partial(_coherent_put_deferred, nshared, expired_ttl, None,
 *                     expire_private = nprivate.expire),             # <<<<<<<<<<<<<<
 *                 _fput_deferred = partial(_coherent_put_deferred, nshared, expired_ttl,
 *                     wait_time=wait_time,
 */
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_nprivate, __pyx_n_s_expire); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_expire_private, __pyx_t_12) < 0) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "chorde/decorators.py":1428
 *                 ttl_spread = ttl_spread,
 *                 _eff_async_ttl = eff_async_ttl,
 *                 _put_deferred = partial(_coherent_put_deferred, nshared, expired_ttl, None,             # <<<<<<<<<<<<<<
 *                     expire_private = nprivate.expire),
 *                 _fput_deferred = partial(_coherent_put_deferred, nshared, expired_ttl,
 */
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_put_deferred, __pyx_t_12) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "chorde/decorators.py":1430
 *                 _put_deferred = partial(_coherent_put_deferred, nshared, expired_ttl, None,
 *                     expire_private = nprivate.expire),
 *                 _fput_deferred = partial(_coherent_put_deferred, nshared, expired_ttl,             # <<<<<<<<<<<<<<
 *                     wait_time=wait_time,
 *                     expire_private = nprivate.expire) )(f)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_partial); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_coherent_put_deferred); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
  __Pyx_INCREF(__pyx_v_nshared);
  __Pyx_GIVEREF(__pyx_v_nshared);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_nshared);
  __Pyx_INCREF(__pyx_v_expired_ttl);
  __Pyx_GIVEREF(__pyx_v_expired_ttl);
  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_expired_ttl);
  __pyx_t_10 = 0;

  /* "chorde/decorators.py":1431
 *                     expire_private = nprivate.expire),
 *                 _fput_deferred = partial(_coherent_put_deferred, nshared, expired_ttl,
 *                     wait_time=wait_time,             # <<<<<<<<<<<<<<
 *                     expire_private = nprivate.expire) )(f)
 *             rv.coherence = coherence_manager
 */
  __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (unlikely(!__pyx_cur_scope->__pyx_v_wait_time)) { __Pyx_RaiseClosureNameError("wait_time"); __PYX_ERR(0, 1431, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_wait_time, __pyx_cur_scope->__pyx_v_wait_time) < 0) __PYX_ERR(0, 1431, __pyx_L1_error)

  /* "chorde/decorators.py":1432
 *                 _fput_deferred = partial(_coherent_put_deferred, nshared, expired_ttl,
 *                     wait_time=wait_time,
 *                     expire_private = nprivate.expire) )(f)             # <<<<<<<<<<<<<<
 *             rv.coherence = coherence_manager
 *             rv.ipsub = ipsub
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_nprivate, __pyx_n_s_expire); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_expire_private, __pyx_t_8) < 0) __PYX_ERR(0, 1431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "chorde/decorators.py":1430
 *                 _put_deferred = partial(_coherent_put_deferred, nshared, expired_ttl, None,
 *                     expire_private = nprivate.expire),
 *                 _fput_deferred = partial(_coherent_put_deferred, nshared, expired_ttl,             # <<<<<<<<<<<<<<
 *                     wait_time=wait_time,
 *                     expire_private = nprivate.expire) )(f)
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fput_deferred, __pyx_t_8) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "chorde/decorators.py":1404
 *                 expired_ttl = max(expired_ttl, (eff_async_ttl or async_ttl) + renew_time)
 * 
 *             rv = cached(nclient, ttl,             # <<<<<<<<<<<<<<
 *                 namespace = NO_NAMESPACE, # Already covered
 *                 key = key,
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __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;

  /* "chorde/decorators.py":1432
 *                 _fput_deferred = partial(_coherent_put_deferred, nshared, expired_ttl,
 *                     wait_time=wait_time,
 *                     expire_private = nprivate.expire) )(f)             # <<<<<<<<<<<<<<
 *             rv.coherence = coherence_manager
 *             rv.ipsub = ipsub
 */
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_3, __pyx_v_f) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_f);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_rv = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "chorde/decorators.py":1433
 *                     wait_time=wait_time,
 *                     expire_private = nprivate.expire) )(f)
 *             rv.coherence = coherence_manager             # <<<<<<<<<<<<<<
 *             rv.ipsub = ipsub
 *             return rv
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_rv, __pyx_n_s_coherence, __pyx_v_coherence_manager) < 0) __PYX_ERR(0, 1433, __pyx_L1_error)

  /* "chorde/decorators.py":1434
 *                     expire_private = nprivate.expire) )(f)
 *             rv.coherence = coherence_manager
 *             rv.ipsub = ipsub             # <<<<<<<<<<<<<<
 *             return rv
 *         return decor
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_ipsub)) { __Pyx_RaiseClosureNameError("ipsub"); __PYX_ERR(0, 1434, __pyx_L1_error) }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_rv, __pyx_n_s_ipsub, __pyx_cur_scope->__pyx_v_ipsub) < 0) __PYX_ERR(0, 1434, __pyx_L1_error)

  /* "chorde/decorators.py":1435
 *             rv.coherence = coherence_manager
 *             rv.ipsub = ipsub
 *             return rv             # <<<<<<<<<<<<<<
 *         return decor
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rv);
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  /* "chorde/decorators.py":1343
 *         async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 * 
 *         def decor(f):             # <<<<<<<<<<<<<<
 *             if ttl_spread:
 *                 spread_type = type(ttl_spread)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("chorde.decorators.coherent_cached.decor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_spread_type);
  __Pyx_XDECREF(__pyx_v_eff_async_ttl);
  __Pyx_XDECREF(__pyx_v_salt2);
  __Pyx_XDECREF(__pyx_v__coherence_namespace);
  __Pyx_XDECREF(__pyx_v__namespace);
  __Pyx_XDECREF(__pyx_v_nprivate);
  __Pyx_XDECREF(__pyx_v_shareds);
  __Pyx_XDECREF(__pyx_v_sharedt);
  __Pyx_XDECREF(__pyx_v_ntiered);
  __Pyx_XDECREF(__pyx_v_nshared);
  __Pyx_XDECREF(__pyx_v_coherence_manager);
  __Pyx_XDECREF(__pyx_v_nclient);
  __Pyx_XDECREF(__pyx_v_expired_ttl);
  __Pyx_XDECREF(__pyx_v_rv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "chorde/decorators.py":1245
 * if not no_coherence:
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,             # <<<<<<<<<<<<<<
 *             key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *             tiered_ = None,
 */

static PyObject *__pyx_pf_6chorde_10decorators_10coherent_cached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_private, PyObject *__pyx_v_shared, PyObject *__pyx_v_ipsub, PyObject *__pyx_v_ttl, PyObject *__pyx_v_key, PyObject *__pyx_v_tiered_, PyObject *__pyx_v_namespace, PyObject *__pyx_v_coherence_namespace, PyObject *__pyx_v_coherence_encoding, PyObject *__pyx_v_coherence_timeout, PyObject *__pyx_v_value_serialization_function, PyObject *__pyx_v_value_deserialization_function, PyObject *__pyx_v_async_writer_queue_size, PyObject *__pyx_v_async_writer_workers, PyObject *__pyx_v_async_writer_threadpool, PyObject *__pyx_v_async_writer_kwargs, PyObject *__pyx_v_async_ttl, PyObject *__pyx_v_async_expire, PyObject *__pyx_v_lazy_kwargs, PyObject *__pyx_v_async_lazy_recheck, PyObject *__pyx_v_async_lazy_recheck_kwargs, PyObject *__pyx_v_async_processor, PyObject *__pyx_v_async_processor_workers, PyObject *__pyx_v_async_processor_threadpool, PyObject *__pyx_v_async_processor_kwargs, PyObject *__pyx_v_renew_time, PyObject *__pyx_v_future_sync_check, PyObject *__pyx_v_initialize, PyObject *__pyx_v_decorate, PyObject *__pyx_v_tiered_opts, PyObject *__pyx_v_ttl_spread, PyObject *__pyx_v_wait_time, PyObject *__pyx_v_autonamespace_version_salt, PyObject *__pyx_v_coherence_kwargs) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *__pyx_cur_scope;
  PyObject *__pyx_v_decor = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coherent_cached", 0);
  __pyx_cur_scope = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *)__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_8_coherent_cached(__pyx_ptype_6chorde_10decorators___pyx_scope_struct_8_coherent_cached, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1245, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_private = __pyx_v_private;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_private);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_private);
  __pyx_cur_scope->__pyx_v_shared = __pyx_v_shared;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_shared);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_shared);
  __pyx_cur_scope->__pyx_v_ipsub = __pyx_v_ipsub;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ipsub);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ipsub);
  __pyx_cur_scope->__pyx_v_ttl = __pyx_v_ttl;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ttl);
  __pyx_cur_scope->__pyx_v_key = __pyx_v_key;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key);
  __pyx_cur_scope->__pyx_v_tiered_ = __pyx_v_tiered_;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tiered_);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_tiered_);
  __pyx_cur_scope->__pyx_v_namespace = __pyx_v_namespace;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_namespace);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_namespace);
  __pyx_cur_scope->__pyx_v_coherence_namespace = __pyx_v_coherence_namespace;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_coherence_namespace);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_coherence_namespace);
  __pyx_cur_scope->__pyx_v_coherence_encoding = __pyx_v_coherence_encoding;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_coherence_encoding);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_coherence_encoding);
  __pyx_cur_scope->__pyx_v_coherence_timeout = __pyx_v_coherence_timeout;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_coherence_timeout);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_coherence_timeout);
  __pyx_cur_scope->__pyx_v_value_serialization_function = __pyx_v_value_serialization_function;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value_serialization_function);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value_serialization_function);
  __pyx_cur_scope->__pyx_v_value_deserialization_function = __pyx_v_value_deserialization_function;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value_deserialization_function);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value_deserialization_function);
  __pyx_cur_scope->__pyx_v_async_writer_queue_size = __pyx_v_async_writer_queue_size;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_writer_queue_size);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_writer_queue_size);
  __pyx_cur_scope->__pyx_v_async_writer_workers = __pyx_v_async_writer_workers;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_writer_workers);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_writer_workers);
  __pyx_cur_scope->__pyx_v_async_writer_threadpool = __pyx_v_async_writer_threadpool;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_writer_threadpool);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_writer_threadpool);
  __pyx_cur_scope->__pyx_v_async_writer_kwargs = __pyx_v_async_writer_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_writer_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_writer_kwargs);
  __pyx_cur_scope->__pyx_v_async_ttl = __pyx_v_async_ttl;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_ttl);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_ttl);
  __pyx_cur_scope->__pyx_v_async_expire = __pyx_v_async_expire;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_expire);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_expire);
  __pyx_cur_scope->__pyx_v_lazy_kwargs = __pyx_v_lazy_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_lazy_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_lazy_kwargs);
  __pyx_cur_scope->__pyx_v_async_lazy_recheck = __pyx_v_async_lazy_recheck;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_lazy_recheck);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_lazy_recheck);
  __pyx_cur_scope->__pyx_v_async_lazy_recheck_kwargs = __pyx_v_async_lazy_recheck_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_lazy_recheck_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_lazy_recheck_kwargs);
  __pyx_cur_scope->__pyx_v_async_processor = __pyx_v_async_processor;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_processor);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_processor);
  __pyx_cur_scope->__pyx_v_async_processor_workers = __pyx_v_async_processor_workers;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_processor_workers);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_processor_workers);
  __pyx_cur_scope->__pyx_v_async_processor_threadpool = __pyx_v_async_processor_threadpool;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_processor_threadpool);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_processor_threadpool);
  __pyx_cur_scope->__pyx_v_async_processor_kwargs = __pyx_v_async_processor_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_processor_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_processor_kwargs);
  __pyx_cur_scope->__pyx_v_renew_time = __pyx_v_renew_time;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_renew_time);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_renew_time);
  __pyx_cur_scope->__pyx_v_future_sync_check = __pyx_v_future_sync_check;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_future_sync_check);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_future_sync_check);
  __pyx_cur_scope->__pyx_v_initialize = __pyx_v_initialize;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_initialize);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_initialize);
  __pyx_cur_scope->__pyx_v_decorate = __pyx_v_decorate;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_decorate);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_decorate);
  __pyx_cur_scope->__pyx_v_tiered_opts = __pyx_v_tiered_opts;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tiered_opts);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_tiered_opts);
  __pyx_cur_scope->__pyx_v_ttl_spread = __pyx_v_ttl_spread;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ttl_spread);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ttl_spread);
  __pyx_cur_scope->__pyx_v_wait_time = __pyx_v_wait_time;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_wait_time);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_wait_time);
  __pyx_cur_scope->__pyx_v_autonamespace_version_salt = __pyx_v_autonamespace_version_salt;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_autonamespace_version_salt);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_autonamespace_version_salt);
  __pyx_cur_scope->__pyx_v_coherence_kwargs = __pyx_v_coherence_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_coherence_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_coherence_kwargs);

  /* "chorde/decorators.py":1325
 *             Any extra argument are passed verbatim to CoherenceManager's constructor.
 *         """
 *         if async_ttl is None:             # <<<<<<<<<<<<<<
 *             async_ttl = ttl / 2
 *         elif async_ttl < 0:
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_async_ttl == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1326
 *         """
 *         if async_ttl is None:
 *             async_ttl = ttl / 2             # <<<<<<<<<<<<<<
 *         elif async_ttl < 0:
 *             async_ttl = ttl + async_ttl
 */
    __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_cur_scope->__pyx_v_ttl, __pyx_int_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_ttl);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_ttl, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "chorde/decorators.py":1325
 *             Any extra argument are passed verbatim to CoherenceManager's constructor.
 *         """
 *         if async_ttl is None:             # <<<<<<<<<<<<<<
 *             async_ttl = ttl / 2
 *         elif async_ttl < 0:
 */
    goto __pyx_L3;
  }

  /* "chorde/decorators.py":1327
 *         if async_ttl is None:
 *             async_ttl = ttl / 2
 *         elif async_ttl < 0:             # <<<<<<<<<<<<<<
 *             async_ttl = ttl + async_ttl
 * 
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_async_ttl, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1328
 *             async_ttl = ttl / 2
 *         elif async_ttl < 0:
 *             async_ttl = ttl + async_ttl             # <<<<<<<<<<<<<<
 * 
 *         if ttl_spread is True:
 */
    __pyx_t_3 = PyNumber_Add(__pyx_cur_scope->__pyx_v_ttl, __pyx_cur_scope->__pyx_v_async_ttl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_ttl);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_ttl, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "chorde/decorators.py":1327
 *         if async_ttl is None:
 *             async_ttl = ttl / 2
 *         elif async_ttl < 0:             # <<<<<<<<<<<<<<
 *             async_ttl = ttl + async_ttl
 * 
 */
  }
  __pyx_L3:;

  /* "chorde/decorators.py":1330
 *             async_ttl = ttl + async_ttl
 * 
 *         if ttl_spread is True:             # <<<<<<<<<<<<<<
 *             ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2
 * 
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_ttl_spread == Py_True);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1331
 * 
 *         if ttl_spread is True:
 *             ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2             # <<<<<<<<<<<<<<
 * 
 *         if not private.is_async:
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_ttl);
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_async_ttl;
    __pyx_t_4 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_ttl, __pyx_cur_scope->__pyx_v_async_ttl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyNumber_Absolute(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ttl);
    __pyx_t_4 = __pyx_cur_scope->__pyx_v_ttl;
    __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = __pyx_t_3;
    } else {
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = __pyx_t_4;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_4 = __pyx_t_6;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __pyx_t_5;
    } else {
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = __pyx_t_4;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_int_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_ttl_spread);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_ttl_spread, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "chorde/decorators.py":1330
 *             async_ttl = ttl + async_ttl
 * 
 *         if ttl_spread is True:             # <<<<<<<<<<<<<<
 *             ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2
 * 
 */
  }

  /* "chorde/decorators.py":1333
 *             ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2
 * 
 *         if not private.is_async:             # <<<<<<<<<<<<<<
 *             if async_writer_queue_size is None:
 *                 async_writer_queue_size = 100
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_private, __pyx_n_s_is_async); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "chorde/decorators.py":1334
 * 
 *         if not private.is_async:
 *             if async_writer_queue_size is None:             # <<<<<<<<<<<<<<
 *                 async_writer_queue_size = 100
 *             if async_writer_workers is None:
 */
    __pyx_t_2 = (__pyx_cur_scope->__pyx_v_async_writer_queue_size == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "chorde/decorators.py":1335
 *         if not private.is_async:
 *             if async_writer_queue_size is None:
 *                 async_writer_queue_size = 100             # <<<<<<<<<<<<<<
 *             if async_writer_workers is None:
 *                 async_writer_workers = multiprocessing.cpu_count()
 */
      __Pyx_INCREF(__pyx_int_100);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_writer_queue_size);
      __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_writer_queue_size, __pyx_int_100);
      __Pyx_GIVEREF(__pyx_int_100);

      /* "chorde/decorators.py":1334
 * 
 *         if not private.is_async:
 *             if async_writer_queue_size is None:             # <<<<<<<<<<<<<<
 *                 async_writer_queue_size = 100
 *             if async_writer_workers is None:
 */
    }

    /* "chorde/decorators.py":1336
 *             if async_writer_queue_size is None:
 *                 async_writer_queue_size = 100
 *             if async_writer_workers is None:             # <<<<<<<<<<<<<<
 *                 async_writer_workers = multiprocessing.cpu_count()
 * 
 */
    __pyx_t_1 = (__pyx_cur_scope->__pyx_v_async_writer_workers == Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "chorde/decorators.py":1337
 *                 async_writer_queue_size = 100
 *             if async_writer_workers is None:
 *                 async_writer_workers = multiprocessing.cpu_count()             # <<<<<<<<<<<<<<
 * 
 *         if async_writer_kwargs is None:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_multiprocessing); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_cpu_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1337, __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_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, 1337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_writer_workers);
      __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_writer_workers, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;

      /* "chorde/decorators.py":1336
 *             if async_writer_queue_size is None:
 *                 async_writer_queue_size = 100
 *             if async_writer_workers is None:             # <<<<<<<<<<<<<<
 *                 async_writer_workers = multiprocessing.cpu_count()
 * 
 */
    }

    /* "chorde/decorators.py":1333
 *             ttl_spread = min(ttl, async_ttl, abs(ttl-async_ttl)) / 2
 * 
 *         if not private.is_async:             # <<<<<<<<<<<<<<
 *             if async_writer_queue_size is None:
 *                 async_writer_queue_size = 100
 */
  }

  /* "chorde/decorators.py":1339
 *                 async_writer_workers = multiprocessing.cpu_count()
 * 
 *         if async_writer_kwargs is None:             # <<<<<<<<<<<<<<
 *             async_writer_kwargs = {}
 *         async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_async_writer_kwargs == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "chorde/decorators.py":1340
 * 
 *         if async_writer_kwargs is None:
 *             async_writer_kwargs = {}             # <<<<<<<<<<<<<<
 *         async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 * 
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_async_writer_kwargs);
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_async_writer_kwargs, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "chorde/decorators.py":1339
 *                 async_writer_workers = multiprocessing.cpu_count()
 * 
 *         if async_writer_kwargs is None:             # <<<<<<<<<<<<<<
 *             async_writer_kwargs = {}
 *         async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 */
  }

  /* "chorde/decorators.py":1341
 *         if async_writer_kwargs is None:
 *             async_writer_kwargs = {}
 *         async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)             # <<<<<<<<<<<<<<
 * 
 *         def decor(f):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_async_writer_kwargs, __pyx_n_s_setdefault); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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_s_threadpool, __pyx_cur_scope->__pyx_v_async_writer_threadpool};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_s_threadpool, __pyx_cur_scope->__pyx_v_async_writer_threadpool};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_n_s_threadpool);
    __Pyx_GIVEREF(__pyx_n_s_threadpool);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_n_s_threadpool);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_async_writer_threadpool);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_async_writer_threadpool);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_cur_scope->__pyx_v_async_writer_threadpool);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "chorde/decorators.py":1343
 *         async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 * 
 *         def decor(f):             # <<<<<<<<<<<<<<
 *             if ttl_spread:
 *                 spread_type = type(ttl_spread)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_15coherent_cached_1decor, 0, __pyx_n_s_coherent_cached_locals_decor, ((PyObject*)__pyx_cur_scope), __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_decor = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "chorde/decorators.py":1436
 *             rv.ipsub = ipsub
 *             return rv
 *         return decor             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_decor);
  __pyx_r = __pyx_v_decor;
  goto __pyx_L0;

  /* "chorde/decorators.py":1245
 * if not no_coherence:
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,             # <<<<<<<<<<<<<<
 *             key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *             tiered_ = None,
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("chorde.decorators.coherent_cached", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_decor);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CacheStats(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6chorde_10decorators_14__pyx_unpickle_CacheStats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6chorde_10decorators_14__pyx_unpickle_CacheStats = {"__pyx_unpickle_CacheStats", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_14__pyx_unpickle_CacheStats, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6chorde_10decorators_14__pyx_unpickle_CacheStats(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CacheStats (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CacheStats", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CacheStats", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CacheStats") < 0)) __PYX_ERR(2, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CacheStats", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("chorde.decorators.__pyx_unpickle_CacheStats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6chorde_10decorators_13__pyx_unpickle_CacheStats(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_6chorde_10decorators_13__pyx_unpickle_CacheStats(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CacheStats", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xeb39541, 0xdcc4bd9, 0xae59ab5):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xeb39541, 0xdcc4bd9, 0xae59ab5) = (errors, hits, max_miss_time, min_miss_time, miss_time_histogram, miss_time_histogram_bins, miss_time_histogram_max, misses, sum_miss_time, sum_miss_time_sq, sync_errors, sync_misses, wait_time))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__112, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xeb39541, 0xdcc4bd9, 0xae59ab5):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xeb39541, 0xdcc4bd9, 0xae59ab5) = (errors, hits, max_miss_time, min_miss_time, miss_time_histogram, miss_time_histogram_bins, miss_time_histogram_max, misses, sum_miss_time, sum_miss_time_sq, sync_errors, sync_misses, wait_time))" % __pyx_checksum)
 *     __pyx_result = CacheStats.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xeb39541, 0xdcc4bd9, 0xae59ab5):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xeb39541, 0xdcc4bd9, 0xae59ab5) = (errors, hits, max_miss_time, min_miss_time, miss_time_histogram, miss_time_histogram_bins, miss_time_histogram_max, misses, sum_miss_time, sum_miss_time_sq, sync_errors, sync_misses, wait_time))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CacheStats.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(2, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xeb39541, 0xdcc4bd9, 0xae59ab5):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xeb39541, 0xdcc4bd9, 0xae59ab5) = (errors, hits, max_miss_time, min_miss_time, miss_time_histogram, miss_time_histogram_bins, miss_time_histogram_max, misses, sum_miss_time, sum_miss_time_sq, sync_errors, sync_misses, wait_time))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xeb39541, 0xdcc4bd9, 0xae59ab5) = (errors, hits, max_miss_time, min_miss_time, miss_time_histogram, miss_time_histogram_bins, miss_time_histogram_max, misses, sum_miss_time, sum_miss_time_sq, sync_errors, sync_misses, wait_time))" % __pyx_checksum)
 *     __pyx_result = CacheStats.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CacheStats__set_state(<CacheStats> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6chorde_10decorators_CacheStats), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xeb39541, 0xdcc4bd9, 0xae59ab5) = (errors, hits, max_miss_time, min_miss_time, miss_time_histogram, miss_time_histogram_bins, miss_time_histogram_max, misses, sum_miss_time, sum_miss_time_sq, sync_errors, sync_misses, wait_time))" % __pyx_checksum)
 *     __pyx_result = CacheStats.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CacheStats__set_state(<CacheStats> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = CacheStats.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CacheStats__set_state(<CacheStats> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CacheStats__set_state(CacheStats __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_6chorde_10decorators___pyx_unpickle_CacheStats__set_state(((struct __pyx_obj_6chorde_10decorators_CacheStats *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xeb39541, 0xdcc4bd9, 0xae59ab5) = (errors, hits, max_miss_time, min_miss_time, miss_time_histogram, miss_time_histogram_bins, miss_time_histogram_max, misses, sum_miss_time, sum_miss_time_sq, sync_errors, sync_misses, wait_time))" % __pyx_checksum)
 *     __pyx_result = CacheStats.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CacheStats__set_state(<CacheStats> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CacheStats__set_state(<CacheStats> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CacheStats__set_state(CacheStats __pyx_result, tuple __pyx_state):
 *     __pyx_result.errors = __pyx_state[0]; __pyx_result.hits = __pyx_state[1]; __pyx_result.max_miss_time = __pyx_state[2]; __pyx_result.min_miss_time = __pyx_state[3]; __pyx_result.miss_time_histogram = __pyx_state[4]; __pyx_result.miss_time_histogram_bins = __pyx_state[5]; __pyx_result.miss_time_histogram_max = __pyx_state[6]; __pyx_result.misses = __pyx_state[7]; __pyx_result.sum_miss_time = __pyx_state[8]; __pyx_result.sum_miss_time_sq = __pyx_state[9]; __pyx_result.sync_errors = __pyx_state[10]; __pyx_result.sync_misses = __pyx_state[11]; __pyx_result.wait_time = __pyx_state[12]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CacheStats(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("chorde.decorators.__pyx_unpickle_CacheStats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_CacheStats__set_state(<CacheStats> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CacheStats__set_state(CacheStats __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.errors = __pyx_state[0]; __pyx_result.hits = __pyx_state[1]; __pyx_result.max_miss_time = __pyx_state[2]; __pyx_result.min_miss_time = __pyx_state[3]; __pyx_result.miss_time_histogram = __pyx_state[4]; __pyx_result.miss_time_histogram_bins = __pyx_state[5]; __pyx_result.miss_time_histogram_max = __pyx_state[6]; __pyx_result.misses = __pyx_state[7]; __pyx_result.sum_miss_time = __pyx_state[8]; __pyx_result.sum_miss_time_sq = __pyx_state[9]; __pyx_result.sync_errors = __pyx_state[10]; __pyx_result.sync_misses = __pyx_state[11]; __pyx_result.wait_time = __pyx_state[12]
 *     if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6chorde_10decorators___pyx_unpickle_CacheStats__set_state(struct __pyx_obj_6chorde_10decorators_CacheStats *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PY_LONG_LONG __pyx_t_2;
  double __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CacheStats__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CacheStats__set_state(CacheStats __pyx_result, tuple __pyx_state):
 *     __pyx_result.errors = __pyx_state[0]; __pyx_result.hits = __pyx_state[1]; __pyx_result.max_miss_time = __pyx_state[2]; __pyx_result.min_miss_time = __pyx_state[3]; __pyx_result.miss_time_histogram = __pyx_state[4]; __pyx_result.miss_time_histogram_bins = __pyx_state[5]; __pyx_result.miss_time_histogram_max = __pyx_state[6]; __pyx_result.misses = __pyx_state[7]; __pyx_result.sum_miss_time = __pyx_state[8]; __pyx_result.sum_miss_time_sq = __pyx_state[9]; __pyx_result.sync_errors = __pyx_state[10]; __pyx_result.sync_misses = __pyx_state[11]; __pyx_result.wait_time = __pyx_state[12]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[13])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->errors = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->hits = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->max_miss_time = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->min_miss_time = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->miss_time_histogram);
  __Pyx_DECREF(__pyx_v___pyx_result->miss_time_histogram);
  __pyx_v___pyx_result->miss_time_histogram = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_4 == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->miss_time_histogram_bins = __pyx_t_4;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->miss_time_histogram_max = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->misses = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->sum_miss_time = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->sum_miss_time_sq = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->sync_errors = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->sync_misses = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(2, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->wait_time = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CacheStats__set_state(CacheStats __pyx_result, tuple __pyx_state):
 *     __pyx_result.errors = __pyx_state[0]; __pyx_result.hits = __pyx_state[1]; __pyx_result.max_miss_time = __pyx_state[2]; __pyx_result.min_miss_time = __pyx_state[3]; __pyx_result.miss_time_histogram = __pyx_state[4]; __pyx_result.miss_time_histogram_bins = __pyx_state[5]; __pyx_result.miss_time_histogram_max = __pyx_state[6]; __pyx_result.misses = __pyx_state[7]; __pyx_result.sum_miss_time = __pyx_state[8]; __pyx_result.sum_miss_time_sq = __pyx_state[9]; __pyx_result.sync_errors = __pyx_state[10]; __pyx_result.sync_misses = __pyx_state[11]; __pyx_result.wait_time = __pyx_state[12]
 *     if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[13])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(2, 13, __pyx_L1_error)
  }
  __pyx_t_6 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_7 = ((__pyx_t_6 > 13) != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  __pyx_t_5 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "(tree fragment)":14
 *     __pyx_result.errors = __pyx_state[0]; __pyx_result.hits = __pyx_state[1]; __pyx_result.max_miss_time = __pyx_state[2]; __pyx_result.min_miss_time = __pyx_state[3]; __pyx_result.miss_time_histogram = __pyx_state[4]; __pyx_result.miss_time_histogram_bins = __pyx_state[5]; __pyx_result.miss_time_histogram_max = __pyx_state[6]; __pyx_result.misses = __pyx_state[7]; __pyx_result.sum_miss_time = __pyx_state[8]; __pyx_result.sum_miss_time_sq = __pyx_state[9]; __pyx_result.sync_errors = __pyx_state[10]; __pyx_result.sync_misses = __pyx_state[11]; __pyx_result.wait_time = __pyx_state[12]
 *     if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[13])             # <<<<<<<<<<<<<<
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_update); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(2, 14, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
      }
    }
    __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CacheStats__set_state(CacheStats __pyx_result, tuple __pyx_state):
 *     __pyx_result.errors = __pyx_state[0]; __pyx_result.hits = __pyx_state[1]; __pyx_result.max_miss_time = __pyx_state[2]; __pyx_result.min_miss_time = __pyx_state[3]; __pyx_result.miss_time_histogram = __pyx_state[4]; __pyx_result.miss_time_histogram_bins = __pyx_state[5]; __pyx_result.miss_time_histogram_max = __pyx_state[6]; __pyx_result.misses = __pyx_state[7]; __pyx_result.sum_miss_time = __pyx_state[8]; __pyx_result.sum_miss_time_sq = __pyx_state[9]; __pyx_result.sync_errors = __pyx_state[10]; __pyx_result.sync_misses = __pyx_state[11]; __pyx_result.wait_time = __pyx_state[12]
 *     if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[13])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CacheStats__set_state(<CacheStats> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CacheStats__set_state(CacheStats __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.errors = __pyx_state[0]; __pyx_result.hits = __pyx_state[1]; __pyx_result.max_miss_time = __pyx_state[2]; __pyx_result.min_miss_time = __pyx_state[3]; __pyx_result.miss_time_histogram = __pyx_state[4]; __pyx_result.miss_time_histogram_bins = __pyx_state[5]; __pyx_result.miss_time_histogram_max = __pyx_state[6]; __pyx_result.misses = __pyx_state[7]; __pyx_result.sum_miss_time = __pyx_state[8]; __pyx_result.sum_miss_time_sq = __pyx_state[9]; __pyx_result.sync_errors = __pyx_state[10]; __pyx_result.sync_misses = __pyx_state[11]; __pyx_result.wait_time = __pyx_state[12]
 *     if len(__pyx_state) > 13 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("chorde.decorators.__pyx_unpickle_CacheStats__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_6chorde_10decorators_CacheStats __pyx_vtable_6chorde_10decorators_CacheStats;

static PyObject *__pyx_tp_new_6chorde_10decorators_CacheStats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6chorde_10decorators_CacheStats *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6chorde_10decorators_CacheStats *)o);
  p->__pyx_vtab = __pyx_vtabptr_6chorde_10decorators_CacheStats;
  p->miss_time_histogram = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6chorde_10decorators_CacheStats(PyObject *o) {
  struct __pyx_obj_6chorde_10decorators_CacheStats *p = (struct __pyx_obj_6chorde_10decorators_CacheStats *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->miss_time_histogram);
  (*Py_TYPE(o)->tp_free)(o);
}

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

static int __pyx_tp_clear_6chorde_10decorators_CacheStats(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6chorde_10decorators_CacheStats *p = (struct __pyx_obj_6chorde_10decorators_CacheStats *)o;
  tmp = ((PyObject*)p->miss_time_histogram);
  p->miss_time_histogram = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_hits(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_4hits_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_hits(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_4hits_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_misses(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_6misses_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_misses(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_6misses_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_errors(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_6errors_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_errors(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_6errors_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_sync_misses(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_11sync_misses_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_sync_misses(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_11sync_misses_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_sync_errors(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_11sync_errors_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_sync_errors(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_11sync_errors_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_min_miss_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_13min_miss_time_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_min_miss_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_13min_miss_time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_max_miss_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_13max_miss_time_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_max_miss_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_13max_miss_time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_sum_miss_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_13sum_miss_time_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_sum_miss_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_13sum_miss_time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_sum_miss_time_sq(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_16sum_miss_time_sq_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_sum_miss_time_sq(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_16sum_miss_time_sq_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_wait_time(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_9wait_time_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_wait_time(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_9wait_time_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_miss_time_histogram(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_19miss_time_histogram_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_miss_time_histogram(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_19miss_time_histogram_3__set__(o, v);
  }
  else {
    return __pyx_pw_6chorde_10decorators_10CacheStats_19miss_time_histogram_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_miss_time_histogram_max(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_23miss_time_histogram_max_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_miss_time_histogram_max(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_23miss_time_histogram_max_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6chorde_10decorators_10CacheStats_miss_time_histogram_bins(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins_1__get__(o);
}

static int __pyx_setprop_6chorde_10decorators_10CacheStats_miss_time_histogram_bins(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6chorde_10decorators_10CacheStats_24miss_time_histogram_bins_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6chorde_10decorators_CacheStats[] = {
  {"clear", (PyCFunction)__pyx_pw_6chorde_10decorators_10CacheStats_3clear, METH_NOARGS, 0},
  {"set_histogram_bins", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6chorde_10decorators_10CacheStats_5set_histogram_bins, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_6chorde_10decorators_10CacheStats_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_6chorde_10decorators_10CacheStats_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6chorde_10decorators_CacheStats[] = {
  {(char *)"hits", __pyx_getprop_6chorde_10decorators_10CacheStats_hits, __pyx_setprop_6chorde_10decorators_10CacheStats_hits, (char *)0, 0},
  {(char *)"misses", __pyx_getprop_6chorde_10decorators_10CacheStats_misses, __pyx_setprop_6chorde_10decorators_10CacheStats_misses, (char *)0, 0},
  {(char *)"errors", __pyx_getprop_6chorde_10decorators_10CacheStats_errors, __pyx_setprop_6chorde_10decorators_10CacheStats_errors, (char *)0, 0},
  {(char *)"sync_misses", __pyx_getprop_6chorde_10decorators_10CacheStats_sync_misses, __pyx_setprop_6chorde_10decorators_10CacheStats_sync_misses, (char *)0, 0},
  {(char *)"sync_errors", __pyx_getprop_6chorde_10decorators_10CacheStats_sync_errors, __pyx_setprop_6chorde_10decorators_10CacheStats_sync_errors, (char *)0, 0},
  {(char *)"min_miss_time", __pyx_getprop_6chorde_10decorators_10CacheStats_min_miss_time, __pyx_setprop_6chorde_10decorators_10CacheStats_min_miss_time, (char *)0, 0},
  {(char *)"max_miss_time", __pyx_getprop_6chorde_10decorators_10CacheStats_max_miss_time, __pyx_setprop_6chorde_10decorators_10CacheStats_max_miss_time, (char *)0, 0},
  {(char *)"sum_miss_time", __pyx_getprop_6chorde_10decorators_10CacheStats_sum_miss_time, __pyx_setprop_6chorde_10decorators_10CacheStats_sum_miss_time, (char *)0, 0},
  {(char *)"sum_miss_time_sq", __pyx_getprop_6chorde_10decorators_10CacheStats_sum_miss_time_sq, __pyx_setprop_6chorde_10decorators_10CacheStats_sum_miss_time_sq, (char *)0, 0},
  {(char *)"wait_time", __pyx_getprop_6chorde_10decorators_10CacheStats_wait_time, __pyx_setprop_6chorde_10decorators_10CacheStats_wait_time, (char *)0, 0},
  {(char *)"miss_time_histogram", __pyx_getprop_6chorde_10decorators_10CacheStats_miss_time_histogram, __pyx_setprop_6chorde_10decorators_10CacheStats_miss_time_histogram, (char *)0, 0},
  {(char *)"miss_time_histogram_max", __pyx_getprop_6chorde_10decorators_10CacheStats_miss_time_histogram_max, __pyx_setprop_6chorde_10decorators_10CacheStats_miss_time_histogram_max, (char *)0, 0},
  {(char *)"miss_time_histogram_bins", __pyx_getprop_6chorde_10decorators_10CacheStats_miss_time_histogram_bins, __pyx_setprop_6chorde_10decorators_10CacheStats_miss_time_histogram_bins, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_6chorde_10decorators_CacheStats = {
  PyVarObject_HEAD_INIT(0, 0)
  "chorde.decorators.CacheStats", /*tp_name*/
  sizeof(struct __pyx_obj_6chorde_10decorators_CacheStats), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6chorde_10decorators_CacheStats, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6chorde_10decorators_CacheStats, /*tp_traverse*/
  __pyx_tp_clear_6chorde_10decorators_CacheStats, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6chorde_10decorators_CacheStats, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6chorde_10decorators_CacheStats, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6chorde_10decorators_10CacheStats_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6chorde_10decorators_CacheStats, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *__pyx_freelist_6chorde_10decorators___pyx_scope_struct__wraps[8];
static int __pyx_freecount_6chorde_10decorators___pyx_scope_struct__wraps = 0;

static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct__wraps(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6chorde_10decorators___pyx_scope_struct__wraps > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps)))) {
    o = (PyObject*)__pyx_freelist_6chorde_10decorators___pyx_scope_struct__wraps[--__pyx_freecount_6chorde_10decorators___pyx_scope_struct__wraps];
    memset(o, 0, sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps));
    (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_6chorde_10decorators___pyx_scope_struct__wraps(PyObject *o) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_w);
  Py_CLEAR(p->__pyx_v_wrapped);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6chorde_10decorators___pyx_scope_struct__wraps < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps)))) {
    __pyx_freelist_6chorde_10decorators___pyx_scope_struct__wraps[__pyx_freecount_6chorde_10decorators___pyx_scope_struct__wraps++] = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct__wraps(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *)o;
  if (p->__pyx_v_w) {
    e = (*v)(p->__pyx_v_w, a); if (e) return e;
  }
  if (p->__pyx_v_wrapped) {
    e = (*v)(p->__pyx_v_wrapped, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct__wraps(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps *)o;
  tmp = ((PyObject*)p->__pyx_v_w);
  p->__pyx_v_w = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_wrapped);
  p->__pyx_v_wrapped = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6chorde_10decorators___pyx_scope_struct__wraps = {
  PyVarObject_HEAD_INIT(0, 0)
  "chorde.decorators.__pyx_scope_struct__wraps", /*tp_name*/
  sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct__wraps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6chorde_10decorators___pyx_scope_struct__wraps, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct__wraps, /*tp_traverse*/
  __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct__wraps, /*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_6chorde_10decorators___pyx_scope_struct__wraps, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *__pyx_freelist_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred[8];
static int __pyx_freecount_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred = 0;

static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred)))) {
    o = (PyObject*)__pyx_freelist_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred[--__pyx_freecount_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred];
    memset(o, 0, sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred));
    (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_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred(PyObject *o) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_async_ttl);
  Py_CLEAR(p->__pyx_v_key);
  Py_CLEAR(p->__pyx_v_shared);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred)))) {
    __pyx_freelist_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred[__pyx_freecount_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred++] = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *)o;
  if (p->__pyx_v_async_ttl) {
    e = (*v)(p->__pyx_v_async_ttl, a); if (e) return e;
  }
  if (p->__pyx_v_key) {
    e = (*v)(p->__pyx_v_key, a); if (e) return e;
  }
  if (p->__pyx_v_shared) {
    e = (*v)(p->__pyx_v_shared, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred *)o;
  tmp = ((PyObject*)p->__pyx_v_async_ttl);
  p->__pyx_v_async_ttl = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_key);
  p->__pyx_v_key = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_shared);
  p->__pyx_v_shared = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred = {
  PyVarObject_HEAD_INIT(0, 0)
  "chorde.decorators.__pyx_scope_struct_1__coherent_put_deferred", /*tp_name*/
  sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred, /*tp_traverse*/
  __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred, /*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_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *__pyx_freelist_6chorde_10decorators___pyx_scope_struct_2_cached[8];
static int __pyx_freecount_6chorde_10decorators___pyx_scope_struct_2_cached = 0;

static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_2_cached(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_2_cached > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached)))) {
    o = (PyObject*)__pyx_freelist_6chorde_10decorators___pyx_scope_struct_2_cached[--__pyx_freecount_6chorde_10decorators___pyx_scope_struct_2_cached];
    memset(o, 0, sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached));
    (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_6chorde_10decorators___pyx_scope_struct_2_cached(PyObject *o) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_EMPTY_KWARGS);
  Py_CLEAR(p->__pyx_v_Future);
  Py_CLEAR(p->__pyx_v__NONE_);
  Py_CLEAR(p->__pyx_v__eff_async_ttl);
  Py_CLEAR(p->__pyx_v__fput_deferred);
  Py_CLEAR(p->__pyx_v__lazy_recheck_put_deferred);
  Py_CLEAR(p->__pyx_v__put_deferred);
  Py_CLEAR(p->__pyx_v_async_client);
  Py_CLEAR(p->__pyx_v_async_expire);
  Py_CLEAR(p->__pyx_v_async_lazy_recheck);
  Py_CLEAR(p->__pyx_v_async_processor);
  Py_CLEAR(p->__pyx_v_async_processor_kwargs);
  Py_CLEAR(p->__pyx_v_async_processor_workers);
  Py_CLEAR(p->__pyx_v_async_ttl);
  Py_CLEAR(p->__pyx_v_async_writer_kwargs);
  Py_CLEAR(p->__pyx_v_async_writer_queue_size);
  Py_CLEAR(p->__pyx_v_async_writer_workers);
  Py_CLEAR(p->__pyx_v_autonamespace_version_salt);
  Py_CLEAR(p->__pyx_v_client);
  Py_CLEAR(p->__pyx_v_decorate);
  Py_CLEAR(p->__pyx_v_easync_lazy_recheck_kwargs);
  Py_CLEAR(p->__pyx_v_eff_ttl);
  Py_CLEAR(p->__pyx_v_eget_async_lazy_recheck_kwargs);
  Py_CLEAR(p->__pyx_v_elazy_kwargs);
  Py_CLEAR(p->__pyx_v_future_sync_check);
  Py_CLEAR(p->__pyx_v_initialize);
  Py_CLEAR(p->__pyx_v_key);
  Py_CLEAR(p->__pyx_v_lazy_kwargs);
  Py_CLEAR(p->__pyx_v_namespace);
  Py_CLEAR(p->__pyx_v_renew_time);
  Py_CLEAR(p->__pyx_v_spread_type);
  Py_CLEAR(p->__pyx_v_timings);
  Py_CLEAR(p->__pyx_v_ttl);
  Py_CLEAR(p->__pyx_v_ttl_spread);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_2_cached < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached)))) {
    __pyx_freelist_6chorde_10decorators___pyx_scope_struct_2_cached[__pyx_freecount_6chorde_10decorators___pyx_scope_struct_2_cached++] = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_2_cached(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *)o;
  if (p->__pyx_v_EMPTY_KWARGS) {
    e = (*v)(p->__pyx_v_EMPTY_KWARGS, a); if (e) return e;
  }
  if (p->__pyx_v_Future) {
    e = (*v)(p->__pyx_v_Future, a); if (e) return e;
  }
  if (p->__pyx_v__NONE_) {
    e = (*v)(p->__pyx_v__NONE_, a); if (e) return e;
  }
  if (p->__pyx_v__eff_async_ttl) {
    e = (*v)(p->__pyx_v__eff_async_ttl, a); if (e) return e;
  }
  if (p->__pyx_v__fput_deferred) {
    e = (*v)(p->__pyx_v__fput_deferred, a); if (e) return e;
  }
  if (p->__pyx_v__lazy_recheck_put_deferred) {
    e = (*v)(p->__pyx_v__lazy_recheck_put_deferred, a); if (e) return e;
  }
  if (p->__pyx_v__put_deferred) {
    e = (*v)(p->__pyx_v__put_deferred, a); if (e) return e;
  }
  if (p->__pyx_v_async_client) {
    e = (*v)(p->__pyx_v_async_client, a); if (e) return e;
  }
  if (p->__pyx_v_async_expire) {
    e = (*v)(p->__pyx_v_async_expire, a); if (e) return e;
  }
  if (p->__pyx_v_async_lazy_recheck) {
    e = (*v)(p->__pyx_v_async_lazy_recheck, a); if (e) return e;
  }
  if (p->__pyx_v_async_processor) {
    e = (*v)(p->__pyx_v_async_processor, a); if (e) return e;
  }
  if (p->__pyx_v_async_processor_kwargs) {
    e = (*v)(p->__pyx_v_async_processor_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_async_processor_workers) {
    e = (*v)(p->__pyx_v_async_processor_workers, a); if (e) return e;
  }
  if (p->__pyx_v_async_ttl) {
    e = (*v)(p->__pyx_v_async_ttl, a); if (e) return e;
  }
  if (p->__pyx_v_async_writer_kwargs) {
    e = (*v)(p->__pyx_v_async_writer_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_async_writer_queue_size) {
    e = (*v)(p->__pyx_v_async_writer_queue_size, a); if (e) return e;
  }
  if (p->__pyx_v_async_writer_workers) {
    e = (*v)(p->__pyx_v_async_writer_workers, a); if (e) return e;
  }
  if (p->__pyx_v_autonamespace_version_salt) {
    e = (*v)(p->__pyx_v_autonamespace_version_salt, a); if (e) return e;
  }
  if (p->__pyx_v_client) {
    e = (*v)(p->__pyx_v_client, a); if (e) return e;
  }
  if (p->__pyx_v_decorate) {
    e = (*v)(p->__pyx_v_decorate, a); if (e) return e;
  }
  if (p->__pyx_v_easync_lazy_recheck_kwargs) {
    e = (*v)(p->__pyx_v_easync_lazy_recheck_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_eff_ttl) {
    e = (*v)(p->__pyx_v_eff_ttl, a); if (e) return e;
  }
  if (p->__pyx_v_eget_async_lazy_recheck_kwargs) {
    e = (*v)(p->__pyx_v_eget_async_lazy_recheck_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_elazy_kwargs) {
    e = (*v)(p->__pyx_v_elazy_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_future_sync_check) {
    e = (*v)(p->__pyx_v_future_sync_check, a); if (e) return e;
  }
  if (p->__pyx_v_initialize) {
    e = (*v)(p->__pyx_v_initialize, a); if (e) return e;
  }
  if (p->__pyx_v_key) {
    e = (*v)(p->__pyx_v_key, a); if (e) return e;
  }
  if (p->__pyx_v_lazy_kwargs) {
    e = (*v)(p->__pyx_v_lazy_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_namespace) {
    e = (*v)(p->__pyx_v_namespace, a); if (e) return e;
  }
  if (p->__pyx_v_renew_time) {
    e = (*v)(p->__pyx_v_renew_time, a); if (e) return e;
  }
  if (p->__pyx_v_spread_type) {
    e = (*v)(((PyObject *)p->__pyx_v_spread_type), a); if (e) return e;
  }
  if (p->__pyx_v_timings) {
    e = (*v)(p->__pyx_v_timings, a); if (e) return e;
  }
  if (p->__pyx_v_ttl) {
    e = (*v)(p->__pyx_v_ttl, a); if (e) return e;
  }
  if (p->__pyx_v_ttl_spread) {
    e = (*v)(p->__pyx_v_ttl_spread, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_2_cached(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *)o;
  tmp = ((PyObject*)p->__pyx_v_EMPTY_KWARGS);
  p->__pyx_v_EMPTY_KWARGS = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_Future);
  p->__pyx_v_Future = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v__NONE_);
  p->__pyx_v__NONE_ = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v__eff_async_ttl);
  p->__pyx_v__eff_async_ttl = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v__fput_deferred);
  p->__pyx_v__fput_deferred = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v__lazy_recheck_put_deferred);
  p->__pyx_v__lazy_recheck_put_deferred = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v__put_deferred);
  p->__pyx_v__put_deferred = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_client);
  p->__pyx_v_async_client = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_expire);
  p->__pyx_v_async_expire = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_lazy_recheck);
  p->__pyx_v_async_lazy_recheck = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_processor);
  p->__pyx_v_async_processor = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_processor_kwargs);
  p->__pyx_v_async_processor_kwargs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_processor_workers);
  p->__pyx_v_async_processor_workers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_ttl);
  p->__pyx_v_async_ttl = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_writer_kwargs);
  p->__pyx_v_async_writer_kwargs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_writer_queue_size);
  p->__pyx_v_async_writer_queue_size = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_writer_workers);
  p->__pyx_v_async_writer_workers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_autonamespace_version_salt);
  p->__pyx_v_autonamespace_version_salt = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_client);
  p->__pyx_v_client = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_decorate);
  p->__pyx_v_decorate = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_easync_lazy_recheck_kwargs);
  p->__pyx_v_easync_lazy_recheck_kwargs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_eff_ttl);
  p->__pyx_v_eff_ttl = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_eget_async_lazy_recheck_kwargs);
  p->__pyx_v_eget_async_lazy_recheck_kwargs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_elazy_kwargs);
  p->__pyx_v_elazy_kwargs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_future_sync_check);
  p->__pyx_v_future_sync_check = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_initialize);
  p->__pyx_v_initialize = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_key);
  p->__pyx_v_key = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_lazy_kwargs);
  p->__pyx_v_lazy_kwargs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_namespace);
  p->__pyx_v_namespace = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_renew_time);
  p->__pyx_v_renew_time = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_spread_type);
  p->__pyx_v_spread_type = ((PyTypeObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_timings);
  p->__pyx_v_timings = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_ttl);
  p->__pyx_v_ttl = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_ttl_spread);
  p->__pyx_v_ttl_spread = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6chorde_10decorators___pyx_scope_struct_2_cached = {
  PyVarObject_HEAD_INIT(0, 0)
  "chorde.decorators.__pyx_scope_struct_2_cached", /*tp_name*/
  sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6chorde_10decorators___pyx_scope_struct_2_cached, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_2_cached, /*tp_traverse*/
  __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_2_cached, /*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_6chorde_10decorators___pyx_scope_struct_2_cached, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *__pyx_freelist_6chorde_10decorators___pyx_scope_struct_3_decor[8];
static int __pyx_freecount_6chorde_10decorators___pyx_scope_struct_3_decor = 0;

static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_3_decor(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_3_decor > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor)))) {
    o = (PyObject*)__pyx_freelist_6chorde_10decorators___pyx_scope_struct_3_decor[--__pyx_freecount_6chorde_10decorators___pyx_scope_struct_3_decor];
    memset(o, 0, sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor));
    (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_6chorde_10decorators___pyx_scope_struct_3_decor(PyObject *o) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__initialize);
  Py_CLEAR(p->__pyx_v__promote_callback);
  Py_CLEAR(p->__pyx_v__value_callback);
  Py_CLEAR(p->__pyx_v_aclient);
  Py_CLEAR(p->__pyx_v_af);
  Py_CLEAR(p->__pyx_v_async_cached_f);
  Py_CLEAR(p->__pyx_v_async_f);
  Py_CLEAR(p->__pyx_v_eff_async_ttl);
  Py_CLEAR(p->__pyx_v_f);
  Py_CLEAR(p->__pyx_v_fclient);
  Py_CLEAR(p->__pyx_v_future_cached_f);
  Py_CLEAR(p->__pyx_v_get_kwargs);
  Py_CLEAR(p->__pyx_v_nclient);
  Py_CLEAR(p->__pyx_v_of);
  Py_CLEAR(p->__pyx_v_placeholder_value_fn_cell);
  Py_CLEAR(p->__pyx_v_promote_callbacks);
  Py_CLEAR(p->__pyx_v_stats);
  Py_CLEAR(p->__pyx_v_value_callbacks);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_3_decor < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor)))) {
    __pyx_freelist_6chorde_10decorators___pyx_scope_struct_3_decor[__pyx_freecount_6chorde_10decorators___pyx_scope_struct_3_decor++] = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_3_decor(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__initialize) {
    e = (*v)(p->__pyx_v__initialize, a); if (e) return e;
  }
  if (p->__pyx_v__promote_callback) {
    e = (*v)(p->__pyx_v__promote_callback, a); if (e) return e;
  }
  if (p->__pyx_v__value_callback) {
    e = (*v)(p->__pyx_v__value_callback, a); if (e) return e;
  }
  if (p->__pyx_v_aclient) {
    e = (*v)(p->__pyx_v_aclient, a); if (e) return e;
  }
  if (p->__pyx_v_af) {
    e = (*v)(p->__pyx_v_af, a); if (e) return e;
  }
  if (p->__pyx_v_async_cached_f) {
    e = (*v)(p->__pyx_v_async_cached_f, a); if (e) return e;
  }
  if (p->__pyx_v_async_f) {
    e = (*v)(p->__pyx_v_async_f, a); if (e) return e;
  }
  if (p->__pyx_v_eff_async_ttl) {
    e = (*v)(p->__pyx_v_eff_async_ttl, a); if (e) return e;
  }
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, a); if (e) return e;
  }
  if (p->__pyx_v_fclient) {
    e = (*v)(p->__pyx_v_fclient, a); if (e) return e;
  }
  if (p->__pyx_v_future_cached_f) {
    e = (*v)(p->__pyx_v_future_cached_f, a); if (e) return e;
  }
  if (p->__pyx_v_get_kwargs) {
    e = (*v)(p->__pyx_v_get_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_nclient) {
    e = (*v)(p->__pyx_v_nclient, a); if (e) return e;
  }
  if (p->__pyx_v_of) {
    e = (*v)(p->__pyx_v_of, a); if (e) return e;
  }
  if (p->__pyx_v_placeholder_value_fn_cell) {
    e = (*v)(p->__pyx_v_placeholder_value_fn_cell, a); if (e) return e;
  }
  if (p->__pyx_v_promote_callbacks) {
    e = (*v)(p->__pyx_v_promote_callbacks, a); if (e) return e;
  }
  if (p->__pyx_v_stats) {
    e = (*v)(((PyObject *)p->__pyx_v_stats), a); if (e) return e;
  }
  if (p->__pyx_v_value_callbacks) {
    e = (*v)(p->__pyx_v_value_callbacks, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_3_decor(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_2_cached *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v__initialize);
  p->__pyx_v__initialize = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v__promote_callback);
  p->__pyx_v__promote_callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v__value_callback);
  p->__pyx_v__value_callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_aclient);
  p->__pyx_v_aclient = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_af);
  p->__pyx_v_af = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_cached_f);
  p->__pyx_v_async_cached_f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_f);
  p->__pyx_v_async_f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_eff_async_ttl);
  p->__pyx_v_eff_async_ttl = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_fclient);
  p->__pyx_v_fclient = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_future_cached_f);
  p->__pyx_v_future_cached_f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_get_kwargs);
  p->__pyx_v_get_kwargs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_nclient);
  p->__pyx_v_nclient = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_of);
  p->__pyx_v_of = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_placeholder_value_fn_cell);
  p->__pyx_v_placeholder_value_fn_cell = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_promote_callbacks);
  p->__pyx_v_promote_callbacks = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_stats);
  p->__pyx_v_stats = ((struct __pyx_obj_6chorde_10decorators_CacheStats *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_value_callbacks);
  p->__pyx_v_value_callbacks = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6chorde_10decorators___pyx_scope_struct_3_decor = {
  PyVarObject_HEAD_INIT(0, 0)
  "chorde.decorators.__pyx_scope_struct_3_decor", /*tp_name*/
  sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6chorde_10decorators___pyx_scope_struct_3_decor, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_3_decor, /*tp_traverse*/
  __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_3_decor, /*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_6chorde_10decorators___pyx_scope_struct_3_decor, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *__pyx_freelist_6chorde_10decorators___pyx_scope_struct_4_future_cached_f[8];
static int __pyx_freecount_6chorde_10decorators___pyx_scope_struct_4_future_cached_f = 0;

static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_4_future_cached_f(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_4_future_cached_f > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f)))) {
    o = (PyObject*)__pyx_freelist_6chorde_10decorators___pyx_scope_struct_4_future_cached_f[--__pyx_freecount_6chorde_10decorators___pyx_scope_struct_4_future_cached_f];
    memset(o, 0, sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f));
    (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_6chorde_10decorators___pyx_scope_struct_4_future_cached_f(PyObject *o) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v___NONE);
  Py_CLEAR(p->__pyx_v_callkey);
  Py_CLEAR(p->__pyx_v_client);
  Py_CLEAR(p->__pyx_v_frv);
  Py_CLEAR(p->__pyx_v_kw);
  Py_CLEAR(p->__pyx_v_p);
  Py_CLEAR(p->__pyx_v_rv);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_4_future_cached_f < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f)))) {
    __pyx_freelist_6chorde_10decorators___pyx_scope_struct_4_future_cached_f[__pyx_freecount_6chorde_10decorators___pyx_scope_struct_4_future_cached_f++] = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_4_future_cached_f(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v___NONE) {
    e = (*v)(p->__pyx_v___NONE, a); if (e) return e;
  }
  if (p->__pyx_v_callkey) {
    e = (*v)(p->__pyx_v_callkey, a); if (e) return e;
  }
  if (p->__pyx_v_client) {
    e = (*v)(p->__pyx_v_client, a); if (e) return e;
  }
  if (p->__pyx_v_frv) {
    e = (*v)(p->__pyx_v_frv, a); if (e) return e;
  }
  if (p->__pyx_v_kw) {
    e = (*v)(p->__pyx_v_kw, a); if (e) return e;
  }
  if (p->__pyx_v_p) {
    e = (*v)(p->__pyx_v_p, a); if (e) return e;
  }
  if (p->__pyx_v_rv) {
    e = (*v)(p->__pyx_v_rv, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_4_future_cached_f(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v___NONE);
  p->__pyx_v___NONE = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_callkey);
  p->__pyx_v_callkey = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_client);
  p->__pyx_v_client = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_frv);
  p->__pyx_v_frv = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_kw);
  p->__pyx_v_kw = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_p);
  p->__pyx_v_p = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_rv);
  p->__pyx_v_rv = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6chorde_10decorators___pyx_scope_struct_4_future_cached_f = {
  PyVarObject_HEAD_INIT(0, 0)
  "chorde.decorators.__pyx_scope_struct_4_future_cached_f", /*tp_name*/
  sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_4_future_cached_f), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6chorde_10decorators___pyx_scope_struct_4_future_cached_f, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_4_future_cached_f, /*tp_traverse*/
  __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_4_future_cached_f, /*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_6chorde_10decorators___pyx_scope_struct_4_future_cached_f, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *__pyx_freelist_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f[8];
static int __pyx_freecount_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f = 0;

static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f)))) {
    o = (PyObject*)__pyx_freelist_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f[--__pyx_freecount_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f];
    memset(o, 0, sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f));
    (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_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f(PyObject *o) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v___NONE);
  Py_CLEAR(p->__pyx_v_callkey);
  Py_CLEAR(p->__pyx_v_client);
  Py_CLEAR(p->__pyx_v_frv);
  Py_CLEAR(p->__pyx_v_kw);
  Py_CLEAR(p->__pyx_v_p);
  Py_CLEAR(p->__pyx_v_rv);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f)))) {
    __pyx_freelist_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f[__pyx_freecount_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f++] = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v___NONE) {
    e = (*v)(p->__pyx_v___NONE, a); if (e) return e;
  }
  if (p->__pyx_v_callkey) {
    e = (*v)(p->__pyx_v_callkey, a); if (e) return e;
  }
  if (p->__pyx_v_client) {
    e = (*v)(p->__pyx_v_client, a); if (e) return e;
  }
  if (p->__pyx_v_frv) {
    e = (*v)(p->__pyx_v_frv, a); if (e) return e;
  }
  if (p->__pyx_v_kw) {
    e = (*v)(p->__pyx_v_kw, a); if (e) return e;
  }
  if (p->__pyx_v_p) {
    e = (*v)(p->__pyx_v_p, a); if (e) return e;
  }
  if (p->__pyx_v_rv) {
    e = (*v)(p->__pyx_v_rv, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v___NONE);
  p->__pyx_v___NONE = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_callkey);
  p->__pyx_v_callkey = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_client);
  p->__pyx_v_client = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_frv);
  p->__pyx_v_frv = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_kw);
  p->__pyx_v_kw = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_p);
  p->__pyx_v_p = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_rv);
  p->__pyx_v_rv = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f = {
  PyVarObject_HEAD_INIT(0, 0)
  "chorde.decorators.__pyx_scope_struct_5_future_lazy_cached_f", /*tp_name*/
  sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f, /*tp_traverse*/
  __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f, /*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_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *__pyx_freelist_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f[8];
static int __pyx_freecount_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f = 0;

static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f)))) {
    o = (PyObject*)__pyx_freelist_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f[--__pyx_freecount_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f];
    memset(o, 0, sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f));
    (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_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f(PyObject *o) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_frv);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f)))) {
    __pyx_freelist_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f[__pyx_freecount_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f++] = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_frv) {
    e = (*v)(p->__pyx_v_frv, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_frv);
  p->__pyx_v_frv = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f = {
  PyVarObject_HEAD_INIT(0, 0)
  "chorde.decorators.__pyx_scope_struct_6_future_peek_cached_f", /*tp_name*/
  sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f, /*tp_traverse*/
  __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f, /*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_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *__pyx_freelist_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f[8];
static int __pyx_freecount_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f = 0;

static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f)))) {
    o = (PyObject*)__pyx_freelist_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f[--__pyx_freecount_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f];
    memset(o, 0, sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f));
    (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_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f(PyObject *o) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v___NONE);
  Py_CLEAR(p->__pyx_v_callkey);
  Py_CLEAR(p->__pyx_v_client);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f)))) {
    __pyx_freelist_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f[__pyx_freecount_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f++] = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v___NONE) {
    e = (*v)(p->__pyx_v___NONE, a); if (e) return e;
  }
  if (p->__pyx_v_callkey) {
    e = (*v)(p->__pyx_v_callkey, a); if (e) return e;
  }
  if (p->__pyx_v_client) {
    e = (*v)(p->__pyx_v_client, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_3_decor *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v___NONE);
  p->__pyx_v___NONE = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_callkey);
  p->__pyx_v_callkey = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_client);
  p->__pyx_v_client = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f = {
  PyVarObject_HEAD_INIT(0, 0)
  "chorde.decorators.__pyx_scope_struct_7_async_lazy_cached_f", /*tp_name*/
  sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f, /*tp_traverse*/
  __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f, /*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_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *__pyx_freelist_6chorde_10decorators___pyx_scope_struct_8_coherent_cached[8];
static int __pyx_freecount_6chorde_10decorators___pyx_scope_struct_8_coherent_cached = 0;

static PyObject *__pyx_tp_new_6chorde_10decorators___pyx_scope_struct_8_coherent_cached(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_8_coherent_cached > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached)))) {
    o = (PyObject*)__pyx_freelist_6chorde_10decorators___pyx_scope_struct_8_coherent_cached[--__pyx_freecount_6chorde_10decorators___pyx_scope_struct_8_coherent_cached];
    memset(o, 0, sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached));
    (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_6chorde_10decorators___pyx_scope_struct_8_coherent_cached(PyObject *o) {
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_async_expire);
  Py_CLEAR(p->__pyx_v_async_lazy_recheck);
  Py_CLEAR(p->__pyx_v_async_lazy_recheck_kwargs);
  Py_CLEAR(p->__pyx_v_async_processor);
  Py_CLEAR(p->__pyx_v_async_processor_kwargs);
  Py_CLEAR(p->__pyx_v_async_processor_threadpool);
  Py_CLEAR(p->__pyx_v_async_processor_workers);
  Py_CLEAR(p->__pyx_v_async_ttl);
  Py_CLEAR(p->__pyx_v_async_writer_kwargs);
  Py_CLEAR(p->__pyx_v_async_writer_queue_size);
  Py_CLEAR(p->__pyx_v_async_writer_threadpool);
  Py_CLEAR(p->__pyx_v_async_writer_workers);
  Py_CLEAR(p->__pyx_v_autonamespace_version_salt);
  Py_CLEAR(p->__pyx_v_coherence_encoding);
  Py_CLEAR(p->__pyx_v_coherence_kwargs);
  Py_CLEAR(p->__pyx_v_coherence_namespace);
  Py_CLEAR(p->__pyx_v_coherence_timeout);
  Py_CLEAR(p->__pyx_v_decorate);
  Py_CLEAR(p->__pyx_v_future_sync_check);
  Py_CLEAR(p->__pyx_v_initialize);
  Py_CLEAR(p->__pyx_v_ipsub);
  Py_CLEAR(p->__pyx_v_key);
  Py_CLEAR(p->__pyx_v_lazy_kwargs);
  Py_CLEAR(p->__pyx_v_namespace);
  Py_CLEAR(p->__pyx_v_private);
  Py_CLEAR(p->__pyx_v_renew_time);
  Py_CLEAR(p->__pyx_v_shared);
  Py_CLEAR(p->__pyx_v_tiered_);
  Py_CLEAR(p->__pyx_v_tiered_opts);
  Py_CLEAR(p->__pyx_v_ttl);
  Py_CLEAR(p->__pyx_v_ttl_spread);
  Py_CLEAR(p->__pyx_v_value_deserialization_function);
  Py_CLEAR(p->__pyx_v_value_serialization_function);
  Py_CLEAR(p->__pyx_v_wait_time);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6chorde_10decorators___pyx_scope_struct_8_coherent_cached < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached)))) {
    __pyx_freelist_6chorde_10decorators___pyx_scope_struct_8_coherent_cached[__pyx_freecount_6chorde_10decorators___pyx_scope_struct_8_coherent_cached++] = ((struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_8_coherent_cached(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *)o;
  if (p->__pyx_v_async_expire) {
    e = (*v)(p->__pyx_v_async_expire, a); if (e) return e;
  }
  if (p->__pyx_v_async_lazy_recheck) {
    e = (*v)(p->__pyx_v_async_lazy_recheck, a); if (e) return e;
  }
  if (p->__pyx_v_async_lazy_recheck_kwargs) {
    e = (*v)(p->__pyx_v_async_lazy_recheck_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_async_processor) {
    e = (*v)(p->__pyx_v_async_processor, a); if (e) return e;
  }
  if (p->__pyx_v_async_processor_kwargs) {
    e = (*v)(p->__pyx_v_async_processor_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_async_processor_threadpool) {
    e = (*v)(p->__pyx_v_async_processor_threadpool, a); if (e) return e;
  }
  if (p->__pyx_v_async_processor_workers) {
    e = (*v)(p->__pyx_v_async_processor_workers, a); if (e) return e;
  }
  if (p->__pyx_v_async_ttl) {
    e = (*v)(p->__pyx_v_async_ttl, a); if (e) return e;
  }
  if (p->__pyx_v_async_writer_kwargs) {
    e = (*v)(p->__pyx_v_async_writer_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_async_writer_queue_size) {
    e = (*v)(p->__pyx_v_async_writer_queue_size, a); if (e) return e;
  }
  if (p->__pyx_v_async_writer_threadpool) {
    e = (*v)(p->__pyx_v_async_writer_threadpool, a); if (e) return e;
  }
  if (p->__pyx_v_async_writer_workers) {
    e = (*v)(p->__pyx_v_async_writer_workers, a); if (e) return e;
  }
  if (p->__pyx_v_autonamespace_version_salt) {
    e = (*v)(p->__pyx_v_autonamespace_version_salt, a); if (e) return e;
  }
  if (p->__pyx_v_coherence_encoding) {
    e = (*v)(p->__pyx_v_coherence_encoding, a); if (e) return e;
  }
  if (p->__pyx_v_coherence_kwargs) {
    e = (*v)(p->__pyx_v_coherence_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_coherence_namespace) {
    e = (*v)(p->__pyx_v_coherence_namespace, a); if (e) return e;
  }
  if (p->__pyx_v_coherence_timeout) {
    e = (*v)(p->__pyx_v_coherence_timeout, a); if (e) return e;
  }
  if (p->__pyx_v_decorate) {
    e = (*v)(p->__pyx_v_decorate, a); if (e) return e;
  }
  if (p->__pyx_v_future_sync_check) {
    e = (*v)(p->__pyx_v_future_sync_check, a); if (e) return e;
  }
  if (p->__pyx_v_initialize) {
    e = (*v)(p->__pyx_v_initialize, a); if (e) return e;
  }
  if (p->__pyx_v_ipsub) {
    e = (*v)(p->__pyx_v_ipsub, a); if (e) return e;
  }
  if (p->__pyx_v_key) {
    e = (*v)(p->__pyx_v_key, a); if (e) return e;
  }
  if (p->__pyx_v_lazy_kwargs) {
    e = (*v)(p->__pyx_v_lazy_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_namespace) {
    e = (*v)(p->__pyx_v_namespace, a); if (e) return e;
  }
  if (p->__pyx_v_private) {
    e = (*v)(p->__pyx_v_private, a); if (e) return e;
  }
  if (p->__pyx_v_renew_time) {
    e = (*v)(p->__pyx_v_renew_time, a); if (e) return e;
  }
  if (p->__pyx_v_shared) {
    e = (*v)(p->__pyx_v_shared, a); if (e) return e;
  }
  if (p->__pyx_v_tiered_) {
    e = (*v)(p->__pyx_v_tiered_, a); if (e) return e;
  }
  if (p->__pyx_v_tiered_opts) {
    e = (*v)(p->__pyx_v_tiered_opts, a); if (e) return e;
  }
  if (p->__pyx_v_ttl) {
    e = (*v)(p->__pyx_v_ttl, a); if (e) return e;
  }
  if (p->__pyx_v_ttl_spread) {
    e = (*v)(p->__pyx_v_ttl_spread, a); if (e) return e;
  }
  if (p->__pyx_v_value_deserialization_function) {
    e = (*v)(p->__pyx_v_value_deserialization_function, a); if (e) return e;
  }
  if (p->__pyx_v_value_serialization_function) {
    e = (*v)(p->__pyx_v_value_serialization_function, a); if (e) return e;
  }
  if (p->__pyx_v_wait_time) {
    e = (*v)(p->__pyx_v_wait_time, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_8_coherent_cached(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *p = (struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached *)o;
  tmp = ((PyObject*)p->__pyx_v_async_expire);
  p->__pyx_v_async_expire = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_lazy_recheck);
  p->__pyx_v_async_lazy_recheck = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_lazy_recheck_kwargs);
  p->__pyx_v_async_lazy_recheck_kwargs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_processor);
  p->__pyx_v_async_processor = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_processor_kwargs);
  p->__pyx_v_async_processor_kwargs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_processor_threadpool);
  p->__pyx_v_async_processor_threadpool = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_processor_workers);
  p->__pyx_v_async_processor_workers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_ttl);
  p->__pyx_v_async_ttl = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_writer_kwargs);
  p->__pyx_v_async_writer_kwargs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_writer_queue_size);
  p->__pyx_v_async_writer_queue_size = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_writer_threadpool);
  p->__pyx_v_async_writer_threadpool = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_async_writer_workers);
  p->__pyx_v_async_writer_workers = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_autonamespace_version_salt);
  p->__pyx_v_autonamespace_version_salt = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_coherence_encoding);
  p->__pyx_v_coherence_encoding = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_coherence_kwargs);
  p->__pyx_v_coherence_kwargs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_coherence_namespace);
  p->__pyx_v_coherence_namespace = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_coherence_timeout);
  p->__pyx_v_coherence_timeout = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_decorate);
  p->__pyx_v_decorate = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_future_sync_check);
  p->__pyx_v_future_sync_check = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_initialize);
  p->__pyx_v_initialize = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_ipsub);
  p->__pyx_v_ipsub = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_key);
  p->__pyx_v_key = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_lazy_kwargs);
  p->__pyx_v_lazy_kwargs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_namespace);
  p->__pyx_v_namespace = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_private);
  p->__pyx_v_private = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_renew_time);
  p->__pyx_v_renew_time = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_shared);
  p->__pyx_v_shared = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_tiered_);
  p->__pyx_v_tiered_ = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_tiered_opts);
  p->__pyx_v_tiered_opts = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_ttl);
  p->__pyx_v_ttl = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_ttl_spread);
  p->__pyx_v_ttl_spread = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_value_deserialization_function);
  p->__pyx_v_value_deserialization_function = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_value_serialization_function);
  p->__pyx_v_value_serialization_function = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_wait_time);
  p->__pyx_v_wait_time = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_6chorde_10decorators___pyx_scope_struct_8_coherent_cached = {
  PyVarObject_HEAD_INIT(0, 0)
  "chorde.decorators.__pyx_scope_struct_8_coherent_cached", /*tp_name*/
  sizeof(struct __pyx_obj_6chorde_10decorators___pyx_scope_struct_8_coherent_cached), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6chorde_10decorators___pyx_scope_struct_8_coherent_cached, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6chorde_10decorators___pyx_scope_struct_8_coherent_cached, /*tp_traverse*/
  __pyx_tp_clear_6chorde_10decorators___pyx_scope_struct_8_coherent_cached, /*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_6chorde_10decorators___pyx_scope_struct_8_coherent_cached, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

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

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

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "decorators",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_n_s_AsyncCacheProcessor, __pyx_k_AsyncCacheProcessor, sizeof(__pyx_k_AsyncCacheProcessor), 0, 0, 1, 1},
  {&__pyx_n_s_AsyncWriteCacheClient, __pyx_k_AsyncWriteCacheClient, sizeof(__pyx_k_AsyncWriteCacheClient), 0, 0, 1, 1},
  {&__pyx_n_s_CacheMissError, __pyx_k_CacheMissError, sizeof(__pyx_k_CacheMissError), 0, 0, 1, 1},
  {&__pyx_n_s_CacheStats, __pyx_k_CacheStats, sizeof(__pyx_k_CacheStats), 0, 0, 1, 1},
  {&__pyx_n_s_CacheStats___reduce_cython, __pyx_k_CacheStats___reduce_cython, sizeof(__pyx_k_CacheStats___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CacheStats___setstate_cython, __pyx_k_CacheStats___setstate_cython, sizeof(__pyx_k_CacheStats___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CacheStats_add_histo, __pyx_k_CacheStats_add_histo, sizeof(__pyx_k_CacheStats_add_histo), 0, 0, 1, 1},
  {&__pyx_n_s_CacheStats_clear, __pyx_k_CacheStats_clear, sizeof(__pyx_k_CacheStats_clear), 0, 0, 1, 1},
  {&__pyx_n_s_CacheStats_set_histogram_bins, __pyx_k_CacheStats_set_histogram_bins, sizeof(__pyx_k_CacheStats_set_histogram_bins), 0, 0, 1, 1},
  {&__pyx_n_s_CoherenceManager, __pyx_k_CoherenceManager, sizeof(__pyx_k_CoherenceManager), 0, 0, 1, 1},
  {&__pyx_n_s_CoherentWrapperClient, __pyx_k_CoherentWrapperClient, sizeof(__pyx_k_CoherentWrapperClient), 0, 0, 1, 1},
  {&__pyx_n_s_DecoratedWrapper, __pyx_k_DecoratedWrapper, sizeof(__pyx_k_DecoratedWrapper), 0, 0, 1, 1},
  {&__pyx_n_s_Defer, __pyx_k_Defer, sizeof(__pyx_k_Defer), 0, 0, 1, 1},
  {&__pyx_n_s_EMPTY_KWARGS, __pyx_k_EMPTY_KWARGS, sizeof(__pyx_k_EMPTY_KWARGS), 0, 0, 1, 1},
  {&__pyx_kp_s_Error_evaluating_callkey, __pyx_k_Error_evaluating_callkey, sizeof(__pyx_k_Error_evaluating_callkey), 0, 0, 1, 0},
  {&__pyx_kp_s_Error_on_value_callback, __pyx_k_Error_on_value_callback, sizeof(__pyx_k_Error_on_value_callback), 0, 0, 1, 0},
  {&__pyx_n_s_Future, __pyx_k_Future, sizeof(__pyx_k_Future), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
  {&__pyx_n_s_NONE, __pyx_k_NONE, sizeof(__pyx_k_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_NONE_2, __pyx_k_NONE_2, sizeof(__pyx_k_NONE_2), 0, 0, 1, 1},
  {&__pyx_n_s_NONE_3, __pyx_k_NONE_3, sizeof(__pyx_k_NONE_3), 0, 0, 1, 1},
  {&__pyx_n_s_NONE_4, __pyx_k_NONE_4, sizeof(__pyx_k_NONE_4), 0, 0, 1, 1},
  {&__pyx_n_s_NO_NAMESPACE, __pyx_k_NO_NAMESPACE, sizeof(__pyx_k_NO_NAMESPACE), 0, 0, 1, 1},
  {&__pyx_n_s_NamespaceMirrorWrapper, __pyx_k_NamespaceMirrorWrapper, sizeof(__pyx_k_NamespaceMirrorWrapper), 0, 0, 1, 1},
  {&__pyx_n_s_NamespaceWrapper, __pyx_k_NamespaceWrapper, sizeof(__pyx_k_NamespaceWrapper), 0, 0, 1, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_TieredInclusiveClient, __pyx_k_TieredInclusiveClient, sizeof(__pyx_k_TieredInclusiveClient), 0, 0, 1, 1},
  {&__pyx_n_s_WeakSet, __pyx_k_WeakSet, sizeof(__pyx_k_WeakSet), 0, 0, 1, 1},
  {&__pyx_kp_b__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 0, 0},
  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
  {&__pyx_kp_b__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 0, 0},
  {&__pyx_n_s_aclient, __pyx_k_aclient, sizeof(__pyx_k_aclient), 0, 0, 1, 1},
  {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
  {&__pyx_n_s_add_histo, __pyx_k_add_histo, sizeof(__pyx_k_add_histo), 0, 0, 1, 1},
  {&__pyx_n_s_af, __pyx_k_af, sizeof(__pyx_k_af), 0, 0, 1, 1},
  {&__pyx_n_s_async_cached_f, __pyx_k_async_cached_f, sizeof(__pyx_k_async_cached_f), 0, 0, 1, 1},
  {&__pyx_n_s_async_client, __pyx_k_async_client, sizeof(__pyx_k_async_client), 0, 0, 1, 1},
  {&__pyx_n_s_async_expire, __pyx_k_async_expire, sizeof(__pyx_k_async_expire), 0, 0, 1, 1},
  {&__pyx_n_s_async_expire_f, __pyx_k_async_expire_f, sizeof(__pyx_k_async_expire_f), 0, 0, 1, 1},
  {&__pyx_n_s_async_f, __pyx_k_async_f, sizeof(__pyx_k_async_f), 0, 0, 1, 1},
  {&__pyx_n_s_async_lazy_cached_f, __pyx_k_async_lazy_cached_f, sizeof(__pyx_k_async_lazy_cached_f), 0, 0, 1, 1},
  {&__pyx_n_s_async_lazy_recheck, __pyx_k_async_lazy_recheck, sizeof(__pyx_k_async_lazy_recheck), 0, 0, 1, 1},
  {&__pyx_n_s_async_lazy_recheck_kwargs, __pyx_k_async_lazy_recheck_kwargs, sizeof(__pyx_k_async_lazy_recheck_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_async_processor, __pyx_k_async_processor, sizeof(__pyx_k_async_processor), 0, 0, 1, 1},
  {&__pyx_n_s_async_processor_kwargs, __pyx_k_async_processor_kwargs, sizeof(__pyx_k_async_processor_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_async_processor_threadpool, __pyx_k_async_processor_threadpool, sizeof(__pyx_k_async_processor_threadpool), 0, 0, 1, 1},
  {&__pyx_n_s_async_processor_workers, __pyx_k_async_processor_workers, sizeof(__pyx_k_async_processor_workers), 0, 0, 1, 1},
  {&__pyx_n_s_async_put_f, __pyx_k_async_put_f, sizeof(__pyx_k_async_put_f), 0, 0, 1, 1},
  {&__pyx_n_s_async_refresh_f, __pyx_k_async_refresh_f, sizeof(__pyx_k_async_refresh_f), 0, 0, 1, 1},
  {&__pyx_n_s_async_ttl, __pyx_k_async_ttl, sizeof(__pyx_k_async_ttl), 0, 0, 1, 1},
  {&__pyx_n_s_async_writer_kwargs, __pyx_k_async_writer_kwargs, sizeof(__pyx_k_async_writer_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_async_writer_queue_size, __pyx_k_async_writer_queue_size, sizeof(__pyx_k_async_writer_queue_size), 0, 0, 1, 1},
  {&__pyx_n_s_async_writer_threadpool, __pyx_k_async_writer_threadpool, sizeof(__pyx_k_async_writer_threadpool), 0, 0, 1, 1},
  {&__pyx_n_s_async_writer_workers, __pyx_k_async_writer_workers, sizeof(__pyx_k_async_writer_workers), 0, 0, 1, 1},
  {&__pyx_n_s_asyncache, __pyx_k_asyncache, sizeof(__pyx_k_asyncache), 0, 0, 1, 1},
  {&__pyx_n_s_autonamespace_version_salt, __pyx_k_autonamespace_version_salt, sizeof(__pyx_k_autonamespace_version_salt), 0, 0, 1, 1},
  {&__pyx_n_s_b64encode, __pyx_k_b64encode, sizeof(__pyx_k_b64encode), 0, 0, 1, 1},
  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
  {&__pyx_n_s_base64, __pyx_k_base64, sizeof(__pyx_k_base64), 0, 0, 1, 1},
  {&__pyx_n_s_bg, __pyx_k_bg, sizeof(__pyx_k_bg), 0, 0, 1, 1},
  {&__pyx_n_s_bins, __pyx_k_bins, sizeof(__pyx_k_bins), 0, 0, 1, 1},
  {&__pyx_n_s_body_digest, __pyx_k_body_digest, sizeof(__pyx_k_body_digest), 0, 0, 1, 1},
  {&__pyx_n_s_bound, __pyx_k_bound, sizeof(__pyx_k_bound), 0, 0, 1, 1},
  {&__pyx_n_s_cache_put, __pyx_k_cache_put, sizeof(__pyx_k_cache_put), 0, 0, 1, 1},
  {&__pyx_n_s_cache_put_kwargs, __pyx_k_cache_put_kwargs, sizeof(__pyx_k_cache_put_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_cached, __pyx_k_cached, sizeof(__pyx_k_cached), 0, 0, 1, 1},
  {&__pyx_n_s_cached_f, __pyx_k_cached_f, sizeof(__pyx_k_cached_f), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor, __pyx_k_cached_locals_decor, sizeof(__pyx_k_cached_locals_decor), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals__init, __pyx_k_cached_locals_decor_locals__init, sizeof(__pyx_k_cached_locals_decor_locals__init), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals__prom, __pyx_k_cached_locals_decor_locals__prom, sizeof(__pyx_k_cached_locals_decor_locals__prom), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals__valu, __pyx_k_cached_locals_decor_locals__valu, sizeof(__pyx_k_cached_locals_decor_locals__valu), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_af, __pyx_k_cached_locals_decor_locals_af, sizeof(__pyx_k_cached_locals_decor_locals_af), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_async, __pyx_k_cached_locals_decor_locals_async, sizeof(__pyx_k_cached_locals_decor_locals_async), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_async_2, __pyx_k_cached_locals_decor_locals_async_2, sizeof(__pyx_k_cached_locals_decor_locals_async_2), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_async_3, __pyx_k_cached_locals_decor_locals_async_3, sizeof(__pyx_k_cached_locals_decor_locals_async_3), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_async_4, __pyx_k_cached_locals_decor_locals_async_4, sizeof(__pyx_k_cached_locals_decor_locals_async_4), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_async_5, __pyx_k_cached_locals_decor_locals_async_5, sizeof(__pyx_k_cached_locals_decor_locals_async_5), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_async_6, __pyx_k_cached_locals_decor_locals_async_6, sizeof(__pyx_k_cached_locals_decor_locals_async_6), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_async_7, __pyx_k_cached_locals_decor_locals_async_7, sizeof(__pyx_k_cached_locals_decor_locals_async_7), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_cache, __pyx_k_cached_locals_decor_locals_cache, sizeof(__pyx_k_cached_locals_decor_locals_cache), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_expir, __pyx_k_cached_locals_decor_locals_expir, sizeof(__pyx_k_cached_locals_decor_locals_expir), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_f, __pyx_k_cached_locals_decor_locals_f, sizeof(__pyx_k_cached_locals_decor_locals_f), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur, __pyx_k_cached_locals_decor_locals_futur, sizeof(__pyx_k_cached_locals_decor_locals_futur), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_10, __pyx_k_cached_locals_decor_locals_futur_10, sizeof(__pyx_k_cached_locals_decor_locals_futur_10), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_11, __pyx_k_cached_locals_decor_locals_futur_11, sizeof(__pyx_k_cached_locals_decor_locals_futur_11), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_12, __pyx_k_cached_locals_decor_locals_futur_12, sizeof(__pyx_k_cached_locals_decor_locals_futur_12), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_13, __pyx_k_cached_locals_decor_locals_futur_13, sizeof(__pyx_k_cached_locals_decor_locals_futur_13), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_14, __pyx_k_cached_locals_decor_locals_futur_14, sizeof(__pyx_k_cached_locals_decor_locals_futur_14), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_15, __pyx_k_cached_locals_decor_locals_futur_15, sizeof(__pyx_k_cached_locals_decor_locals_futur_15), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_16, __pyx_k_cached_locals_decor_locals_futur_16, sizeof(__pyx_k_cached_locals_decor_locals_futur_16), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_17, __pyx_k_cached_locals_decor_locals_futur_17, sizeof(__pyx_k_cached_locals_decor_locals_futur_17), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_18, __pyx_k_cached_locals_decor_locals_futur_18, sizeof(__pyx_k_cached_locals_decor_locals_futur_18), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_2, __pyx_k_cached_locals_decor_locals_futur_2, sizeof(__pyx_k_cached_locals_decor_locals_futur_2), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_3, __pyx_k_cached_locals_decor_locals_futur_3, sizeof(__pyx_k_cached_locals_decor_locals_futur_3), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_4, __pyx_k_cached_locals_decor_locals_futur_4, sizeof(__pyx_k_cached_locals_decor_locals_futur_4), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_5, __pyx_k_cached_locals_decor_locals_futur_5, sizeof(__pyx_k_cached_locals_decor_locals_futur_5), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_6, __pyx_k_cached_locals_decor_locals_futur_6, sizeof(__pyx_k_cached_locals_decor_locals_futur_6), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_7, __pyx_k_cached_locals_decor_locals_futur_7, sizeof(__pyx_k_cached_locals_decor_locals_futur_7), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_8, __pyx_k_cached_locals_decor_locals_futur_8, sizeof(__pyx_k_cached_locals_decor_locals_futur_8), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_futur_9, __pyx_k_cached_locals_decor_locals_futur_9, sizeof(__pyx_k_cached_locals_decor_locals_futur_9), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_get_t, __pyx_k_cached_locals_decor_locals_get_t, sizeof(__pyx_k_cached_locals_decor_locals_get_t), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_inval, __pyx_k_cached_locals_decor_locals_inval, sizeof(__pyx_k_cached_locals_decor_locals_inval), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_lambd, __pyx_k_cached_locals_decor_locals_lambd, sizeof(__pyx_k_cached_locals_decor_locals_lambd), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_lazy, __pyx_k_cached_locals_decor_locals_lazy, sizeof(__pyx_k_cached_locals_decor_locals_lazy), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_on_pr, __pyx_k_cached_locals_decor_locals_on_pr, sizeof(__pyx_k_cached_locals_decor_locals_on_pr), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_on_va, __pyx_k_cached_locals_decor_locals_on_va, sizeof(__pyx_k_cached_locals_decor_locals_on_va), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_place, __pyx_k_cached_locals_decor_locals_place, sizeof(__pyx_k_cached_locals_decor_locals_place), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_put_f, __pyx_k_cached_locals_decor_locals_put_f, sizeof(__pyx_k_cached_locals_decor_locals_put_f), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_decor_locals_refre, __pyx_k_cached_locals_decor_locals_refre, sizeof(__pyx_k_cached_locals_decor_locals_refre), 0, 0, 1, 1},
  {&__pyx_n_s_cached_locals_lambda, __pyx_k_cached_locals_lambda, sizeof(__pyx_k_cached_locals_lambda), 0, 0, 1, 1},
  {&__pyx_kp_s_cached_s, __pyx_k_cached_s, sizeof(__pyx_k_cached_s), 0, 0, 1, 0},
  {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
  {&__pyx_n_s_callkey, __pyx_k_callkey, sizeof(__pyx_k_callkey), 0, 0, 1, 1},
  {&__pyx_n_s_cb, __pyx_k_cb, sizeof(__pyx_k_cb), 0, 0, 1, 1},
  {&__pyx_n_s_chorde, __pyx_k_chorde, sizeof(__pyx_k_chorde), 0, 0, 1, 1},
  {&__pyx_n_s_chorde_decorators, __pyx_k_chorde_decorators, sizeof(__pyx_k_chorde_decorators), 0, 0, 1, 1},
  {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
  {&__pyx_n_s_client, __pyx_k_client, sizeof(__pyx_k_client), 0, 0, 1, 1},
  {&__pyx_n_s_client_2, __pyx_k_client_2, sizeof(__pyx_k_client_2), 0, 0, 1, 1},
  {&__pyx_n_s_clientf, __pyx_k_clientf, sizeof(__pyx_k_clientf), 0, 0, 1, 1},
  {&__pyx_n_s_clients, __pyx_k_clients, sizeof(__pyx_k_clients), 0, 0, 1, 1},
  {&__pyx_n_s_clients_base, __pyx_k_clients_base, sizeof(__pyx_k_clients_base), 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_co_code, __pyx_k_co_code, sizeof(__pyx_k_co_code), 0, 0, 1, 1},
  {&__pyx_n_s_co_filename, __pyx_k_co_filename, sizeof(__pyx_k_co_filename), 0, 0, 1, 1},
  {&__pyx_n_s_co_firstlineno, __pyx_k_co_firstlineno, sizeof(__pyx_k_co_firstlineno), 0, 0, 1, 1},
  {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
  {&__pyx_n_s_coherence, __pyx_k_coherence, sizeof(__pyx_k_coherence), 0, 0, 1, 1},
  {&__pyx_n_s_coherence_encoding, __pyx_k_coherence_encoding, sizeof(__pyx_k_coherence_encoding), 0, 0, 1, 1},
  {&__pyx_n_s_coherence_kwargs, __pyx_k_coherence_kwargs, sizeof(__pyx_k_coherence_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_coherence_manager, __pyx_k_coherence_manager, sizeof(__pyx_k_coherence_manager), 0, 0, 1, 1},
  {&__pyx_n_s_coherence_namespace, __pyx_k_coherence_namespace, sizeof(__pyx_k_coherence_namespace), 0, 0, 1, 1},
  {&__pyx_n_s_coherence_namespace_2, __pyx_k_coherence_namespace_2, sizeof(__pyx_k_coherence_namespace_2), 0, 0, 1, 1},
  {&__pyx_n_s_coherence_timeout, __pyx_k_coherence_timeout, sizeof(__pyx_k_coherence_timeout), 0, 0, 1, 1},
  {&__pyx_n_s_coherent, __pyx_k_coherent, sizeof(__pyx_k_coherent), 0, 0, 1, 1},
  {&__pyx_n_s_coherent_cached, __pyx_k_coherent_cached, sizeof(__pyx_k_coherent_cached), 0, 0, 1, 1},
  {&__pyx_n_s_coherent_cached_locals_decor, __pyx_k_coherent_cached_locals_decor, sizeof(__pyx_k_coherent_cached_locals_decor), 0, 0, 1, 1},
  {&__pyx_n_s_coherent_cached_locals_lambda, __pyx_k_coherent_cached_locals_lambda, sizeof(__pyx_k_coherent_cached_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_coherent_put_deferred, __pyx_k_coherent_put_deferred, sizeof(__pyx_k_coherent_put_deferred), 0, 0, 1, 1},
  {&__pyx_n_s_coherent_put_deferred_locals_la, __pyx_k_coherent_put_deferred_locals_la, sizeof(__pyx_k_coherent_put_deferred_locals_la), 0, 0, 1, 1},
  {&__pyx_n_s_contains, __pyx_k_contains, sizeof(__pyx_k_contains), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_cpu_count, __pyx_k_cpu_count, sizeof(__pyx_k_cpu_count), 0, 0, 1, 1},
  {&__pyx_n_s_cy_noop, __pyx_k_cy_noop, sizeof(__pyx_k_cy_noop), 0, 0, 1, 1},
  {&__pyx_n_s_decor, __pyx_k_decor, sizeof(__pyx_k_decor), 0, 0, 1, 1},
  {&__pyx_n_s_decorate, __pyx_k_decorate, sizeof(__pyx_k_decorate), 0, 0, 1, 1},
  {&__pyx_n_s_decorated_functions, __pyx_k_decorated_functions, sizeof(__pyx_k_decorated_functions), 0, 0, 1, 1},
  {&__pyx_n_s_defer, __pyx_k_defer, sizeof(__pyx_k_defer), 0, 0, 1, 1},
  {&__pyx_n_s_delete, __pyx_k_delete, sizeof(__pyx_k_delete), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
  {&__pyx_n_s_digest, __pyx_k_digest, sizeof(__pyx_k_digest), 0, 0, 1, 1},
  {&__pyx_n_s_do_async, __pyx_k_do_async, sizeof(__pyx_k_do_async), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
  {&__pyx_n_s_easync_lazy_recheck_kwargs, __pyx_k_easync_lazy_recheck_kwargs, sizeof(__pyx_k_easync_lazy_recheck_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_eff_async_ttl, __pyx_k_eff_async_ttl, sizeof(__pyx_k_eff_async_ttl), 0, 0, 1, 1},
  {&__pyx_n_s_eff_async_ttl_2, __pyx_k_eff_async_ttl_2, sizeof(__pyx_k_eff_async_ttl_2), 0, 0, 1, 1},
  {&__pyx_n_s_eff_ttl, __pyx_k_eff_ttl, sizeof(__pyx_k_eff_ttl), 0, 0, 1, 1},
  {&__pyx_n_s_eget_async_lazy_recheck_kwargs, __pyx_k_eget_async_lazy_recheck_kwargs, sizeof(__pyx_k_eget_async_lazy_recheck_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_elazy_kwargs, __pyx_k_elazy_kwargs, sizeof(__pyx_k_elazy_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1},
  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
  {&__pyx_n_s_exc, __pyx_k_exc, sizeof(__pyx_k_exc), 0, 0, 1, 1},
  {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
  {&__pyx_n_s_expire, __pyx_k_expire, sizeof(__pyx_k_expire), 0, 0, 1, 1},
  {&__pyx_n_s_expire_f, __pyx_k_expire_f, sizeof(__pyx_k_expire_f), 0, 0, 1, 1},
  {&__pyx_n_s_expire_private, __pyx_k_expire_private, sizeof(__pyx_k_expire_private), 0, 0, 1, 1},
  {&__pyx_n_s_expired_ttl, __pyx_k_expired_ttl, sizeof(__pyx_k_expired_ttl), 0, 0, 1, 1},
  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
  {&__pyx_n_s_fclient, __pyx_k_fclient, sizeof(__pyx_k_fclient), 0, 0, 1, 1},
  {&__pyx_n_s_fcode, __pyx_k_fcode, sizeof(__pyx_k_fcode), 0, 0, 1, 1},
  {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1},
  {&__pyx_n_s_flazy_recheck_put_deferred, __pyx_k_flazy_recheck_put_deferred, sizeof(__pyx_k_flazy_recheck_put_deferred), 0, 0, 1, 1},
  {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
  {&__pyx_n_s_fname, __pyx_k_fname, sizeof(__pyx_k_fname), 0, 0, 1, 1},
  {&__pyx_n_s_fpath, __pyx_k_fpath, sizeof(__pyx_k_fpath), 0, 0, 1, 1},
  {&__pyx_n_s_fput_deferred, __pyx_k_fput_deferred, sizeof(__pyx_k_fput_deferred), 0, 0, 1, 1},
  {&__pyx_n_s_frv, __pyx_k_frv, sizeof(__pyx_k_frv), 0, 0, 1, 1},
  {&__pyx_n_s_func_code, __pyx_k_func_code, sizeof(__pyx_k_func_code), 0, 0, 1, 1},
  {&__pyx_n_s_func_name, __pyx_k_func_name, sizeof(__pyx_k_func_name), 0, 0, 1, 1},
  {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1},
  {&__pyx_n_s_future, __pyx_k_future, sizeof(__pyx_k_future), 0, 0, 1, 1},
  {&__pyx_n_s_future_cached_f, __pyx_k_future_cached_f, sizeof(__pyx_k_future_cached_f), 0, 0, 1, 1},
  {&__pyx_n_s_future_expire_f, __pyx_k_future_expire_f, sizeof(__pyx_k_future_expire_f), 0, 0, 1, 1},
  {&__pyx_n_s_future_f, __pyx_k_future_f, sizeof(__pyx_k_future_f), 0, 0, 1, 1},
  {&__pyx_n_s_future_get_ttl_f, __pyx_k_future_get_ttl_f, sizeof(__pyx_k_future_get_ttl_f), 0, 0, 1, 1},
  {&__pyx_n_s_future_invalidate_f, __pyx_k_future_invalidate_f, sizeof(__pyx_k_future_invalidate_f), 0, 0, 1, 1},
  {&__pyx_n_s_future_lazy_cached_f, __pyx_k_future_lazy_cached_f, sizeof(__pyx_k_future_lazy_cached_f), 0, 0, 1, 1},
  {&__pyx_n_s_future_peek_cached_f, __pyx_k_future_peek_cached_f, sizeof(__pyx_k_future_peek_cached_f), 0, 0, 1, 1},
  {&__pyx_n_s_future_put_f, __pyx_k_future_put_f, sizeof(__pyx_k_future_put_f), 0, 0, 1, 1},
  {&__pyx_n_s_future_refresh_f, __pyx_k_future_refresh_f, sizeof(__pyx_k_future_refresh_f), 0, 0, 1, 1},
  {&__pyx_n_s_future_sync_check, __pyx_k_future_sync_check, sizeof(__pyx_k_future_sync_check), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_getLogger, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1},
  {&__pyx_n_s_getTtl, __pyx_k_getTtl, sizeof(__pyx_k_getTtl), 0, 0, 1, 1},
  {&__pyx_n_s_get_kwargs, __pyx_k_get_kwargs, sizeof(__pyx_k_get_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_get_ttl, __pyx_k_get_ttl, sizeof(__pyx_k_get_ttl), 0, 0, 1, 1},
  {&__pyx_n_s_get_ttl_f, __pyx_k_get_ttl_f, sizeof(__pyx_k_get_ttl_f), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_hashlib, __pyx_k_hashlib, sizeof(__pyx_k_hashlib), 0, 0, 1, 1},
  {&__pyx_n_s_hits, __pyx_k_hits, sizeof(__pyx_k_hits), 0, 0, 1, 1},
  {&__pyx_n_s_im_func, __pyx_k_im_func, sizeof(__pyx_k_im_func), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1},
  {&__pyx_n_s_initialize_2, __pyx_k_initialize_2, sizeof(__pyx_k_initialize_2), 0, 0, 1, 1},
  {&__pyx_n_s_invalidate, __pyx_k_invalidate, sizeof(__pyx_k_invalidate), 0, 0, 1, 1},
  {&__pyx_n_s_invalidate_f, __pyx_k_invalidate_f, sizeof(__pyx_k_invalidate_f), 0, 0, 1, 1},
  {&__pyx_n_s_ipsub, __pyx_k_ipsub, sizeof(__pyx_k_ipsub), 0, 0, 1, 1},
  {&__pyx_n_s_is_async, __pyx_k_is_async, sizeof(__pyx_k_is_async), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
  {&__pyx_n_s_lazy, __pyx_k_lazy, sizeof(__pyx_k_lazy), 0, 0, 1, 1},
  {&__pyx_n_s_lazy_cached_f, __pyx_k_lazy_cached_f, sizeof(__pyx_k_lazy_cached_f), 0, 0, 1, 1},
  {&__pyx_n_s_lazy_kwargs, __pyx_k_lazy_kwargs, sizeof(__pyx_k_lazy_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_lazy_recheck_put_deferred, __pyx_k_lazy_recheck_put_deferred, sizeof(__pyx_k_lazy_recheck_put_deferred), 0, 0, 1, 1},
  {&__pyx_kp_s_lib_chorde_decorators_py, __pyx_k_lib_chorde_decorators_py, sizeof(__pyx_k_lib_chorde_decorators_py), 0, 0, 1, 0},
  {&__pyx_n_s_logging, __pyx_k_logging, sizeof(__pyx_k_logging), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_make_namespace, __pyx_k_make_namespace, sizeof(__pyx_k_make_namespace), 0, 0, 1, 1},
  {&__pyx_n_s_max_miss_time, __pyx_k_max_miss_time, sizeof(__pyx_k_max_miss_time), 0, 0, 1, 1},
  {&__pyx_n_s_maxtime, __pyx_k_maxtime, sizeof(__pyx_k_maxtime), 0, 0, 1, 1},
  {&__pyx_n_s_md5, __pyx_k_md5, sizeof(__pyx_k_md5), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_min_miss_time, __pyx_k_min_miss_time, sizeof(__pyx_k_min_miss_time), 0, 0, 1, 1},
  {&__pyx_n_s_miss, __pyx_k_miss, sizeof(__pyx_k_miss), 0, 0, 1, 1},
  {&__pyx_n_s_miss_nothreads, __pyx_k_miss_nothreads, sizeof(__pyx_k_miss_nothreads), 0, 0, 1, 1},
  {&__pyx_n_s_miss_time_histogram, __pyx_k_miss_time_histogram, sizeof(__pyx_k_miss_time_histogram), 0, 0, 1, 1},
  {&__pyx_n_s_miss_time_histogram_bins, __pyx_k_miss_time_histogram_bins, sizeof(__pyx_k_miss_time_histogram_bins), 0, 0, 1, 1},
  {&__pyx_n_s_miss_time_histogram_max, __pyx_k_miss_time_histogram_max, sizeof(__pyx_k_miss_time_histogram_max), 0, 0, 1, 1},
  {&__pyx_n_s_misses, __pyx_k_misses, sizeof(__pyx_k_misses), 0, 0, 1, 1},
  {&__pyx_n_s_mname, __pyx_k_mname, sizeof(__pyx_k_mname), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_mq, __pyx_k_mq, sizeof(__pyx_k_mq), 0, 0, 1, 1},
  {&__pyx_n_s_multiprocessing, __pyx_k_multiprocessing, sizeof(__pyx_k_multiprocessing), 0, 0, 1, 1},
  {&__pyx_n_s_multiprocessing_cpu_count, __pyx_k_multiprocessing_cpu_count, sizeof(__pyx_k_multiprocessing_cpu_count), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_namespace, __pyx_k_namespace, sizeof(__pyx_k_namespace), 0, 0, 1, 1},
  {&__pyx_n_s_namespace_2, __pyx_k_namespace_2, sizeof(__pyx_k_namespace_2), 0, 0, 1, 1},
  {&__pyx_n_s_nasync_client, __pyx_k_nasync_client, sizeof(__pyx_k_nasync_client), 0, 0, 1, 1},
  {&__pyx_n_s_nclient, __pyx_k_nclient, sizeof(__pyx_k_nclient), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_no_coherence, __pyx_k_no_coherence, sizeof(__pyx_k_no_coherence), 0, 0, 1, 1},
  {&__pyx_n_s_nprivate, __pyx_k_nprivate, sizeof(__pyx_k_nprivate), 0, 0, 1, 1},
  {&__pyx_n_s_nshared, __pyx_k_nshared, sizeof(__pyx_k_nshared), 0, 0, 1, 1},
  {&__pyx_n_s_ntiered, __pyx_k_ntiered, sizeof(__pyx_k_ntiered), 0, 0, 1, 1},
  {&__pyx_n_s_of, __pyx_k_of, sizeof(__pyx_k_of), 0, 0, 1, 1},
  {&__pyx_n_s_on_any, __pyx_k_on_any, sizeof(__pyx_k_on_any), 0, 0, 1, 1},
  {&__pyx_n_s_on_any_once, __pyx_k_on_any_once, sizeof(__pyx_k_on_any_once), 0, 0, 1, 1},
  {&__pyx_n_s_on_exc, __pyx_k_on_exc, sizeof(__pyx_k_on_exc), 0, 0, 1, 1},
  {&__pyx_n_s_on_miss, __pyx_k_on_miss, sizeof(__pyx_k_on_miss), 0, 0, 1, 1},
  {&__pyx_n_s_on_promote, __pyx_k_on_promote, sizeof(__pyx_k_on_promote), 0, 0, 1, 1},
  {&__pyx_n_s_on_promote_f, __pyx_k_on_promote_f, sizeof(__pyx_k_on_promote_f), 0, 0, 1, 1},
  {&__pyx_n_s_on_value, __pyx_k_on_value, sizeof(__pyx_k_on_value), 0, 0, 1, 1},
  {&__pyx_n_s_on_value_f, __pyx_k_on_value_f, sizeof(__pyx_k_on_value_f), 0, 0, 1, 1},
  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
  {&__pyx_n_s_partial, __pyx_k_partial, sizeof(__pyx_k_partial), 0, 0, 1, 1},
  {&__pyx_n_s_peek, __pyx_k_peek, sizeof(__pyx_k_peek), 0, 0, 1, 1},
  {&__pyx_n_s_peek_cached_f, __pyx_k_peek_cached_f, sizeof(__pyx_k_peek_cached_f), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_placeholder, __pyx_k_placeholder, sizeof(__pyx_k_placeholder), 0, 0, 1, 1},
  {&__pyx_n_s_placeholder_value, __pyx_k_placeholder_value, sizeof(__pyx_k_placeholder_value), 0, 0, 1, 1},
  {&__pyx_n_s_placeholder_value_f, __pyx_k_placeholder_value_f, sizeof(__pyx_k_placeholder_value_f), 0, 0, 1, 1},
  {&__pyx_n_s_placeholder_value_fn_cell, __pyx_k_placeholder_value_fn_cell, sizeof(__pyx_k_placeholder_value_fn_cell), 0, 0, 1, 1},
  {&__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_private, __pyx_k_private, sizeof(__pyx_k_private), 0, 0, 1, 1},
  {&__pyx_n_s_promote, __pyx_k_promote, sizeof(__pyx_k_promote), 0, 0, 1, 1},
  {&__pyx_n_s_promote_callback, __pyx_k_promote_callback, sizeof(__pyx_k_promote_callback), 0, 0, 1, 1},
  {&__pyx_n_s_promote_callback_2, __pyx_k_promote_callback_2, sizeof(__pyx_k_promote_callback_2), 0, 0, 1, 1},
  {&__pyx_n_s_promote_callbacks, __pyx_k_promote_callbacks, sizeof(__pyx_k_promote_callbacks), 0, 0, 1, 1},
  {&__pyx_n_s_promote_callbacks_2, __pyx_k_promote_callbacks_2, sizeof(__pyx_k_promote_callbacks_2), 0, 0, 1, 1},
  {&__pyx_n_s_put, __pyx_k_put, sizeof(__pyx_k_put), 0, 0, 1, 1},
  {&__pyx_n_s_put_coherently, __pyx_k_put_coherently, sizeof(__pyx_k_put_coherently), 0, 0, 1, 1},
  {&__pyx_n_s_put_deferred, __pyx_k_put_deferred, sizeof(__pyx_k_put_deferred), 0, 0, 1, 1},
  {&__pyx_n_s_put_f, __pyx_k_put_f, sizeof(__pyx_k_put_f), 0, 0, 1, 1},
  {&__pyx_n_s_put_kwargs, __pyx_k_put_kwargs, sizeof(__pyx_k_put_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_pydoc, __pyx_k_pydoc, sizeof(__pyx_k_pydoc), 0, 0, 1, 1},
  {&__pyx_n_s_pyobj, __pyx_k_pyobj, sizeof(__pyx_k_pyobj), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CacheStats, __pyx_k_pyx_unpickle_CacheStats, sizeof(__pyx_k_pyx_unpickle_CacheStats), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
  {&__pyx_n_s_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1},
  {&__pyx_n_s_refresh, __pyx_k_refresh, sizeof(__pyx_k_refresh), 0, 0, 1, 1},
  {&__pyx_n_s_refresh_f, __pyx_k_refresh_f, sizeof(__pyx_k_refresh_f), 0, 0, 1, 1},
  {&__pyx_n_s_render_doc, __pyx_k_render_doc, sizeof(__pyx_k_render_doc), 0, 0, 1, 1},
  {&__pyx_n_s_renew, __pyx_k_renew, sizeof(__pyx_k_renew), 0, 0, 1, 1},
  {&__pyx_n_s_renew_time, __pyx_k_renew_time, sizeof(__pyx_k_renew_time), 0, 0, 1, 1},
  {&__pyx_n_s_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 0, 1, 1},
  {&__pyx_n_s_rv, __pyx_k_rv, sizeof(__pyx_k_rv), 0, 0, 1, 1},
  {&__pyx_n_s_rvttl, __pyx_k_rvttl, sizeof(__pyx_k_rvttl), 0, 0, 1, 1},
  {&__pyx_kp_s_s_d, __pyx_k_s_d, sizeof(__pyx_k_s_d), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s_s, __pyx_k_s_s_s, sizeof(__pyx_k_s_s_s), 0, 0, 1, 0},
  {&__pyx_n_s_salt, __pyx_k_salt, sizeof(__pyx_k_salt), 0, 0, 1, 1},
  {&__pyx_n_s_salt2, __pyx_k_salt2, sizeof(__pyx_k_salt2), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
  {&__pyx_n_s_set_histogram_bins, __pyx_k_set_histogram_bins, sizeof(__pyx_k_set_histogram_bins), 0, 0, 1, 1},
  {&__pyx_n_s_set_nothreads, __pyx_k_set_nothreads, sizeof(__pyx_k_set_nothreads), 0, 0, 1, 1},
  {&__pyx_n_s_setdefault, __pyx_k_setdefault, sizeof(__pyx_k_setdefault), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_shared, __pyx_k_shared, sizeof(__pyx_k_shared), 0, 0, 1, 1},
  {&__pyx_n_s_shareds, __pyx_k_shareds, sizeof(__pyx_k_shareds), 0, 0, 1, 1},
  {&__pyx_n_s_sharedt, __pyx_k_sharedt, sizeof(__pyx_k_sharedt), 0, 0, 1, 1},
  {&__pyx_n_s_simple_put_deferred, __pyx_k_simple_put_deferred, sizeof(__pyx_k_simple_put_deferred), 0, 0, 1, 1},
  {&__pyx_n_s_slots, __pyx_k_slots, sizeof(__pyx_k_slots), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_spread_type, __pyx_k_spread_type, sizeof(__pyx_k_spread_type), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_n_s_stats, __pyx_k_stats, sizeof(__pyx_k_stats), 0, 0, 1, 1},
  {&__pyx_n_s_stop_initializing, __pyx_k_stop_initializing, sizeof(__pyx_k_stop_initializing), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_sum_miss_time, __pyx_k_sum_miss_time, sizeof(__pyx_k_sum_miss_time), 0, 0, 1, 1},
  {&__pyx_n_s_sum_miss_time_sq, __pyx_k_sum_miss_time_sq, sizeof(__pyx_k_sum_miss_time_sq), 0, 0, 1, 1},
  {&__pyx_n_s_sync_errors, __pyx_k_sync_errors, sizeof(__pyx_k_sync_errors), 0, 0, 1, 1},
  {&__pyx_n_s_sync_misses, __pyx_k_sync_misses, sizeof(__pyx_k_sync_misses), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_t0, __pyx_k_t0, sizeof(__pyx_k_t0), 0, 0, 1, 1},
  {&__pyx_n_s_t1, __pyx_k_t1, sizeof(__pyx_k_t1), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_threadpool, __pyx_k_threadpool, sizeof(__pyx_k_threadpool), 0, 0, 1, 1},
  {&__pyx_n_s_tiered, __pyx_k_tiered, sizeof(__pyx_k_tiered), 0, 0, 1, 1},
  {&__pyx_n_s_tiered_2, __pyx_k_tiered_2, sizeof(__pyx_k_tiered_2), 0, 0, 1, 1},
  {&__pyx_n_s_tiered_opts, __pyx_k_tiered_opts, sizeof(__pyx_k_tiered_opts), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_n_s_timings, __pyx_k_timings, sizeof(__pyx_k_timings), 0, 0, 1, 1},
  {&__pyx_n_s_touch_key, __pyx_k_touch_key, sizeof(__pyx_k_touch_key), 0, 0, 1, 1},
  {&__pyx_n_s_ttl, __pyx_k_ttl, sizeof(__pyx_k_ttl), 0, 0, 1, 1},
  {&__pyx_n_s_ttl_skip, __pyx_k_ttl_skip, sizeof(__pyx_k_ttl_skip), 0, 0, 1, 1},
  {&__pyx_n_s_ttl_spread, __pyx_k_ttl_spread, sizeof(__pyx_k_ttl_spread), 0, 0, 1, 1},
  {&__pyx_n_s_uncached, __pyx_k_uncached, sizeof(__pyx_k_uncached), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value_callback, __pyx_k_value_callback, sizeof(__pyx_k_value_callback), 0, 0, 1, 1},
  {&__pyx_n_s_value_callbacks, __pyx_k_value_callbacks, sizeof(__pyx_k_value_callbacks), 0, 0, 1, 1},
  {&__pyx_n_s_value_callbacks_2, __pyx_k_value_callbacks_2, sizeof(__pyx_k_value_callbacks_2), 0, 0, 1, 1},
  {&__pyx_n_s_value_decorator, __pyx_k_value_decorator, sizeof(__pyx_k_value_decorator), 0, 0, 1, 1},
  {&__pyx_n_s_value_deserialization_function, __pyx_k_value_deserialization_function, sizeof(__pyx_k_value_deserialization_function), 0, 0, 1, 1},
  {&__pyx_n_s_value_serialization_function, __pyx_k_value_serialization_function, sizeof(__pyx_k_value_serialization_function), 0, 0, 1, 1},
  {&__pyx_n_s_value_undecorator, __pyx_k_value_undecorator, sizeof(__pyx_k_value_undecorator), 0, 0, 1, 1},
  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  {&__pyx_n_s_wait, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1},
  {&__pyx_n_s_wait_time, __pyx_k_wait_time, sizeof(__pyx_k_wait_time), 0, 0, 1, 1},
  {&__pyx_n_s_weakref, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1},
  {&__pyx_n_s_wrapped, __pyx_k_wrapped, sizeof(__pyx_k_wrapped), 0, 0, 1, 1},
  {&__pyx_n_s_wrapper, __pyx_k_wrapper, sizeof(__pyx_k_wrapper), 0, 0, 1, 1},
  {&__pyx_n_s_wraps, __pyx_k_wraps, sizeof(__pyx_k_wraps), 0, 0, 1, 1},
  {&__pyx_n_s_wraps_2, __pyx_k_wraps_2, sizeof(__pyx_k_wraps_2), 0, 0, 1, 1},
  {&__pyx_n_s_wraps_locals_decor, __pyx_k_wraps_locals_decor, sizeof(__pyx_k_wraps_locals_decor), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 17, __pyx_L1_error)
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 41, __pyx_L1_error)
  __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_n_s_filter); if (!__pyx_builtin_filter) __PYX_ERR(0, 51, __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);

  /* "chorde/decorators.py":50
 *         wrapper = w(wrapper)
 *         wrapper.__doc__ = "\n".join(
 *             pydoc.render_doc(wrapped, 'cached %s:').split('\n', 4)[:3]             # <<<<<<<<<<<<<<
 *             + list(filter(bool, [wrapper.__doc__])))
 *         return wrapper
 */
  __pyx_tuple__2 = PyTuple_Pack(2, __pyx_kp_s_, __pyx_int_4); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);
  __pyx_slice__3 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__3);
  __Pyx_GIVEREF(__pyx_slice__3);

  /* "chorde/decorators.py":47
 * def wraps(wrapped):
 *     w = _wraps(wrapped)
 *     def decor(wrapper):             # <<<<<<<<<<<<<<
 *         wrapper = w(wrapper)
 *         wrapper.__doc__ = "\n".join(
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_n_s_wrapper); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);
  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_decor, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 47, __pyx_L1_error)

  /* "chorde/decorators.py":108
 *     def __init__(self):
 *         self.clear()
 *         self.set_histogram_bins(0, None)             # <<<<<<<<<<<<<<
 * 
 *     def clear(self):
 */
  __pyx_tuple__8 = PyTuple_Pack(2, __pyx_int_0, Py_None); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "chorde/decorators.py":491
 *                         except:
 *                             # Just log callback exceptions, orthogonal behavior shouldn't propagate to the caller
 *                             logging.getLogger('chorde').error("Error on value callback", exc_info = True)             # <<<<<<<<<<<<<<
 *                             pass
 *                     return rv
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Error_on_value_callback); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "chorde/decorators.py":540
 *             except:
 *                 # Bummer
 *                 logging.getLogger('chorde').error("Error evaluating callkey", exc_info = True)             # <<<<<<<<<<<<<<
 *                 stats.errors += 1
 *                 return f(*p, **kw)
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Error_evaluating_callkey); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "chorde/decorators.py":652
 *                 if rv is __NONE:
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         stats.hits += 1
 *                         frv.set(value[0])
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_value, 652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 652, __pyx_L1_error)

  /* "chorde/decorators.py":661
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_placeholder); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);
  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_miss, 661, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 661, __pyx_L1_error)

  /* "chorde/decorators.py":666
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _fput_deferred(frv, client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_exc_info); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);
  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_exc, 666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 666, __pyx_L1_error)

  /* "chorde/decorators.py":675
 *                     stats.hits += 1
 *                     frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok             # <<<<<<<<<<<<<<
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_contains); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);
  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_value, 675, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 675, __pyx_L1_error)

  /* "chorde/decorators.py":683
 *                             # just promote
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_placeholder); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);
  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_miss, 683, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 683, __pyx_L1_error)

  /* "chorde/decorators.py":688
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_exc_info); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_exc, 688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 688, __pyx_L1_error)

  /* "chorde/decorators.py":748
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 *                     # It was a preliminar miss, so wait for a recheck to set the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         if value[1] >= 0:
 *                             stats.hits += 1
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_value, 748, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 748, __pyx_L1_error)

  /* "chorde/decorators.py":761
 *                                 nclient.renew(callkey, eff_async_ttl + renew_time)
 *                             _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         # Ok, real miss, report it and start the computation
 *                         frv.miss()
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_placeholder); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 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_lib_chorde_decorators_py, __pyx_n_s_on_miss, 761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 761, __pyx_L1_error)

  /* "chorde/decorators.py":768
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         frv.exc(exc_info)
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_exc_info); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);
  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_lib_chorde_decorators_py, __pyx_n_s_on_exc, 768, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 768, __pyx_L1_error)

  /* "chorde/decorators.py":781
 *                         stats.hits += 1
 *                         frv._set_nothreads(rv)
 *                     def on_value(contains):  # lint:ok             # <<<<<<<<<<<<<<
 *                         if not contains:
 *                             if renew_time is not None and (rv is not __NONE or lazy_kwargs):
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_contains); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_value, 781, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 781, __pyx_L1_error)

  /* "chorde/decorators.py":789
 *                             # just promote
 *                             nclient.promote(callkey, ttl_skip = eff_async_ttl, **get_kwargs)
 *                     def on_miss():  # lint:ok             # <<<<<<<<<<<<<<
 *                         if renew_time is not None and placeholder_value_fn_cell:
 *                             placeholder = placeholder_value_fn_cell[0](*p, **kw)
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_placeholder); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);
  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_miss, 789, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 789, __pyx_L1_error)

  /* "chorde/decorators.py":794
 *                             nclient.add(callkey, placeholder, eff_async_ttl + renew_time)
 *                         _put_deferred(client, af, callkey, eff_ttl(), *p, **kw)
 *                     def on_exc(exc_info):  # lint:ok             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                     clientf.contains(callkey, eff_async_ttl, **easync_lazy_recheck_kwargs)\
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_s_exc_info); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);
  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_exc, 794, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 794, __pyx_L1_error)

  /* "chorde/decorators.py":831
 *                 if rv is __NONE and (not future_sync_check or async_lazy_recheck):
 *                     # It was a miss, so wait for setting the value
 *                     def on_value(value):             # <<<<<<<<<<<<<<
 *                         if value[1] >= 0:
 *                             stats.hits += 1
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);
  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_value, 831, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 831, __pyx_L1_error)

  /* "chorde/decorators.py":839
 *                             stats.misses += 1
 *                             return frv.miss()
 *                     def on_miss():             # <<<<<<<<<<<<<<
 *                         # Ok, real miss, report it
 *                         stats.misses += 1
 */
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_miss, 839, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 839, __pyx_L1_error)

  /* "chorde/decorators.py":843
 *                         stats.misses += 1
 *                         return frv.miss()
 *                     def on_exc(exc_info):             # <<<<<<<<<<<<<<
 *                         stats.errors += 1
 *                         return frv.exc(exc_info)
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_exc_info); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_exc, 843, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 843, __pyx_L1_error)

  /* "chorde/decorators.py":1014
 *                     # send a Defer that touches the client with recheck kwargs
 *                     # before doing the refresh. Needs not be coherent.
 *                     def touch_key(*p, **kw):             # <<<<<<<<<<<<<<
 *                         rv, rvttl = nclient.getTtl(callkey, __NONE, ttl_skip = eff_async_ttl,
 *                             **eget_async_lazy_recheck_kwargs)
 */
  __pyx_tuple__40 = PyTuple_Pack(4, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_rv, __pyx_n_s_rvttl); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);
  __pyx_codeobj__41 = (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__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_touch_key, 1014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1014, __pyx_L1_error)

  /* "chorde/decorators.py":444
 * 
 *         if initialize is not None:
 *             def _initialize():             # <<<<<<<<<<<<<<
 *                 nonlocal _initialize
 *                 stop_initializing = initialize()
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_stop_initializing); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_initialize_2, 444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 444, __pyx_L1_error)

  /* "chorde/decorators.py":466
 *             @wraps(of)
 *             @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *             def af(*p, **kw):             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *                 try:
 */
  __pyx_tuple__44 = PyTuple_Pack(6, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_t0, __pyx_n_s_t1, __pyx_n_s_t, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);
  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_af, 466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 466, __pyx_L1_error)

  /* "chorde/decorators.py":498
 *                     raise
 *             @wraps(of)
 *             def f(*p, **kw):             # <<<<<<<<<<<<<<
 *                 stats.sync_misses += 1
 *                 return af(*p, **kw)
 */
  __pyx_tuple__46 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_kw); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);
  __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_f, 498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 498, __pyx_L1_error)

  /* "chorde/decorators.py":504
 *             of = f
 *             @wraps(of)
 *             def af(*p, **kw):  # lint:ok             # <<<<<<<<<<<<<<
 *                 stats.misses += 1
 *                 try:
 */
  __pyx_tuple__48 = PyTuple_Pack(3, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_af, 504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 504, __pyx_L1_error)

  /* "chorde/decorators.py":520
 *                     raise
 *             @wraps(of)
 *             def f(*p, **kw):  # lint:ok             # <<<<<<<<<<<<<<
 *                 stats.sync_misses += 1
 *                 rv = af(*p, **kw)
 */
  __pyx_tuple__50 = PyTuple_Pack(3, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_f, 520, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 520, __pyx_L1_error)

  /* "chorde/decorators.py":533
 * 
 *         @wraps(of)
 *         def cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__52 = PyTuple_Pack(4, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);
  __pyx_codeobj__53 = (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__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_cached_f, 533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 533, __pyx_L1_error)

  /* "chorde/decorators.py":555
 * 
 *         @wraps(of)
 *         def get_ttl_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__54 = PyTuple_Pack(4, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);
  __pyx_codeobj__55 = (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__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_get_ttl_f, 555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 555, __pyx_L1_error)

  /* "chorde/decorators.py":576
 *         @wraps(of)
 *         @cython.locals(t0=cython.double, t1=cython.double, t=cython.double)
 *         def async_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__56 = PyTuple_Pack(11, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_t0, __pyx_n_s_t1, __pyx_n_s_t, __pyx_n_s_callkey, __pyx_n_s_client, __pyx_n_s_NONE_2, __pyx_n_s_rv, __pyx_n_s_rvttl, __pyx_n_s_placeholder); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_async_cached_f, 576, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 576, __pyx_L1_error)

  /* "chorde/decorators.py":627
 * 
 *         @wraps(of)
 *         def future_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_tuple__58 = PyTuple_Pack(18, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey, __pyx_n_s_client, __pyx_n_s_clientf, __pyx_n_s_frv, __pyx_n_s_NONE_2, __pyx_n_s_rv, __pyx_n_s_rvttl, __pyx_n_s_on_value, __pyx_n_s_on_value, __pyx_n_s_on_miss, __pyx_n_s_on_miss, __pyx_n_s_on_exc, __pyx_n_s_on_exc, __pyx_n_s_on_value, __pyx_n_s_on_miss, __pyx_n_s_on_exc); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_future_cached_f, 627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 627, __pyx_L1_error)

  /* "chorde/decorators.py":700
 * 
 *         @wraps(of)
 *         def lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__60 = PyTuple_Pack(4, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);
  __pyx_codeobj__61 = (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__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_lazy_cached_f, 700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 700, __pyx_L1_error)

  /* "chorde/decorators.py":723
 * 
 *         @wraps(of)
 *         def future_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_tuple__62 = PyTuple_Pack(18, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey, __pyx_n_s_client, __pyx_n_s_frv, __pyx_n_s_NONE_2, __pyx_n_s_rv, __pyx_n_s_rvttl, __pyx_n_s_clientf, __pyx_n_s_on_value, __pyx_n_s_on_value, __pyx_n_s_on_miss, __pyx_n_s_on_miss, __pyx_n_s_on_exc, __pyx_n_s_on_exc, __pyx_n_s_on_value, __pyx_n_s_on_miss, __pyx_n_s_on_exc); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_future_lazy_cached_f, 723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 723, __pyx_L1_error)

  /* "chorde/decorators.py":806
 * 
 *         @wraps(of)
 *         def future_peek_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_tuple__64 = PyTuple_Pack(15, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey, __pyx_n_s_client, __pyx_n_s_clientf, __pyx_n_s_frv, __pyx_n_s_NONE_2, __pyx_n_s_rv, __pyx_n_s_rvttl, __pyx_n_s_on_value, __pyx_n_s_on_value, __pyx_n_s_on_miss, __pyx_n_s_on_miss, __pyx_n_s_on_exc, __pyx_n_s_on_exc); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_future_peek_cached_f, 806, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 806, __pyx_L1_error)

  /* "chorde/decorators.py":864
 * 
 *         @wraps(of)
 *         def future_get_ttl_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_tuple__66 = PyTuple_Pack(3, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_future_get_ttl_f, 864, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 864, __pyx_L1_error)

  /* "chorde/decorators.py":880
 * 
 *         @wraps(of)
 *         def invalidate_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__68 = PyTuple_Pack(3, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_invalidate_f, 880, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 880, __pyx_L1_error)

  /* "chorde/decorators.py":894
 * 
 *         @wraps(of)
 *         def future_invalidate_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_tuple__70 = PyTuple_Pack(3, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_future_invalidate_f, 894, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 894, __pyx_L1_error)

  /* "chorde/decorators.py":906
 * 
 *         @wraps(of)
 *         def expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__72 = PyTuple_Pack(3, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_expire_f, 906, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 906, __pyx_L1_error)

  /* "chorde/decorators.py":920
 * 
 *         @wraps(of)
 *         def async_expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__74 = PyTuple_Pack(3, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_async_expire_f, 920, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 920, __pyx_L1_error)

  /* "chorde/decorators.py":934
 * 
 *         @wraps(of)
 *         def future_expire_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_tuple__76 = PyTuple_Pack(3, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_future_expire_f, 934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 934, __pyx_L1_error)

  /* "chorde/decorators.py":946
 * 
 *         @wraps(of)
 *         def put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 */
  __pyx_tuple__78 = PyTuple_Pack(5, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_value, __pyx_n_s_put_kwargs, __pyx_n_s_callkey); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_put_f, 946, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 946, __pyx_L1_error)

  /* "chorde/decorators.py":962
 * 
 *         @wraps(of)
 *         def async_put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__80 = PyTuple_Pack(5, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_value, __pyx_n_s_put_kwargs, __pyx_n_s_callkey); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_async_put_f, 962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 962, __pyx_L1_error)

  /* "chorde/decorators.py":978
 * 
 *         @wraps(of)
 *         def future_put_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             value = kw.pop('_cache_put')
 *             put_kwargs = kw.pop('_cache_put_kwargs', None)
 */
  __pyx_tuple__82 = PyTuple_Pack(5, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_value, __pyx_n_s_put_kwargs, __pyx_n_s_callkey); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_future_put_f, 978, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 978, __pyx_L1_error)

  /* "chorde/decorators.py":992
 * 
 *         @wraps(of)
 *         def async_lazy_cached_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__84 = PyTuple_Pack(9, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey, __pyx_n_s_NONE_2, __pyx_n_s_client, __pyx_n_s_rv, __pyx_n_s_rvttl, __pyx_n_s_touch_key, __pyx_n_s_touch_key); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_async_lazy_cached_f, 992, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 992, __pyx_L1_error)

  /* "chorde/decorators.py":1049
 * 
 *         @wraps(of)
 *         def refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__86 = PyTuple_Pack(4, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (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__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_refresh_f, 1049, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1049, __pyx_L1_error)

  /* "chorde/decorators.py":1067
 * 
 *         @wraps(of)
 *         def async_refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             if _initialize is not None:
 *                 _initialize()
 */
  __pyx_tuple__88 = PyTuple_Pack(4, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey, __pyx_n_s_client); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (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__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_async_refresh_f, 1067, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1067, __pyx_L1_error)

  /* "chorde/decorators.py":1085
 * 
 *         @wraps(of)
 *         def future_refresh_f(*p, **kw):             # <<<<<<<<<<<<<<
 *             try:
 *                 callkey = key(*p, **kw)
 */
  __pyx_tuple__90 = PyTuple_Pack(4, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_callkey, __pyx_n_s_frv); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (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__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_future_refresh_f, 1085, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1085, __pyx_L1_error)

  /* "chorde/decorators.py":1111
 *         value_callbacks = []
 *         get_kwargs = {}
 *         def _promote_callback(*p, **kw):             # <<<<<<<<<<<<<<
 *             for cb in promote_callbacks:
 *                 cb(*p, **kw)
 */
  __pyx_tuple__92 = PyTuple_Pack(3, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_cb); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_promote_callback_2, 1111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 1111, __pyx_L1_error)

  /* "chorde/decorators.py":1114
 *             for cb in promote_callbacks:
 *                 cb(*p, **kw)
 *         def _value_callback(*p, **kw):             # <<<<<<<<<<<<<<
 *             for cb in value_callbacks:
 *                 cb(*p, **kw)
 */
  __pyx_tuple__94 = PyTuple_Pack(3, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_cb); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_value_callback, 1114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 1114, __pyx_L1_error)

  /* "chorde/decorators.py":1117
 *             for cb in value_callbacks:
 *                 cb(*p, **kw)
 *         def on_promote_f(callback):             # <<<<<<<<<<<<<<
 *             promote_callbacks.append(callback)
 *             get_kwargs.setdefault('promote_callback', _promote_callback)
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_promote_f, 1117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1117, __pyx_L1_error)

  /* "chorde/decorators.py":1123
 *             eget_async_lazy_recheck_kwargs.setdefault('promote_callback', _promote_callback)
 *             return callback
 *         def on_value_f(callback):             # <<<<<<<<<<<<<<
 *             value_callbacks.append(callback)
 *             return callback
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_on_value_f, 1123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1123, __pyx_L1_error)

  /* "chorde/decorators.py":1128
 * 
 *         placeholder_value_fn_cell = []
 *         def placeholder_value_f(fn):             # <<<<<<<<<<<<<<
 *             placeholder_value_fn_cell[:] = [fn]
 * 
 */
  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_n_s_fn); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_placeholder_value_f, 1128, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1128, __pyx_L1_error)

  /* "chorde/decorators.py":1132
 * 
 *         fclient = None
 *         def future_f(initialize = True):             # <<<<<<<<<<<<<<
 *             nonlocal fclient
 *             if _initialize is not None:
 */
  __pyx_tuple__102 = PyTuple_Pack(2, __pyx_n_s_initialize, __pyx_n_s_client_2); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_future_f, 1132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __pyx_tuple__104 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "chorde/decorators.py":1154
 * 
 *         if not client.is_async:
 *             def async_f(initialize = True):             # <<<<<<<<<<<<<<
 *                 nonlocal aclient
 *                 if _initialize is not None:
 */
  __pyx_tuple__105 = PyTuple_Pack(1, __pyx_n_s_initialize); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_async_f, 1154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __pyx_tuple__107 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "chorde/decorators.py":428
 *     Future = asyncache.Future
 * 
 *     def decor(f):             # <<<<<<<<<<<<<<
 *         if namespace is None:
 *             salt2 = repr((ttl,))
 */
  __pyx_tuple__108 = PyTuple_Pack(75, __pyx_n_s_f, __pyx_n_s_salt2, __pyx_n_s_nclient, __pyx_n_s_nasync_client, __pyx_n_s_stats, __pyx_n_s_initialize_2, __pyx_n_s_initialize_2, __pyx_n_s_eff_async_ttl_2, __pyx_n_s_of, __pyx_n_s_af, __pyx_n_s_af, __pyx_n_s_f, __pyx_n_s_af, __pyx_n_s_f, __pyx_n_s_cached_f, __pyx_n_s_cached_f, __pyx_n_s_get_ttl_f, __pyx_n_s_get_ttl_f, __pyx_n_s_async_cached_f, __pyx_n_s_async_cached_f, __pyx_n_s_future_cached_f, __pyx_n_s_future_cached_f, __pyx_n_s_lazy_cached_f, __pyx_n_s_lazy_cached_f, __pyx_n_s_peek_cached_f, __pyx_n_s_future_lazy_cached_f, __pyx_n_s_future_lazy_cached_f, __pyx_n_s_future_peek_cached_f, __pyx_n_s_future_peek_cached_f, __pyx_n_s_future_get_ttl_f, __pyx_n_s_future_get_ttl_f, __pyx_n_s_invalidate_f, __pyx_n_s_invalidate_f, __pyx_n_s_future_invalidate_f, __pyx_n_s_future_invalidate_f, __pyx_n_s_expire_f, __pyx_n_s_expire_f, __pyx_n_s_async_expire_f, __pyx_n_s_async_expire_f, __pyx_n_s_future_expire_f, __pyx_n_s_future_expire_f, __pyx_n_s_put_f, __pyx_n_s_put_f, __pyx_n_s_async_put_f, __pyx_n_s_async_put_f, __pyx_n_s_future_put_f, __pyx_n_s_future_put_f, __pyx_n_s_async_lazy_cached_f, __pyx_n_s_async_lazy_cached_f, __pyx_n_s_refresh_f, __pyx_n_s_refresh_f, __pyx_n_s_async_refresh_f, __pyx_n_s_async_refresh_f, __pyx_n_s_future_refresh_f, __pyx_n_s_future_refresh_f, __pyx_n_s_aclient, __pyx_n_s_promote_callbacks_2, __pyx_n_s_value_callbacks_2, __pyx_n_s_get_kwargs, __pyx_n_s_promote_callback_2, __pyx_n_s_promote_callback_2, __pyx_n_s_value_callback, __pyx_n_s_value_callback, __pyx_n_s_on_promote_f, __pyx_n_s_on_promote_f, __pyx_n_s_on_value_f, __pyx_n_s_on_value_f, __pyx_n_s_placeholder_value_fn_cell, __pyx_n_s_placeholder_value_f, __pyx_n_s_placeholder_value_f, __pyx_n_s_fclient, __pyx_n_s_future_f, __pyx_n_s_future_f, __pyx_n_s_async_f, __pyx_n_s_async_f); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 75, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_decor, 428, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 428, __pyx_L1_error)

  /* "chorde/decorators.py":1343
 *         async_writer_kwargs.setdefault('threadpool', async_writer_threadpool)
 * 
 *         def decor(f):             # <<<<<<<<<<<<<<
 *             if ttl_spread:
 *                 spread_type = type(ttl_spread)
 */
  __pyx_tuple__110 = PyTuple_Pack(15, __pyx_n_s_f, __pyx_n_s_spread_type, __pyx_n_s_eff_async_ttl_2, __pyx_n_s_salt2, __pyx_n_s_coherence_namespace_2, __pyx_n_s_namespace_2, __pyx_n_s_nprivate, __pyx_n_s_shareds, __pyx_n_s_sharedt, __pyx_n_s_ntiered, __pyx_n_s_nshared, __pyx_n_s_coherence_manager, __pyx_n_s_nclient, __pyx_n_s_expired_ttl, __pyx_n_s_rv); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(1, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_decor, 1343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1343, __pyx_L1_error)

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xeb39541, 0xdcc4bd9, 0xae59ab5):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xeb39541, 0xdcc4bd9, 0xae59ab5) = (errors, hits, max_miss_time, min_miss_time, miss_time_histogram, miss_time_histogram_bins, miss_time_histogram_max, misses, sum_miss_time, sum_miss_time_sq, sync_errors, sync_misses, wait_time))" % __pyx_checksum)
 */
  __pyx_tuple__112 = PyTuple_Pack(3, __pyx_int_246650177, __pyx_int_231492569, __pyx_int_182819509); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "chorde/decorators.py":42
 *     class multiprocessing:
 *         @staticmethod
 *         def cpu_count():             # <<<<<<<<<<<<<<
 *             return 1
 * 
 */
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_cpu_count, 42, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 42, __pyx_L1_error)

  /* "chorde/decorators.py":45
 *             return 1
 * 
 * def wraps(wrapped):             # <<<<<<<<<<<<<<
 *     w = _wraps(wrapped)
 *     def decor(wrapper):
 */
  __pyx_tuple__114 = PyTuple_Pack(4, __pyx_n_s_wrapped, __pyx_n_s_w, __pyx_n_s_decor, __pyx_n_s_decor); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_lib_chorde_decorators_py, __pyx_n_s_wraps_2, 45, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 45, __pyx_L1_error)

  /* "chorde/decorators.py":55
 *     return decor
 * 
 * def _make_namespace(f, salt = None, salt2 = None):             # <<<<<<<<<<<<<<
 *     f = getattr(f, 'im_func', f)
 *     fname = getattr(f, '__name__', None)
 */
  __pyx_tuple__116 = PyTuple_Pack(9, __pyx_n_s_f, __pyx_n_s_salt, __pyx_n_s_salt2, __pyx_n_s_fname, __pyx_n_s_mname, __pyx_n_s_fcode, __pyx_n_s_fpath, __pyx_n_s_body_digest, __pyx_n_s_e); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 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_lib_chorde_decorators_py, __pyx_n_s_make_namespace, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 55, __pyx_L1_error)
  __pyx_tuple__118 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);

  /* "chorde/decorators.py":86
 *         return repr(f)
 * 
 * def _simple_put_deferred(future, client, f, key, ttl, *p, **kw):             # <<<<<<<<<<<<<<
 *     defer = asyncache.Defer(f, *p, **kw)
 *     if future is not None:
 */
  __pyx_tuple__119 = PyTuple_Pack(8, __pyx_n_s_future, __pyx_n_s_client, __pyx_n_s_f, __pyx_n_s_key, __pyx_n_s_ttl, __pyx_n_s_p, __pyx_n_s_kw, __pyx_n_s_defer); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_simple_put_deferred, 86, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 86, __pyx_L1_error)

  /* "chorde/decorators.py":92
 *     return client.put(key, defer, ttl)
 * 
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):             # <<<<<<<<<<<<<<
 *     return client.put_coherently(key, ttl,
 *         lambda : not shared.contains(key, async_ttl),
 */
  __pyx_tuple__121 = PyTuple_Pack(9, __pyx_n_s_shared, __pyx_n_s_async_ttl, __pyx_n_s_future, __pyx_n_s_client, __pyx_n_s_f, __pyx_n_s_key, __pyx_n_s_ttl, __pyx_n_s_p, __pyx_n_s_kw); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(7, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_coherent_put_deferred, 92, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 92, __pyx_L1_error)

  /* "chorde/decorators.py":100
 * class CacheStats(object):
 *     __slots__ = (
 *         'hits', 'misses', 'errors',             # <<<<<<<<<<<<<<
 *         'sync_misses', 'sync_errors',
 *         'min_miss_time', 'max_miss_time', 'sum_miss_time', 'sum_miss_time_sq',
 */
  __pyx_tuple__123 = PyTuple_Pack(13, __pyx_n_s_hits, __pyx_n_s_misses, __pyx_n_s_errors, __pyx_n_s_sync_misses, __pyx_n_s_sync_errors, __pyx_n_s_min_miss_time, __pyx_n_s_max_miss_time, __pyx_n_s_sum_miss_time, __pyx_n_s_sum_miss_time_sq, __pyx_n_s_miss_time_histogram, __pyx_n_s_miss_time_histogram_bins, __pyx_n_s_miss_time_histogram_max, __pyx_n_s_wait_time); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);

  /* "chorde/decorators.py":110
 *         self.set_histogram_bins(0, None)
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         self.hits = self.misses = self.errors = self.sync_misses = self.sync_errors = 0
 *         self.max_miss_time = self.sum_miss_time = self.sum_miss_time_sq = self.wait_time = 0
 */
  __pyx_tuple__124 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_clear, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 110, __pyx_L1_error)

  /* "chorde/decorators.py":115
 *         self.min_miss_time = -1
 * 
 *     def set_histogram_bins(self, bins, maxtime):             # <<<<<<<<<<<<<<
 *         if bins <= 0:
 *             self.miss_time_histogram_bins = self.miss_time_histogram_max = 0
 */
  __pyx_tuple__126 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_bins, __pyx_n_s_maxtime); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_set_histogram_bins, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 115, __pyx_L1_error)

  /* "chorde/decorators.py":124
 *             self.miss_time_histogram_max = maxtime
 * 
 *     def add_histo(self, time):             # <<<<<<<<<<<<<<
 *         if self.miss_time_histogram:
 *             hmax = self.miss_time_histogram_max
 */
  __pyx_tuple__128 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_time, __pyx_n_s_time); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 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_lib_chorde_decorators_py, __pyx_n_s_add_histo, 124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 124, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__130 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(2, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CacheStats, (type(self), 0xeb39541, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CacheStats__set_state(self, __pyx_state)
 */
  __pyx_tuple__132 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "chorde/decorators.py":133
 * decorated_functions = weakref.WeakSet()
 * 
 * def cached(client, ttl,             # <<<<<<<<<<<<<<
 *         key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *         namespace = None,
 */
  __pyx_tuple__134 = PyTuple_Pack(42, __pyx_n_s_client, __pyx_n_s_ttl, __pyx_n_s_key, __pyx_n_s_namespace, __pyx_n_s_value_serialization_function, __pyx_n_s_value_deserialization_function, __pyx_n_s_async_writer_queue_size, __pyx_n_s_async_writer_workers, __pyx_n_s_async_writer_threadpool, __pyx_n_s_async_writer_kwargs, __pyx_n_s_async_ttl, __pyx_n_s_async_client, __pyx_n_s_async_expire, __pyx_n_s_lazy_kwargs, __pyx_n_s_async_lazy_recheck, __pyx_n_s_async_lazy_recheck_kwargs, __pyx_n_s_async_processor, __pyx_n_s_async_processor_workers, __pyx_n_s_async_processor_threadpool, __pyx_n_s_async_processor_kwargs, __pyx_n_s_renew_time, __pyx_n_s_future_sync_check, __pyx_n_s_initialize, __pyx_n_s_decorate, __pyx_n_s_timings, __pyx_n_s_ttl_spread, __pyx_n_s_autonamespace_version_salt, __pyx_n_s_eff_async_ttl, __pyx_n_s_put_deferred, __pyx_n_s_fput_deferred, __pyx_n_s_lazy_recheck_put_deferred, __pyx_n_s_flazy_recheck_put_deferred, __pyx_n_s_spread_type, __pyx_n_s_eff_ttl, __pyx_n_s_elazy_kwargs, __pyx_n_s_easync_lazy_recheck_kwargs, __pyx_n_s_eget_async_lazy_recheck_kwargs, __pyx_n_s_EMPTY_KWARGS, __pyx_n_s_NONE_4, __pyx_n_s_Future, __pyx_n_s_decor, __pyx_n_s_decor); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(32, 0, 42, 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_lib_chorde_decorators_py, __pyx_n_s_cached, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 133, __pyx_L1_error)

  /* "chorde/decorators.py":1245
 * if not no_coherence:
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,             # <<<<<<<<<<<<<<
 *             key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *             tiered_ = None,
 */
  __pyx_tuple__136 = PyTuple_Pack(36, __pyx_n_s_private, __pyx_n_s_shared, __pyx_n_s_ipsub, __pyx_n_s_ttl, __pyx_n_s_key, __pyx_n_s_tiered, __pyx_n_s_namespace, __pyx_n_s_coherence_namespace, __pyx_n_s_coherence_encoding, __pyx_n_s_coherence_timeout, __pyx_n_s_value_serialization_function, __pyx_n_s_value_deserialization_function, __pyx_n_s_async_writer_queue_size, __pyx_n_s_async_writer_workers, __pyx_n_s_async_writer_threadpool, __pyx_n_s_async_writer_kwargs, __pyx_n_s_async_ttl, __pyx_n_s_async_expire, __pyx_n_s_lazy_kwargs, __pyx_n_s_async_lazy_recheck, __pyx_n_s_async_lazy_recheck_kwargs, __pyx_n_s_async_processor, __pyx_n_s_async_processor_workers, __pyx_n_s_async_processor_threadpool, __pyx_n_s_async_processor_kwargs, __pyx_n_s_renew_time, __pyx_n_s_future_sync_check, __pyx_n_s_initialize, __pyx_n_s_decorate, __pyx_n_s_tiered_opts, __pyx_n_s_ttl_spread, __pyx_n_s_wait_time, __pyx_n_s_autonamespace_version_salt, __pyx_n_s_coherence_kwargs, __pyx_n_s_decor, __pyx_n_s_decor); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(33, 0, 36, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_chorde_decorators_py, __pyx_n_s_coherent_cached, 1245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 1245, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_CacheStats(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__138 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CacheStats, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_setdefault.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float_0_5 = PyFloat_FromDouble(0.5); if (unlikely(!__pyx_float_0_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_25 = PyFloat_FromDouble(0.25); if (unlikely(!__pyx_float_0_25)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __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_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_182819509 = PyInt_FromLong(182819509L); if (unlikely(!__pyx_int_182819509)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_231492569 = PyInt_FromLong(231492569L); if (unlikely(!__pyx_int_231492569)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_246650177 = PyInt_FromLong(246650177L); if (unlikely(!__pyx_int_246650177)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_6chorde_10decorators_CacheStats = &__pyx_vtable_6chorde_10decorators_CacheStats;
  __pyx_vtable_6chorde_10decorators_CacheStats.add_histo = (PyObject *(*)(struct __pyx_obj_6chorde_10decorators_CacheStats *, double, int __pyx_skip_dispatch))__pyx_f_6chorde_10decorators_10CacheStats_add_histo;
  if (PyType_Ready(&__pyx_type_6chorde_10decorators_CacheStats) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6chorde_10decorators_CacheStats.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6chorde_10decorators_CacheStats.tp_dictoffset && __pyx_type_6chorde_10decorators_CacheStats.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6chorde_10decorators_CacheStats.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_6chorde_10decorators_CacheStats.tp_dict, __pyx_vtabptr_6chorde_10decorators_CacheStats) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CacheStats, (PyObject *)&__pyx_type_6chorde_10decorators_CacheStats) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6chorde_10decorators_CacheStats) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  __pyx_ptype_6chorde_10decorators_CacheStats = &__pyx_type_6chorde_10decorators_CacheStats;
  if (PyType_Ready(&__pyx_type_6chorde_10decorators___pyx_scope_struct__wraps) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6chorde_10decorators___pyx_scope_struct__wraps.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6chorde_10decorators___pyx_scope_struct__wraps.tp_dictoffset && __pyx_type_6chorde_10decorators___pyx_scope_struct__wraps.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6chorde_10decorators___pyx_scope_struct__wraps.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6chorde_10decorators___pyx_scope_struct__wraps = &__pyx_type_6chorde_10decorators___pyx_scope_struct__wraps;
  if (PyType_Ready(&__pyx_type_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred.tp_dictoffset && __pyx_type_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred = &__pyx_type_6chorde_10decorators___pyx_scope_struct_1__coherent_put_deferred;
  if (PyType_Ready(&__pyx_type_6chorde_10decorators___pyx_scope_struct_2_cached) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6chorde_10decorators___pyx_scope_struct_2_cached.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6chorde_10decorators___pyx_scope_struct_2_cached.tp_dictoffset && __pyx_type_6chorde_10decorators___pyx_scope_struct_2_cached.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6chorde_10decorators___pyx_scope_struct_2_cached.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6chorde_10decorators___pyx_scope_struct_2_cached = &__pyx_type_6chorde_10decorators___pyx_scope_struct_2_cached;
  if (PyType_Ready(&__pyx_type_6chorde_10decorators___pyx_scope_struct_3_decor) < 0) __PYX_ERR(0, 428, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6chorde_10decorators___pyx_scope_struct_3_decor.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6chorde_10decorators___pyx_scope_struct_3_decor.tp_dictoffset && __pyx_type_6chorde_10decorators___pyx_scope_struct_3_decor.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6chorde_10decorators___pyx_scope_struct_3_decor.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6chorde_10decorators___pyx_scope_struct_3_decor = &__pyx_type_6chorde_10decorators___pyx_scope_struct_3_decor;
  if (PyType_Ready(&__pyx_type_6chorde_10decorators___pyx_scope_struct_4_future_cached_f) < 0) __PYX_ERR(0, 627, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6chorde_10decorators___pyx_scope_struct_4_future_cached_f.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6chorde_10decorators___pyx_scope_struct_4_future_cached_f.tp_dictoffset && __pyx_type_6chorde_10decorators___pyx_scope_struct_4_future_cached_f.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6chorde_10decorators___pyx_scope_struct_4_future_cached_f.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6chorde_10decorators___pyx_scope_struct_4_future_cached_f = &__pyx_type_6chorde_10decorators___pyx_scope_struct_4_future_cached_f;
  if (PyType_Ready(&__pyx_type_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f.tp_dictoffset && __pyx_type_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f = &__pyx_type_6chorde_10decorators___pyx_scope_struct_5_future_lazy_cached_f;
  if (PyType_Ready(&__pyx_type_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f) < 0) __PYX_ERR(0, 806, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f.tp_dictoffset && __pyx_type_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f = &__pyx_type_6chorde_10decorators___pyx_scope_struct_6_future_peek_cached_f;
  if (PyType_Ready(&__pyx_type_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f) < 0) __PYX_ERR(0, 992, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f.tp_dictoffset && __pyx_type_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f = &__pyx_type_6chorde_10decorators___pyx_scope_struct_7_async_lazy_cached_f;
  if (PyType_Ready(&__pyx_type_6chorde_10decorators___pyx_scope_struct_8_coherent_cached) < 0) __PYX_ERR(0, 1245, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_6chorde_10decorators___pyx_scope_struct_8_coherent_cached.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6chorde_10decorators___pyx_scope_struct_8_coherent_cached.tp_dictoffset && __pyx_type_6chorde_10decorators___pyx_scope_struct_8_coherent_cached.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6chorde_10decorators___pyx_scope_struct_8_coherent_cached.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_6chorde_10decorators___pyx_scope_struct_8_coherent_cached = &__pyx_type_6chorde_10decorators___pyx_scope_struct_8_coherent_cached;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initdecorators(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initdecorators(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_decorators(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_decorators(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_decorators(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'decorators' 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_decorators(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("decorators", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_chorde__decorators) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "chorde.decorators")) {
      if (unlikely(PyDict_SetItemString(modules, "chorde.decorators", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "chorde/decorators.py":2
 * # -*- coding: utf-8 -*-
 * from functools import wraps as _wraps             # <<<<<<<<<<<<<<
 * from functools import partial
 * import weakref
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_wraps_2);
  __Pyx_GIVEREF(__pyx_n_s_wraps_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_wraps_2);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_wraps_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_wraps, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":3
 * # -*- coding: utf-8 -*-
 * from functools import wraps as _wraps
 * from functools import partial             # <<<<<<<<<<<<<<
 * import weakref
 * from hashlib import md5
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_partial);
  __Pyx_GIVEREF(__pyx_n_s_partial);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_partial);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_partial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_partial, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":4
 * from functools import wraps as _wraps
 * from functools import partial
 * import weakref             # <<<<<<<<<<<<<<
 * from hashlib import md5
 * from base64 import b64encode
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_weakref, 0, -1); 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_weakref, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":5
 * from functools import partial
 * import weakref
 * from hashlib import md5             # <<<<<<<<<<<<<<
 * from base64 import b64encode
 * import time
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_md5);
  __Pyx_GIVEREF(__pyx_n_s_md5);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_md5);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_hashlib, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_md5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_md5, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":6
 * import weakref
 * from hashlib import md5
 * from base64 import b64encode             # <<<<<<<<<<<<<<
 * import time
 * import logging
 */
  __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_b64encode);
  __Pyx_GIVEREF(__pyx_n_s_b64encode);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_b64encode);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_base64, __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_b64encode); 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_b64encode, __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;

  /* "chorde/decorators.py":7
 * from hashlib import md5
 * from base64 import b64encode
 * import time             # <<<<<<<<<<<<<<
 * import logging
 * import random
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, -1); 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_time, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":8
 * from base64 import b64encode
 * import time
 * import logging             # <<<<<<<<<<<<<<
 * import random
 * import pydoc
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":9
 * import time
 * import logging
 * import random             # <<<<<<<<<<<<<<
 * import pydoc
 * from .clients import base, asyncache, tiered
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_random, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_random, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":10
 * import logging
 * import random
 * import pydoc             # <<<<<<<<<<<<<<
 * from .clients import base, asyncache, tiered
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydoc, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydoc, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":11
 * import random
 * import pydoc
 * from .clients import base, asyncache, tiered             # <<<<<<<<<<<<<<
 * 
 * try:
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_base);
  __Pyx_GIVEREF(__pyx_n_s_base);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_base);
  __Pyx_INCREF(__pyx_n_s_asyncache);
  __Pyx_GIVEREF(__pyx_n_s_asyncache);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_asyncache);
  __Pyx_INCREF(__pyx_n_s_tiered_2);
  __Pyx_GIVEREF(__pyx_n_s_tiered_2);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_tiered_2);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_clients, __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_base); 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_base, __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_asyncache); 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_asyncache, __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_tiered_2); 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_tiered_2, __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;

  /* "chorde/decorators.py":13
 * from .clients import base, asyncache, tiered
 * 
 * try:             # <<<<<<<<<<<<<<
 *     from .mq import coherence
 *     from .clients import coherent
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "chorde/decorators.py":14
 * 
 * try:
 *     from .mq import coherence             # <<<<<<<<<<<<<<
 *     from .clients import coherent
 *     no_coherence = False
 */
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_n_s_coherence);
      __Pyx_GIVEREF(__pyx_n_s_coherence);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_coherence);
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_mq, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_coherence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_coherence, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "chorde/decorators.py":15
 * try:
 *     from .mq import coherence
 *     from .clients import coherent             # <<<<<<<<<<<<<<
 *     no_coherence = False
 * except ImportError:
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_n_s_coherent);
      __Pyx_GIVEREF(__pyx_n_s_coherent);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_coherent);
      __pyx_t_2 = __Pyx_Import(__pyx_n_s_clients, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_coherent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_coherent, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "chorde/decorators.py":16
 *     from .mq import coherence
 *     from .clients import coherent
 *     no_coherence = False             # <<<<<<<<<<<<<<
 * except ImportError:
 *     no_coherence = True
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_no_coherence, Py_False) < 0) __PYX_ERR(0, 16, __pyx_L2_error)

      /* "chorde/decorators.py":13
 * from .clients import base, asyncache, tiered
 * 
 * try:             # <<<<<<<<<<<<<<
 *     from .mq import coherence
 *     from .clients import coherent
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L7_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "chorde/decorators.py":17
 *     from .clients import coherent
 *     no_coherence = False
 * except ImportError:             # <<<<<<<<<<<<<<
 *     no_coherence = True
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("chorde.decorators", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 17, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);

      /* "chorde/decorators.py":18
 *     no_coherence = False
 * except ImportError:
 *     no_coherence = True             # <<<<<<<<<<<<<<
 * 
 * from .clients.base import CacheMissError
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_no_coherence, Py_True) < 0) __PYX_ERR(0, 18, __pyx_L4_except_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L3_exception_handled;
    }
    goto __pyx_L4_except_error;
    __pyx_L4_except_error:;

    /* "chorde/decorators.py":13
 * from .clients import base, asyncache, tiered
 * 
 * try:             # <<<<<<<<<<<<<<
 *     from .mq import coherence
 *     from .clients import coherent
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L7_try_end:;
  }

  /* "chorde/decorators.py":20
 *     no_coherence = True
 * 
 * from .clients.base import CacheMissError             # <<<<<<<<<<<<<<
 * 
 * try:
 */
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_CacheMissError);
  __Pyx_GIVEREF(__pyx_n_s_CacheMissError);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_CacheMissError);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_clients_base, __pyx_t_7, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CacheMissError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CacheMissError, __pyx_t_7) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":22
 * from .clients.base import CacheMissError
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import cython
 * except ImportError:
 */
  {
    (void)__pyx_t_5; (void)__pyx_t_4; (void)__pyx_t_3; /* mark used */
    /*try:*/ {

      /* "chorde/decorators.py":23
 * 
 * try:
 *     import cython             # <<<<<<<<<<<<<<
 * except ImportError:
 *     # Make cython annotations work without cython
 */
    }
  }

  /* "chorde/decorators.py":31
 *     globals()['cython'] = _cython
 * 
 * class NO_NAMESPACE:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_NO_NAMESPACE, __pyx_n_s_NO_NAMESPACE, (PyObject *) NULL, __pyx_n_s_chorde_decorators, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_NO_NAMESPACE, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_NAMESPACE, __pyx_t_7) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":34
 *     pass
 * 
 * class _NONE:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_NONE_3, __pyx_n_s_NONE_3, (PyObject *) NULL, __pyx_n_s_chorde_decorators, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_NONE_3, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NONE_3, __pyx_t_7) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "chorde/decorators.py":37
 *     pass
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import multiprocessing
 * except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "chorde/decorators.py":38
 * 
 * try:
 *     import multiprocessing             # <<<<<<<<<<<<<<
 * except ImportError:
 *     class multiprocessing:
 */
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_multiprocessing, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_multiprocessing, __pyx_t_1) < 0) __PYX_ERR(0, 38, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "chorde/decorators.py":37
 *     pass
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import multiprocessing
 * except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "chorde/decorators.py":39
 * try:
 *     import multiprocessing
 * except ImportError:             # <<<<<<<<<<<<<<
 *     class multiprocessing:
 *         @staticmethod
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("chorde.decorators", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L18_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "chorde/decorators.py":40
 *     import multiprocessing
 * except ImportError:
 *     class multiprocessing:             # <<<<<<<<<<<<<<
 *         @staticmethod
 *         def cpu_count():
 */
      __pyx_t_8 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_multiprocessing, __pyx_n_s_multiprocessing, (PyObject *) NULL, __pyx_n_s_chorde_decorators, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 40, __pyx_L18_except_error)
      __Pyx_GOTREF(__pyx_t_8);

      /* "chorde/decorators.py":42
 *     class multiprocessing:
 *         @staticmethod
 *         def cpu_count():             # <<<<<<<<<<<<<<
 *             return 1
 * 
 */
      __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_15multiprocessing_1cpu_count, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_multiprocessing_cpu_count, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 42, __pyx_L18_except_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "chorde/decorators.py":41
 * except ImportError:
 *     class multiprocessing:
 *         @staticmethod             # <<<<<<<<<<<<<<
 *         def cpu_count():
 *             return 1
 */
      __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 41, __pyx_L18_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_cpu_count, __pyx_t_10) < 0) __PYX_ERR(0, 42, __pyx_L18_except_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "chorde/decorators.py":40
 *     import multiprocessing
 * except ImportError:
 *     class multiprocessing:             # <<<<<<<<<<<<<<
 *         @staticmethod
 *         def cpu_count():
 */
      __pyx_t_10 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_multiprocessing, __pyx_empty_tuple, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 40, __pyx_L18_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_multiprocessing, __pyx_t_10) < 0) __PYX_ERR(0, 40, __pyx_L18_except_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;
    __pyx_L18_except_error:;

    /* "chorde/decorators.py":37
 *     pass
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import multiprocessing
 * except ImportError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L17_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L21_try_end:;
  }

  /* "chorde/decorators.py":45
 *             return 1
 * 
 * def wraps(wrapped):             # <<<<<<<<<<<<<<
 *     w = _wraps(wrapped)
 *     def decor(wrapper):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_1wraps, 0, __pyx_n_s_wraps_2, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_wraps_2, __pyx_t_2) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":55
 *     return decor
 * 
 * def _make_namespace(f, salt = None, salt2 = None):             # <<<<<<<<<<<<<<
 *     f = getattr(f, 'im_func', f)
 *     fname = getattr(f, '__name__', None)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_3_make_namespace, 0, __pyx_n_s_make_namespace, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__118);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_namespace, __pyx_t_2) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":86
 *         return repr(f)
 * 
 * def _simple_put_deferred(future, client, f, key, ttl, *p, **kw):             # <<<<<<<<<<<<<<
 *     defer = asyncache.Defer(f, *p, **kw)
 *     if future is not None:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_5_simple_put_deferred, 0, __pyx_n_s_simple_put_deferred, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_simple_put_deferred, __pyx_t_2) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":92
 *     return client.put(key, defer, ttl)
 * 
 * def _coherent_put_deferred(shared, async_ttl, future, client, f, key, ttl, *p, **kw):             # <<<<<<<<<<<<<<
 *     return client.put_coherently(key, ttl,
 *         lambda : not shared.contains(key, async_ttl),
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_7_coherent_put_deferred, 0, __pyx_n_s_coherent_put_deferred, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_coherent_put_deferred, __pyx_t_2) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":100
 * class CacheStats(object):
 *     __slots__ = (
 *         'hits', 'misses', 'errors',             # <<<<<<<<<<<<<<
 *         'sync_misses', 'sync_errors',
 *         'min_miss_time', 'max_miss_time', 'sum_miss_time', 'sum_miss_time_sq',
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6chorde_10decorators_CacheStats->tp_dict, __pyx_n_s_slots, __pyx_tuple__123) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_6chorde_10decorators_CacheStats);

  /* "chorde/decorators.py":110
 *         self.set_histogram_bins(0, None)
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         self.hits = self.misses = self.errors = self.sync_misses = self.sync_errors = 0
 *         self.max_miss_time = self.sum_miss_time = self.sum_miss_time_sq = self.wait_time = 0
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_10CacheStats_3clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CacheStats_clear, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6chorde_10decorators_CacheStats->tp_dict, __pyx_n_s_clear, __pyx_t_2) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6chorde_10decorators_CacheStats);

  /* "chorde/decorators.py":115
 *         self.min_miss_time = -1
 * 
 *     def set_histogram_bins(self, bins, maxtime):             # <<<<<<<<<<<<<<
 *         if bins <= 0:
 *             self.miss_time_histogram_bins = self.miss_time_histogram_max = 0
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_10CacheStats_5set_histogram_bins, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CacheStats_set_histogram_bins, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6chorde_10decorators_CacheStats->tp_dict, __pyx_n_s_set_histogram_bins, __pyx_t_2) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6chorde_10decorators_CacheStats);

  /* "chorde/decorators.py":124
 *             self.miss_time_histogram_max = maxtime
 * 
 *     def add_histo(self, time):             # <<<<<<<<<<<<<<
 *         if self.miss_time_histogram:
 *             hmax = self.miss_time_histogram_max
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_10CacheStats_7add_histo, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CacheStats_add_histo, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6chorde_10decorators_CacheStats->tp_dict, __pyx_n_s_add_histo, __pyx_t_2) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6chorde_10decorators_CacheStats);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_10CacheStats_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CacheStats___reduce_cython, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6chorde_10decorators_CacheStats->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6chorde_10decorators_CacheStats);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CacheStats, (type(self), 0xeb39541, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CacheStats__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_10CacheStats_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CacheStats___setstate_cython, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_6chorde_10decorators_CacheStats->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(2, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6chorde_10decorators_CacheStats);

  /* "chorde/decorators.py":131
 *             self.miss_time_histogram[hbin] += 1
 * 
 * decorated_functions = weakref.WeakSet()             # <<<<<<<<<<<<<<
 * 
 * def cached(client, ttl,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_weakref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WeakSet); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_decorated_functions, __pyx_t_2) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":133
 * decorated_functions = weakref.WeakSet()
 * 
 * def cached(client, ttl,             # <<<<<<<<<<<<<<
 *         key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *         namespace = None,
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_9cached, 0, __pyx_n_s_cached, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_2, sizeof(__pyx_defaults), 3)) __PYX_ERR(0, 133, __pyx_L1_error)

  /* "chorde/decorators.py":134
 * 
 * def cached(client, ttl,
 *         key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),             # <<<<<<<<<<<<<<
 *         namespace = None,
 *         value_serialization_function = None,
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_15lambda3, 0, __pyx_n_s_cached_locals_lambda, NULL, __pyx_n_s_chorde_decorators, __pyx_d, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_2)->__pyx_arg_key = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "chorde/decorators.py":145
 *         async_client = None,
 *         async_expire = None,
 *         lazy_kwargs = {},             # <<<<<<<<<<<<<<
 *         async_lazy_recheck = False,
 *         async_lazy_recheck_kwargs = {},
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_2)->__pyx_arg_lazy_kwargs = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "chorde/decorators.py":147
 *         lazy_kwargs = {},
 *         async_lazy_recheck = False,
 *         async_lazy_recheck_kwargs = {},             # <<<<<<<<<<<<<<
 *         async_processor = None,
 *         async_processor_workers = None,
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_2)->__pyx_arg_async_lazy_recheck_kwargs = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_2, __pyx_pf_6chorde_10decorators_17__defaults__);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cached, __pyx_t_2) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":1243
 *     return decor
 * 
 * if not no_coherence:             # <<<<<<<<<<<<<<
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_coherence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_12 = ((!__pyx_t_11) != 0);
  if (__pyx_t_12) {

    /* "chorde/decorators.py":1245
 * if not no_coherence:
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,             # <<<<<<<<<<<<<<
 *             key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),
 *             tiered_ = None,
 */
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_11coherent_cached, 0, __pyx_n_s_coherent_cached, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!__Pyx_CyFunction_InitDefaults(__pyx_t_2, sizeof(__pyx_defaults1), 3)) __PYX_ERR(0, 1245, __pyx_L1_error)

    /* "chorde/decorators.py":1246
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,
 *             key = lambda *p, **kw:(p,frozenset(kw.items()) or ()),             # <<<<<<<<<<<<<<
 *             tiered_ = None,
 *             namespace = None,
 */
    __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_16lambda7, 0, __pyx_n_s_coherent_cached_locals_lambda, NULL, __pyx_n_s_chorde_decorators, __pyx_d, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_2)->__pyx_arg_key = __pyx_t_7;
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;

    /* "chorde/decorators.py":1260
 *             async_ttl = None,
 *             async_expire = None,
 *             lazy_kwargs = {},             # <<<<<<<<<<<<<<
 *             async_lazy_recheck = False,
 *             async_lazy_recheck_kwargs = {},
 */
    __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_2)->__pyx_arg_lazy_kwargs = __pyx_t_7;
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;

    /* "chorde/decorators.py":1262
 *             lazy_kwargs = {},
 *             async_lazy_recheck = False,
 *             async_lazy_recheck_kwargs = {},             # <<<<<<<<<<<<<<
 *             async_processor = None,
 *             async_processor_workers = None,
 */
    __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_2)->__pyx_arg_async_lazy_recheck_kwargs = __pyx_t_7;
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_2, __pyx_pf_6chorde_10decorators_19__defaults__);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_coherent_cached, __pyx_t_2) < 0) __PYX_ERR(0, 1245, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "chorde/decorators.py":1243
 *     return decor
 * 
 * if not no_coherence:             # <<<<<<<<<<<<<<
 * 
 *     def coherent_cached(private, shared, ipsub, ttl,
 */
  }

  /* "(tree fragment)":1
 * def __pyx_unpickle_CacheStats(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6chorde_10decorators_14__pyx_unpickle_CacheStats, 0, __pyx_n_s_pyx_unpickle_CacheStats, NULL, __pyx_n_s_chorde_decorators, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CacheStats, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "chorde/decorators.py":1
 * # -*- coding: utf-8 -*-             # <<<<<<<<<<<<<<
 * from functools import wraps as _wraps
 * from functools import partial
 */
  __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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init chorde.decorators", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init chorde.decorators");
  }
  __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;
}

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

/* pyfrozenset_new */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
    if (it) {
        PyObject* result;
#if CYTHON_COMPILING_IN_PYPY
        PyObject* args;
        args = PyTuple_Pack(1, it);
        if (unlikely(!args))
            return NULL;
        result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
        Py_DECREF(args);
        return result;
#else
        if (PyFrozenSet_CheckExact(it)) {
            Py_INCREF(it);
            return it;
        }
        result = PyFrozenSet_New(it);
        if (unlikely(!result))
            return NULL;
        if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result)))
            return result;
        Py_DECREF(result);
#endif
    }
#if CYTHON_USE_TYPE_SLOTS
    return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#else
    return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#endif
}

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod0 */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* py_dict_items */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
    else
        return PyDict_Items(d);
}

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

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* StringJoin */
#if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
}
#endif

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

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

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
#if PY_MAJOR_VERSION < 3
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
#endif
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

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

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

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    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

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

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

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

/* 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_setdefault */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value,
                                                       CYTHON_UNUSED int is_safe_type) {
    PyObject* value;
#if PY_VERSION_HEX >= 0x030400A0
    if ((1)) {
        value = PyDict_SetDefault(d, key, default_value);
        if (unlikely(!value)) return NULL;
        Py_INCREF(value);
#else
    if (is_safe_type == 1 || (is_safe_type == -1 &&
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
            (PyUnicode_CheckExact(key) || PyString_CheckExact(key) || PyLong_CheckExact(key)))) {
        value = PyDict_GetItemWithError(d, key);
        if (unlikely(!value)) {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            if (unlikely(PyDict_SetItem(d, key, default_value) == -1))
                return NULL;
            value = default_value;
        }
        Py_INCREF(value);
#else
            (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key) || PyLong_CheckExact(key)))) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            if (unlikely(PyDict_SetItem(d, key, default_value) == -1))
                return NULL;
            value = default_value;
        }
        Py_INCREF(value);
#endif
#endif
    } else {
        value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_setdefault, d, key, default_value);
    }
    return value;
}

/* SliceObject */
    static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_ass_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_ass_slice(obj, cstart, cstop, value);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_ass_subscript))
#endif
    {
        int result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_ass_subscript(obj, py_slice, value);
#else
        result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object does not support slice %.10s",
        Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
bad:
    return -1;
}

/* None */
    static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* PyFloatBinop */
    #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_SubtractObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    (void)inplace;
    (void)zerodivision_check;
    if (likely(PyFloat_CheckExact(op1))) {
        a = PyFloat_AS_DOUBLE(op1);
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        switch (size) {
            case  0: a = 0.0; break;
            case -1: a = -(double) digits[0]; break;
            case  1: a = (double) digits[0]; break;
            case -2:
            case 2:
                if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                    a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -2)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -3:
            case 3:
                if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -3)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -4:
            case 4:
                if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -4)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            default:
        #else
        {
        #endif
            a = PyLong_AsDouble(op1);
            if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
            
        }
    } else {
        return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
    }
        
        PyFPE_START_PROTECT("subtract", return NULL)
        result = a - b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* py_abs */
      #if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
    if (likely(Py_SIZE(n) == -1)) {
        return PyLong_FromLong(((PyLongObject*)n)->ob_digit[0]);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    {
        PyObject *copy = _PyLong_Copy((PyLongObject*)n);
        if (likely(copy)) {
            __Pyx_SET_SIZE(copy, -Py_SIZE(copy));
        }
        return copy;
    }
#else
    return PyNumber_Negative(n);
#endif
}
#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 ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
      static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* HasAttr */
      static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* PyObject_GenericGetAttrNoDict */
      #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
      #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetVTable */
      static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* PyObjectGetAttrStrNoError */
      static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
      static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* CalculateMetaclass */
      static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
      static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CLineInTraceback */
      #ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
      static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
      #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
      #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
      static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(PY_LONG_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(PY_LONG_LONG),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
      static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PY_LONG_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 (PY_LONG_LONG) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, digits[0])
                case 2:
                    if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) >= 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_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 (PY_LONG_LONG) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_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 (PY_LONG_LONG) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_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
            PY_LONG_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 (PY_LONG_LONG) -1;
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PY_LONG_LONG) -1;
        val = __Pyx_PyInt_As_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
}

/* CIntToPy */
      static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
      static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
      static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CheckBinaryVersion */
      static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
      static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
