/* Generated by Cython 0.29.30 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [],
        "name": "cytoolz.itertoolz",
        "sources": [
            "cytoolz/itertoolz.pyx"
        ]
    },
    "module_name": "cytoolz.itertoolz"
}
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_30"
#define CYTHON_HEX_VERSION 0x001D1EF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #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
  #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
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #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__cytoolz__itertoolz
#define __PYX_HAVE_API__cytoolz__itertoolz
/* Early includes */
#include <string.h>
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
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[] = {
  "cytoolz/itertoolz.pyx",
  "stringsource",
  "type.pxd",
};

/*--- Type declarations ---*/
struct __pyx_obj_7cytoolz_9itertoolz_remove;
struct __pyx_obj_7cytoolz_9itertoolz_accumulate;
struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted;
struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key;
struct __pyx_obj_7cytoolz_9itertoolz_interleave;
struct __pyx_obj_7cytoolz_9itertoolz__unique_key;
struct __pyx_obj_7cytoolz_9itertoolz__unique_identity;
struct __pyx_obj_7cytoolz_9itertoolz_interpose;
struct __pyx_obj_7cytoolz_9itertoolz_iterate;
struct __pyx_obj_7cytoolz_9itertoolz_sliding_window;
struct __pyx_obj_7cytoolz_9itertoolz_partition_all;
struct __pyx_obj_7cytoolz_9itertoolz__pluck_index;
struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default;
struct __pyx_obj_7cytoolz_9itertoolz__pluck_list;
struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default;
struct __pyx_obj_7cytoolz_9itertoolz__getter_index;
struct __pyx_obj_7cytoolz_9itertoolz__getter_list;
struct __pyx_obj_7cytoolz_9itertoolz__getter_null;
struct __pyx_obj_7cytoolz_9itertoolz__join;
struct __pyx_obj_7cytoolz_9itertoolz__inner_join;
struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join;
struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join;
struct __pyx_obj_7cytoolz_9itertoolz__outer_join;
struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key;
struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index;
struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices;
struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key;
struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index;
struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices;
struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key;
struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index;
struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices;
struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key;
struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index;
struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices;
struct __pyx_obj_7cytoolz_9itertoolz__diff_key;
struct __pyx_obj_7cytoolz_9itertoolz__diff_identity;
struct __pyx_obj_7cytoolz_9itertoolz_random_sample;
struct __pyx_opt_args_7cytoolz_9itertoolz_c_merge_sorted;
struct __pyx_opt_args_7cytoolz_9itertoolz_unique;
struct __pyx_opt_args_7cytoolz_9itertoolz_get;
struct __pyx_opt_args_7cytoolz_9itertoolz_reduceby;
struct __pyx_opt_args_7cytoolz_9itertoolz_partition;
struct __pyx_opt_args_7cytoolz_9itertoolz_pluck;
struct __pyx_opt_args_7cytoolz_9itertoolz_join;
struct __pyx_opt_args_7cytoolz_9itertoolz_c_diff;
struct __pyx_opt_args_7cytoolz_9itertoolz_topk;

/* "cytoolz/itertoolz.pxd":34
 * 
 * 
 * cdef object c_merge_sorted(object seqs, object key=*)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_7cytoolz_9itertoolz_c_merge_sorted {
  int __pyx_n;
  PyObject *key;
};

/* "cytoolz/itertoolz.pxd":55
 * 
 * 
 * cpdef object unique(object seq, object key=*)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_7cytoolz_9itertoolz_unique {
  int __pyx_n;
  PyObject *key;
};

/* "cytoolz/itertoolz.pxd":91
 * 
 * 
 * cpdef object get(object ind, object seq, object default=*)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_7cytoolz_9itertoolz_get {
  int __pyx_n;
  PyObject *__pyx_default;
};

/* "cytoolz/itertoolz.pxd":113
 * 
 * 
 * cpdef dict reduceby(object key, object binop, object seq, object init=*)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_7cytoolz_9itertoolz_reduceby {
  int __pyx_n;
  PyObject *init;
};

/* "cytoolz/itertoolz.pxd":128
 * 
 * 
 * cpdef object partition(Py_ssize_t n, object seq, object pad=*)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_7cytoolz_9itertoolz_partition {
  int __pyx_n;
  PyObject *pad;
};

/* "cytoolz/itertoolz.pxd":163
 * 
 * 
 * cpdef object pluck(object ind, object seqs, object default=*)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_7cytoolz_9itertoolz_pluck {
  int __pyx_n;
  PyObject *__pyx_default;
};

/* "cytoolz/itertoolz.pxd":182
 * 
 * 
 * cpdef object join(object leftkey, object leftseq,             # <<<<<<<<<<<<<<
 *                   object rightkey, object rightseq,
 *                   object left_default=*,
 */
struct __pyx_opt_args_7cytoolz_9itertoolz_join {
  int __pyx_n;
  PyObject *left_default;
  PyObject *right_default;
};

/* "cytoolz/itertoolz.pxd":266
 * 
 * 
 * cdef object c_diff(object seqs, object default=*, object key=*)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_7cytoolz_9itertoolz_c_diff {
  int __pyx_n;
  PyObject *__pyx_default;
  PyObject *key;
};

/* "cytoolz/itertoolz.pxd":269
 * 
 * 
 * cpdef object topk(Py_ssize_t k, object seq, object key=*)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_7cytoolz_9itertoolz_topk {
  int __pyx_n;
  PyObject *key;
};

/* "cytoolz/itertoolz.pxd":1
 * cdef class remove:             # <<<<<<<<<<<<<<
 *     cdef object predicate
 *     cdef object iter_seq
 */
struct __pyx_obj_7cytoolz_9itertoolz_remove {
  PyObject_HEAD
  PyObject *predicate;
  PyObject *iter_seq;
};


/* "cytoolz/itertoolz.pxd":6
 * 
 * 
 * cdef class accumulate:             # <<<<<<<<<<<<<<
 *     cdef object binop
 *     cdef object iter_seq
 */
struct __pyx_obj_7cytoolz_9itertoolz_accumulate {
  PyObject_HEAD
  PyObject *binop;
  PyObject *iter_seq;
  PyObject *result;
  PyObject *initial;
};


/* "cytoolz/itertoolz.pxd":16
 * 
 * 
 * cdef class _merge_sorted:             # <<<<<<<<<<<<<<
 *     cdef object seq1
 *     cdef object seq2
 */
struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted {
  PyObject_HEAD
  PyObject *seq1;
  PyObject *seq2;
  PyObject *val1;
  PyObject *val2;
  Py_ssize_t loop;
};


/* "cytoolz/itertoolz.pxd":23
 *     cdef Py_ssize_t loop
 * 
 * cdef class _merge_sorted_key:             # <<<<<<<<<<<<<<
 *     cdef object seq1
 *     cdef object seq2
 */
struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key {
  PyObject_HEAD
  PyObject *seq1;
  PyObject *seq2;
  PyObject *val1;
  PyObject *val2;
  PyObject *key;
  PyObject *key1;
  PyObject *key2;
  Py_ssize_t loop;
};


/* "cytoolz/itertoolz.pxd":37
 * 
 * 
 * cdef class interleave:             # <<<<<<<<<<<<<<
 *     cdef list iters
 *     cdef list newiters
 */
struct __pyx_obj_7cytoolz_9itertoolz_interleave {
  PyObject_HEAD
  PyObject *iters;
  PyObject *newiters;
  Py_ssize_t i;
  Py_ssize_t n;
};


/* "cytoolz/itertoolz.pxd":44
 * 
 * 
 * cdef class _unique_key:             # <<<<<<<<<<<<<<
 *     cdef object key
 *     cdef object iter_seq
 */
struct __pyx_obj_7cytoolz_9itertoolz__unique_key {
  PyObject_HEAD
  PyObject *key;
  PyObject *iter_seq;
  PyObject *seen;
};


/* "cytoolz/itertoolz.pxd":50
 * 
 * 
 * cdef class _unique_identity:             # <<<<<<<<<<<<<<
 *     cdef object iter_seq
 *     cdef object seen
 */
struct __pyx_obj_7cytoolz_9itertoolz__unique_identity {
  PyObject_HEAD
  PyObject *iter_seq;
  PyObject *seen;
};


/* "cytoolz/itertoolz.pxd":103
 * 
 * 
 * cdef class interpose:             # <<<<<<<<<<<<<<
 *     cdef object el
 *     cdef object iter_seq
 */
struct __pyx_obj_7cytoolz_9itertoolz_interpose {
  PyObject_HEAD
  PyObject *el;
  PyObject *iter_seq;
  PyObject *val;
  int do_el;
};


/* "cytoolz/itertoolz.pxd":116
 * 
 * 
 * cdef class iterate:             # <<<<<<<<<<<<<<
 *     cdef object func
 *     cdef object x
 */
struct __pyx_obj_7cytoolz_9itertoolz_iterate {
  PyObject_HEAD
  PyObject *func;
  PyObject *x;
  PyObject *val;
};


/* "cytoolz/itertoolz.pxd":122
 * 
 * 
 * cdef class sliding_window:             # <<<<<<<<<<<<<<
 *     cdef object iterseq
 *     cdef tuple prev
 */
struct __pyx_obj_7cytoolz_9itertoolz_sliding_window {
  PyObject_HEAD
  PyObject *iterseq;
  PyObject *prev;
  Py_ssize_t n;
};


/* "cytoolz/itertoolz.pxd":131
 * 
 * 
 * cdef class partition_all:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t n
 *     cdef object iterseq
 */
struct __pyx_obj_7cytoolz_9itertoolz_partition_all {
  PyObject_HEAD
  Py_ssize_t n;
  PyObject *iterseq;
};


/* "cytoolz/itertoolz.pxd":139
 * 
 * 
 * cdef class _pluck_index:             # <<<<<<<<<<<<<<
 *     cdef object ind
 *     cdef object iterseqs
 */
struct __pyx_obj_7cytoolz_9itertoolz__pluck_index {
  PyObject_HEAD
  PyObject *ind;
  PyObject *iterseqs;
};


/* "cytoolz/itertoolz.pxd":144
 * 
 * 
 * cdef class _pluck_index_default:             # <<<<<<<<<<<<<<
 *     cdef object ind
 *     cdef object iterseqs
 */
struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default {
  PyObject_HEAD
  PyObject *ind;
  PyObject *iterseqs;
  PyObject *__pyx_default;
};


/* "cytoolz/itertoolz.pxd":150
 * 
 * 
 * cdef class _pluck_list:             # <<<<<<<<<<<<<<
 *     cdef list ind
 *     cdef object iterseqs
 */
struct __pyx_obj_7cytoolz_9itertoolz__pluck_list {
  PyObject_HEAD
  PyObject *ind;
  PyObject *iterseqs;
  Py_ssize_t n;
};


/* "cytoolz/itertoolz.pxd":156
 * 
 * 
 * cdef class _pluck_list_default:             # <<<<<<<<<<<<<<
 *     cdef list ind
 *     cdef object iterseqs
 */
struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default {
  PyObject_HEAD
  PyObject *ind;
  PyObject *iterseqs;
  PyObject *__pyx_default;
  Py_ssize_t n;
};


/* "cytoolz/itertoolz.pxd":166
 * 
 * 
 * cdef class _getter_index:             # <<<<<<<<<<<<<<
 *     cdef object ind
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__getter_index {
  PyObject_HEAD
  PyObject *ind;
};


/* "cytoolz/itertoolz.pxd":170
 * 
 * 
 * cdef class _getter_list:             # <<<<<<<<<<<<<<
 *     cdef list ind
 *     cdef Py_ssize_t n
 */
struct __pyx_obj_7cytoolz_9itertoolz__getter_list {
  PyObject_HEAD
  PyObject *ind;
  Py_ssize_t n;
};


/* "cytoolz/itertoolz.pxd":175
 * 
 * 
 * cdef class _getter_null:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__getter_null {
  PyObject_HEAD
};


/* "cytoolz/itertoolz.pxd":187
 *                   object right_default=*)
 * 
 * cdef class _join:             # <<<<<<<<<<<<<<
 *     cdef dict d
 *     cdef list matches
 */
struct __pyx_obj_7cytoolz_9itertoolz__join {
  PyObject_HEAD
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__join *__pyx_vtab;
  PyObject *d;
  PyObject *matches;
  PyObject *seen_keys;
  PyObject *leftseq;
  PyObject *rightseq;
  PyObject *_rightkey;
  PyObject *right;
  PyObject *left_default;
  PyObject *right_default;
  PyObject *keys;
  Py_ssize_t N;
  Py_ssize_t i;
  int is_rightseq_exhausted;
};


/* "cytoolz/itertoolz.pxd":205
 * 
 * 
 * cdef class _inner_join(_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__inner_join {
  struct __pyx_obj_7cytoolz_9itertoolz__join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":208
 *     pass
 * 
 * cdef class _right_outer_join(_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join {
  struct __pyx_obj_7cytoolz_9itertoolz__join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":211
 *     pass
 * 
 * cdef class _left_outer_join(_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join {
  struct __pyx_obj_7cytoolz_9itertoolz__join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":214
 *     pass
 * 
 * cdef class _outer_join(_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__outer_join {
  struct __pyx_obj_7cytoolz_9itertoolz__join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":218
 * 
 * 
 * cdef class _inner_join_key(_inner_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key {
  struct __pyx_obj_7cytoolz_9itertoolz__inner_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":221
 *     pass
 * 
 * cdef class _inner_join_index(_inner_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index {
  struct __pyx_obj_7cytoolz_9itertoolz__inner_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":224
 *     pass
 * 
 * cdef class _inner_join_indices(_inner_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices {
  struct __pyx_obj_7cytoolz_9itertoolz__inner_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":227
 *     pass
 * 
 * cdef class _right_outer_join_key(_right_outer_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key {
  struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":230
 *     pass
 * 
 * cdef class _right_outer_join_index(_right_outer_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index {
  struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":233
 *     pass
 * 
 * cdef class _right_outer_join_indices(_right_outer_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices {
  struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":236
 *     pass
 * 
 * cdef class _left_outer_join_key(_left_outer_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key {
  struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":239
 *     pass
 * 
 * cdef class _left_outer_join_index(_left_outer_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index {
  struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":242
 *     pass
 * 
 * cdef class _left_outer_join_indices(_left_outer_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices {
  struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":245
 *     pass
 * 
 * cdef class _outer_join_key(_outer_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key {
  struct __pyx_obj_7cytoolz_9itertoolz__outer_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":248
 *     pass
 * 
 * cdef class _outer_join_index(_outer_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index {
  struct __pyx_obj_7cytoolz_9itertoolz__outer_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":251
 *     pass
 * 
 * cdef class _outer_join_indices(_outer_join):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices {
  struct __pyx_obj_7cytoolz_9itertoolz__outer_join __pyx_base;
};


/* "cytoolz/itertoolz.pxd":255
 * 
 * 
 * cdef class _diff_key:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t N
 *     cdef object iters
 */
struct __pyx_obj_7cytoolz_9itertoolz__diff_key {
  PyObject_HEAD
  Py_ssize_t N;
  PyObject *iters;
  PyObject *key;
};


/* "cytoolz/itertoolz.pxd":261
 * 
 * 
 * cdef class _diff_identity:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t N
 *     cdef object iters
 */
struct __pyx_obj_7cytoolz_9itertoolz__diff_identity {
  PyObject_HEAD
  Py_ssize_t N;
  PyObject *iters;
};


/* "cytoolz/itertoolz.pxd":278
 * 
 * 
 * cdef class random_sample:             # <<<<<<<<<<<<<<
 *     cdef object iter_seq
 *     cdef object prob
 */
struct __pyx_obj_7cytoolz_9itertoolz_random_sample {
  PyObject_HEAD
  PyObject *iter_seq;
  PyObject *prob;
  PyObject *random_func;
};



/* "cytoolz/itertoolz.pyx":1353
 *                                      left_default, right_default)
 * 
 * cdef class _join:             # <<<<<<<<<<<<<<
 *     def __cinit__(self,
 *                   object leftkey, object leftseq,
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__join {
  PyObject *(*rightkey)(struct __pyx_obj_7cytoolz_9itertoolz__join *);
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__join *__pyx_vtabptr_7cytoolz_9itertoolz__join;


/* "cytoolz/itertoolz.pyx":1530
 * 
 * 
 * cdef class _inner_join(_join):             # <<<<<<<<<<<<<<
 *     def __next__(self):
 *         cdef PyObject *obj = NULL
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join *__pyx_vtabptr_7cytoolz_9itertoolz__inner_join;


/* "cytoolz/itertoolz.pyx":1381
 * 
 * 
 * cdef class _right_outer_join(_join):             # <<<<<<<<<<<<<<
 *     def __next__(self):
 *         cdef PyObject *obj
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join *__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join;


/* "cytoolz/itertoolz.pyx":1474
 * 
 * 
 * cdef class _left_outer_join(_join):             # <<<<<<<<<<<<<<
 *     def __next__(self):
 *         cdef PyObject *obj
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join *__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join;


/* "cytoolz/itertoolz.pyx":1418
 * 
 * 
 * cdef class _outer_join(_join):             # <<<<<<<<<<<<<<
 *     def __next__(self):
 *         cdef PyObject *obj
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join *__pyx_vtabptr_7cytoolz_9itertoolz__outer_join;


/* "cytoolz/itertoolz.pyx":1545
 * 
 * 
 * cdef class _inner_join_key(_inner_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         return self._rightkey(self.right)
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join_key {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join_key *__pyx_vtabptr_7cytoolz_9itertoolz__inner_join_key;


/* "cytoolz/itertoolz.pyx":1550
 * 
 * 
 * cdef class _inner_join_index(_inner_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         return self.right[self._rightkey]
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join_index {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join_index *__pyx_vtabptr_7cytoolz_9itertoolz__inner_join_index;


/* "cytoolz/itertoolz.pyx":1555
 * 
 * 
 * cdef class _inner_join_indices(_inner_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join_indices {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join_indices *__pyx_vtabptr_7cytoolz_9itertoolz__inner_join_indices;


/* "cytoolz/itertoolz.pyx":1397
 * 
 * 
 * cdef class _right_outer_join_key(_right_outer_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         return self._rightkey(self.right)
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join_key {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join_key *__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_key;


/* "cytoolz/itertoolz.pyx":1402
 * 
 * 
 * cdef class _right_outer_join_index(_right_outer_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         return self.right[self._rightkey]
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join_index {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join_index *__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_index;


/* "cytoolz/itertoolz.pyx":1407
 * 
 * 
 * cdef class _right_outer_join_indices(_right_outer_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join_indices {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join_indices *__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_indices;


/* "cytoolz/itertoolz.pyx":1509
 * 
 * 
 * cdef class _left_outer_join_key(_left_outer_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         return self._rightkey(self.right)
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join_key {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join_key *__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_key;


/* "cytoolz/itertoolz.pyx":1514
 * 
 * 
 * cdef class _left_outer_join_index(_left_outer_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         return self.right[self._rightkey]
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join_index {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join_index *__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_index;


/* "cytoolz/itertoolz.pyx":1519
 * 
 * 
 * cdef class _left_outer_join_indices(_left_outer_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join_indices {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join_indices *__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_indices;


/* "cytoolz/itertoolz.pyx":1453
 * 
 * 
 * cdef class _outer_join_key(_outer_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         return self._rightkey(self.right)
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join_key {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join_key *__pyx_vtabptr_7cytoolz_9itertoolz__outer_join_key;


/* "cytoolz/itertoolz.pyx":1458
 * 
 * 
 * cdef class _outer_join_index(_outer_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         return self.right[self._rightkey]
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join_index {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join_index *__pyx_vtabptr_7cytoolz_9itertoolz__outer_join_index;


/* "cytoolz/itertoolz.pyx":1463
 * 
 * 
 * cdef class _outer_join_indices(_outer_join):             # <<<<<<<<<<<<<<
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)
 */

struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join_indices {
  struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join __pyx_base;
};
static struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join_indices *__pyx_vtabptr_7cytoolz_9itertoolz__outer_join_indices;

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

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

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

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

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

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

/* IterNext.proto */
#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);

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

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

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

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

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

/* CallableCheck.proto */
#if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3
#define __Pyx_PyCallable_Check(obj)   (Py_TYPE(obj)->tp_call != NULL)
#else
#define __Pyx_PyCallable_Check(obj)   PyCallable_Check(obj)
#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

/* DivInt[Py_ssize_t].proto */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);

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

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

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

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

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

/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

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

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

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

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

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

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

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

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

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

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

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

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

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

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

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

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

/* pyobject_as_double.proto */
static double __Pyx__PyObject_AsDouble(PyObject* obj);
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_AsDouble(obj)\
(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) :\
 likely(PyInt_CheckExact(obj)) ?\
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj)\
((likely(PyFloat_CheckExact(obj))) ?\
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* FunctionExport.proto */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);

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

static PyObject *__pyx_f_7cytoolz_9itertoolz_5_join_rightkey(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__join *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_21_right_outer_join_key_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_23_right_outer_join_index_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_25_right_outer_join_indices_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_15_outer_join_key_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_17_outer_join_index_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_19_outer_join_indices_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_20_left_outer_join_key_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_22_left_outer_join_index_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_24_left_outer_join_indices_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_15_inner_join_key_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_17_inner_join_index_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_19_inner_join_indices_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices *__pyx_v_self); /* proto*/

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

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

/* Module declarations from '__builtin__' */

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

/* Module declarations from 'cpython' */

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

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

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

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

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

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

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

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

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

/* Module declarations from 'cytoolz.itertoolz' */
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz_remove = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz_accumulate = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__merge_sorted = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__merge_sorted_key = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz_interleave = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__unique_key = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__unique_identity = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz_interpose = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz_iterate = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz_sliding_window = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz_partition_all = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__pluck_index = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__pluck_index_default = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__pluck_list = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__pluck_list_default = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__getter_index = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__getter_list = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__getter_null = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__join = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__inner_join = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__right_outer_join = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__left_outer_join = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__outer_join = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__inner_join_key = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__inner_join_index = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__inner_join_indices = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__right_outer_join_key = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__right_outer_join_index = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__right_outer_join_indices = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__left_outer_join_key = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__left_outer_join_index = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__left_outer_join_indices = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__outer_join_key = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__outer_join_index = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__outer_join_indices = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__diff_key = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz__diff_identity = 0;
static PyTypeObject *__pyx_ptype_7cytoolz_9itertoolz_random_sample = 0;
static PyObject *__pyx_v_7cytoolz_9itertoolz__get_exceptions = 0;
static PyObject *__pyx_v_7cytoolz_9itertoolz__get_list_exc = 0;
static PyObject *__pyx_f_7cytoolz_9itertoolz_groupby(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_c_merge_sorted(PyObject *, struct __pyx_opt_args_7cytoolz_9itertoolz_c_merge_sorted *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_unique(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_unique *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_isiterable(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_isdistinct(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_take(Py_ssize_t, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_tail(Py_ssize_t, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_drop(Py_ssize_t, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_take_nth(Py_ssize_t, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_first(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_second(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_nth(Py_ssize_t, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_last(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_rest(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_get(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_get *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_cons(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_concat(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_mapcat(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_frequencies(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_reduceby(PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_reduceby *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_partition(Py_ssize_t, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_partition *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_count(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_pluck(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_pluck *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_getter(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_join(PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_join *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_c_diff(PyObject *, struct __pyx_opt_args_7cytoolz_9itertoolz_c_diff *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_topk(Py_ssize_t, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_topk *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_peek(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_peekn(Py_ssize_t, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_identity(PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytoolz_9itertoolz__groupby_core(PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz__merge_sorted_binary(PyObject *); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz__merge_sorted_binary_key(PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytoolz_9itertoolz__reduceby_core(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int, int); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz___pyx_unpickle__getter_null__set_state(struct __pyx_obj_7cytoolz_9itertoolz__getter_null *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "cytoolz.itertoolz"
extern int __pyx_module_is_main_cytoolz__itertoolz;
int __pyx_module_is_main_cytoolz__itertoolz = 0;

/* Implementation of 'cytoolz.itertoolz' */
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_max;
static const char __pyx_k_N[] = "N";
static const char __pyx_k_k[] = "k";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_el[] = "el";
static const char __pyx_k_all[] = "__all__";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_ind[] = "ind";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_len[] = "__len__";
static const char __pyx_k_map[] = "map";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_nth[] = "nth";
static const char __pyx_k_pad[] = "pad";
static const char __pyx_k_seq[] = "seq";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_cons[] = "cons";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_diff[] = "diff";
static const char __pyx_k_drop[] = "drop";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_init[] = "init";
static const char __pyx_k_join[] = "_join";
static const char __pyx_k_last[] = "last";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_peek[] = "peek";
static const char __pyx_k_prob[] = "prob";
static const char __pyx_k_rest[] = "rest";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_seq1[] = "seq1";
static const char __pyx_k_seq2[] = "seq2";
static const char __pyx_k_seqs[] = "seqs";
static const char __pyx_k_sort[] = "sort";
static const char __pyx_k_tail[] = "tail";
static const char __pyx_k_take[] = "take";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_topk[] = "topk";
static const char __pyx_k_val2[] = "val2";
static const char __pyx_k_binop[] = "binop";
static const char __pyx_k_chain[] = "chain";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_deque[] = "deque";
static const char __pyx_k_first[] = "first";
static const char __pyx_k_heapq[] = "heapq";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_peekn[] = "peekn";
static const char __pyx_k_pluck[] = "pluck";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_Random[] = "Random";
static const char __pyx_k_concat[] = "concat";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_getter[] = "getter";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_islice[] = "islice";
static const char __pyx_k_join_2[] = "join";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_mapcat[] = "mapcat";
static const char __pyx_k_no_pad[] = "no_pad";
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_remove[] = "remove";
static const char __pyx_k_second[] = "second";
static const char __pyx_k_unique[] = "unique";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_concatv[] = "concatv";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_groupby[] = "groupby";
static const char __pyx_k_heapify[] = "heapify";
static const char __pyx_k_heappop[] = "heappop";
static const char __pyx_k_initial[] = "initial";
static const char __pyx_k_iterate[] = "iterate";
static const char __pyx_k_leftkey[] = "leftkey";
static const char __pyx_k_leftseq[] = "leftseq";
static const char __pyx_k_no__pad[] = "__no__pad__";
static const char __pyx_k_reverse[] = "reverse";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_diff_key[] = "_diff_key";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_identity[] = "identity";
static const char __pyx_k_operator[] = "operator";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_reduceby[] = "reduceby";
static const char __pyx_k_rightkey[] = "rightkey";
static const char __pyx_k_rightseq[] = "rightseq";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_take_nth[] = "take_nth";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_fillvalue[] = "fillvalue";
static const char __pyx_k_interpose[] = "interpose";
static const char __pyx_k_itertools[] = "itertools";
static const char __pyx_k_partition[] = "partition";
static const char __pyx_k_predicate[] = "predicate";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_accumulate[] = "accumulate";
static const char __pyx_k_inner_join[] = "_inner_join";
static const char __pyx_k_interleave[] = "interleave";
static const char __pyx_k_isdistinct[] = "isdistinct";
static const char __pyx_k_isiterable[] = "isiterable";
static const char __pyx_k_itemgetter[] = "itemgetter";
static const char __pyx_k_no_default[] = "no_default";
static const char __pyx_k_outer_join[] = "_outer_join";
static const char __pyx_k_pluck_list[] = "_pluck_list";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_unique_key[] = "_unique_key";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_frequencies[] = "frequencies";
static const char __pyx_k_getter_list[] = "_getter_list";
static const char __pyx_k_getter_null[] = "_getter_null";
static const char __pyx_k_heapreplace[] = "heapreplace";
static const char __pyx_k_no__default[] = "__no__default__";
static const char __pyx_k_pluck_index[] = "_pluck_index";
static const char __pyx_k_zip_longest[] = "zip_longest";
static const char __pyx_k_get_line_617[] = "get (line 617)";
static const char __pyx_k_getter_index[] = "_getter_index";
static const char __pyx_k_left_default[] = "left_default";
static const char __pyx_k_merge_sorted[] = "_merge_sorted";
static const char __pyx_k_nth_line_571[] = "nth (line 571)";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_random_state[] = "random_state";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_StopIteration[] = "StopIteration";
static const char __pyx_k_cons_line_738[] = "cons (line 738)";
static const char __pyx_k_cytoolz_utils[] = "cytoolz.utils";
static const char __pyx_k_diff_identity[] = "_diff_identity";
static const char __pyx_k_drop_line_515[] = "drop (line 515)";
static const char __pyx_k_from_iterable[] = "from_iterable";
static const char __pyx_k_last_line_589[] = "last (line 589)";
static const char __pyx_k_partition_all[] = "partition_all";
static const char __pyx_k_random_sample[] = "random_sample";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_right_default[] = "right_default";
static const char __pyx_k_tail_line_499[] = "tail (line 499)";
static const char __pyx_k_take_line_485[] = "take (line 485)";
static const char __pyx_k_diff_line_1623[] = "diff (line 1623)";
static const char __pyx_k_first_line_549[] = "first (line 549)";
static const char __pyx_k_inner_join_key[] = "_inner_join_key";
static const char __pyx_k_join_line_1250[] = "join (line 1250)";
static const char __pyx_k_merge_sorted_2[] = "merge_sorted";
static const char __pyx_k_outer_join_key[] = "_outer_join_key";
static const char __pyx_k_peek_line_1721[] = "peek (line 1721)";
static const char __pyx_k_sliding_window[] = "sliding_window";
static const char __pyx_k_topk_line_1649[] = "topk (line 1649)";
static const char __pyx_k_concat_line_695[] = "concat (line 695)";
static const char __pyx_k_left_outer_join[] = "_left_outer_join";
static const char __pyx_k_mapcat_line_727[] = "mapcat (line 727)";
static const char __pyx_k_peekn_line_1740[] = "peekn (line 1740)";
static const char __pyx_k_pluck_line_1174[] = "pluck (line 1174)";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_second_line_559[] = "second (line 559)";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_unique_identity[] = "_unique_identity";
static const char __pyx_k_unique_line_421[] = "unique (line 421)";
static const char __pyx_k_concatv_line_714[] = "concatv (line 714)";
static const char __pyx_k_groupby_line_116[] = "groupby (line 116)";
static const char __pyx_k_inner_join_index[] = "_inner_join_index";
static const char __pyx_k_merge_sorted_key[] = "_merge_sorted_key";
static const char __pyx_k_outer_join_index[] = "_outer_join_index";
static const char __pyx_k_right_outer_join[] = "_right_outer_join";
static const char __pyx_k_cytoolz_itertoolz[] = "cytoolz.itertoolz";
static const char __pyx_k_reduceby_line_815[] = "reduceby (line 815)";
static const char __pyx_k_take_nth_line_539[] = "take_nth (line 539)";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_inner_join_indices[] = "_inner_join_indices";
static const char __pyx_k_outer_join_indices[] = "_outer_join_indices";
static const char __pyx_k_partition_line_995[] = "partition (line 995)";
static const char __pyx_k_pluck_list_default[] = "_pluck_list_default";
static const char __pyx_k_isdistinct_line_460[] = "isdistinct (line 460)";
static const char __pyx_k_isiterable_line_441[] = "isiterable (line 441)";
static const char __pyx_k_left_outer_join_key[] = "_left_outer_join_key";
static const char __pyx_k_pluck_index_default[] = "_pluck_index_default";
static const char __pyx_k_frequencies_line_778[] = "frequencies (line 778)";
static const char __pyx_k_join___reduce_cython[] = "_join.__reduce_cython__";
static const char __pyx_k_right_outer_join_key[] = "_right_outer_join_key";
static const char __pyx_k_cytoolz_itertoolz_pyx[] = "cytoolz/itertoolz.pyx";
static const char __pyx_k_left_outer_join_index[] = "_left_outer_join_index";
static const char __pyx_k_merge_sorted_line_293[] = "merge_sorted (line 293)";
static const char __pyx_k_join___setstate_cython[] = "_join.__setstate_cython__";
static const char __pyx_k_remove___reduce_cython[] = "remove.__reduce_cython__";
static const char __pyx_k_right_outer_join_index[] = "_right_outer_join_index";
static const char __pyx_k_iterate___reduce_cython[] = "iterate.__reduce_cython__";
static const char __pyx_k_left_outer_join_indices[] = "_left_outer_join_indices";
static const char __pyx_k_diff_key___reduce_cython[] = "_diff_key.__reduce_cython__";
static const char __pyx_k_remove___setstate_cython[] = "remove.__setstate_cython__";
static const char __pyx_k_right_outer_join_indices[] = "_right_outer_join_indices";
static const char __pyx_k_interpose___reduce_cython[] = "interpose.__reduce_cython__";
static const char __pyx_k_iterate___setstate_cython[] = "iterate.__setstate_cython__";
static const char __pyx_k_pyx_unpickle__getter_null[] = "__pyx_unpickle__getter_null";
static const char __pyx_k_accumulate___reduce_cython[] = "accumulate.__reduce_cython__";
static const char __pyx_k_diff_key___setstate_cython[] = "_diff_key.__setstate_cython__";
static const char __pyx_k_inner_join___reduce_cython[] = "_inner_join.__reduce_cython__";
static const char __pyx_k_interleave___reduce_cython[] = "interleave.__reduce_cython__";
static const char __pyx_k_outer_join___reduce_cython[] = "_outer_join.__reduce_cython__";
static const char __pyx_k_pluck_list___reduce_cython[] = "_pluck_list.__reduce_cython__";
static const char __pyx_k_unique_key___reduce_cython[] = "_unique_key.__reduce_cython__";
static const char __pyx_k_getter_list___reduce_cython[] = "_getter_list.__reduce_cython__";
static const char __pyx_k_getter_null___reduce_cython[] = "_getter_null.__reduce_cython__";
static const char __pyx_k_interpose___setstate_cython[] = "interpose.__setstate_cython__";
static const char __pyx_k_pluck_index___reduce_cython[] = "_pluck_index.__reduce_cython__";
static const char __pyx_k_accumulate___setstate_cython[] = "accumulate.__setstate_cython__";
static const char __pyx_k_getter_index___reduce_cython[] = "_getter_index.__reduce_cython__";
static const char __pyx_k_inner_join___setstate_cython[] = "_inner_join.__setstate_cython__";
static const char __pyx_k_interleave___setstate_cython[] = "interleave.__setstate_cython__";
static const char __pyx_k_merge_sorted___reduce_cython[] = "_merge_sorted.__reduce_cython__";
static const char __pyx_k_outer_join___setstate_cython[] = "_outer_join.__setstate_cython__";
static const char __pyx_k_pluck_list___setstate_cython[] = "_pluck_list.__setstate_cython__";
static const char __pyx_k_unique_key___setstate_cython[] = "_unique_key.__setstate_cython__";
static const char __pyx_k_diff_identity___reduce_cython[] = "_diff_identity.__reduce_cython__";
static const char __pyx_k_getter_list___setstate_cython[] = "_getter_list.__setstate_cython__";
static const char __pyx_k_getter_null___setstate_cython[] = "_getter_null.__setstate_cython__";
static const char __pyx_k_partition_all___reduce_cython[] = "partition_all.__reduce_cython__";
static const char __pyx_k_pluck_index___setstate_cython[] = "_pluck_index.__setstate_cython__";
static const char __pyx_k_random_sample___reduce_cython[] = "random_sample.__reduce_cython__";
static const char __pyx_k_Apply_func_to_each_sequence_in[] = "\n    Apply func to each sequence in seqs, concatenating results.\n\n    >>> list(mapcat(lambda s: [c.upper() for c in s],\n    ...             [[\"a\", \"b\"], [\"c\", \"d\", \"e\"]]))\n    ['A', 'B', 'C', 'D', 'E']\n    ";
static const char __pyx_k_Find_the_k_largest_elements_of[] = "\n    Find the k largest elements of a sequence\n\n    Operates lazily in ``n*log(k)`` time\n\n    >>> topk(2, [1, 100, 10, 1000])\n    (1000, 100)\n\n    Use a key function to change sorted order\n\n    >>> topk(2, ['Alice', 'Bob', 'Charlie', 'Dan'], key=len)\n    ('Charlie', 'Alice')\n\n    See also:\n        heapq.nlargest\n    ";
static const char __pyx_k_Is_x_iterable_isiterable_1_2_3[] = "\n    Is x iterable?\n\n    >>> isiterable([1, 2, 3])\n    True\n    >>> isiterable('abc')\n    True\n    >>> isiterable(5)\n    False\n    ";
static const char __pyx_k_Merge_and_sort_a_collection_of[] = "\n    Merge and sort a collection of sorted collections\n\n    This works lazily and only keeps one value from each iterable in memory.\n\n    >>> list(merge_sorted([1, 3, 5], [2, 4, 6]))\n    [1, 2, 3, 4, 5, 6]\n\n    >>> ''.join(merge_sorted('abc', 'abc', 'abc'))\n    'aaabbbccc'\n\n    The \"key\" function used to sort the input may be passed as a keyword.\n\n    >>> list(merge_sorted([2, 3], [1, 3], key=lambda x: x // 3))\n    [2, 1, 3, 3]\n    ";
static const char __pyx_k_Partition_sequence_into_tuples[] = "\n    Partition sequence into tuples of length n\n\n    >>> list(partition(2, [1, 2, 3, 4]))\n    [(1, 2), (3, 4)]\n\n    If the length of ``seq`` is not evenly divisible by ``n``, the final tuple\n    is dropped if ``pad`` is not specified, or filled to length ``n`` by pad:\n\n    >>> list(partition(2, [1, 2, 3, 4, 5]))\n    [(1, 2), (3, 4)]\n\n    >>> list(partition(2, [1, 2, 3, 4, 5], pad=None))\n    [(1, 2), (3, 4), (5, None)]\n\n    See Also:\n        partition_all\n    ";
static const char __pyx_k_Perform_a_simultaneous_groupby[] = "\n    Perform a simultaneous groupby and reduction\n\n    The computation:\n\n    >>> result = reduceby(key, binop, seq, init)      # doctest: +SKIP\n\n    is equivalent to the following:\n\n    >>> def reduction(group):                           # doctest: +SKIP\n    ...     return reduce(binop, group, init)           # doctest: +SKIP\n\n    >>> groups = groupby(key, seq)                    # doctest: +SKIP\n    >>> result = valmap(reduction, groups)              # doctest: +SKIP\n\n    But the former does not build the intermediate groups, allowing it to\n    operate in much less space.  This makes it suitable for larger datasets\n    that do not fit comfortably in memory\n\n    The ``init`` keyword argument is the default initialization of the\n    reduction.  This can be either a constant value like ``0`` or a callable\n    like ``lambda : 0`` as might be used in ``defaultdict``.\n\n    Simple Examples\n    ---------------\n\n    >>> from operator import add, mul\n    >>> iseven = lambda x: x % 2 == 0\n\n    >>> data = [1, 2, 3, 4, 5]\n\n    >>> reduceby(iseven, add, data)  # doctest: +SKIP\n    {False: 9, True: 6}\n\n    >>> reduceby(iseven, mul, data)  # doctest: +SKIP\n    {False: 15, True: 8}\n\n    Complex Example\n    ---------------\n\n    >>> projects = [{'name': 'build roads', 'state': 'CA', 'cost': 1000000},\n    ...             {'name': 'fight crime', 'state': 'IL', 'cost': 100000},\n    ...             {'name': 'help farmers', 'state': 'IL', 'cost': 2000000},\n    ...             {'name': 'help farmers', 'state': 'CA', 'cost': 200000}]\n\n    >>> reduceby('state',                        # doctest: +SKIP\n    ...          lambda acc, x: acc + x['cost'],\n    ...          projects, 0)\n    {'CA': 1200000, 'IL': 2100000}\n\n    Example Using ``init``\n    ----------------------\n\n    >>> def set_add(s, i):\n    ...     s.add(i)\n    ...     return s\n\n    >>> reduceby(iseven, set_add, [1, 2, 3, 4, 1, 2, 3], set)  # doctest: +SKIP\n    {True:  set([2, ""4]),\n     False: set([1, 3])}\n    ";
static const char __pyx_k_Retrieve_the_next_element_of_a[] = "\n    Retrieve the next element of a sequence\n\n    Returns the first element and an iterable equivalent to the original\n    sequence, still having the element retrieved.\n\n    >>> seq = [0, 1, 2, 3, 4]\n    >>> first, seq = peek(seq)\n    >>> first\n    0\n    >>> list(seq)\n    [0, 1, 2, 3, 4]\n    ";
static const char __pyx_k_Return_only_unique_elements_of[] = "\n    Return only unique elements of a sequence\n\n    >>> tuple(unique((1, 2, 3)))\n    (1, 2, 3)\n    >>> tuple(unique((1, 2, 1, 3)))\n    (1, 2, 3)\n\n    Uniqueness can be defined by key keyword\n\n    >>> tuple(unique(['cat', 'mouse', 'dog', 'hen'], key=len))\n    ('cat', 'mouse')\n    ";
static const char __pyx_k_Return_those_items_that_differ[] = "\n    Return those items that differ between sequences\n\n    >>> list(diff([1, 2, 3], [1, 2, 10, 100]))\n    [(3, 10)]\n\n    Shorter sequences may be padded with a ``default`` value:\n\n    >>> list(diff([1, 2, 3], [1, 2, 10, 100], default=None))\n    [(3, 10), (None, 100)]\n\n    A ``key`` function may also be applied to each item to use during\n    comparisons:\n\n    >>> list(diff(['apples', 'bananas'], ['Apples', 'Oranges'], key=str.lower))\n    [('bananas', 'Oranges')]\n    ";
static const char __pyx_k_The_last_element_in_a_sequence[] = "\n    The last element in a sequence\n\n    >>> last('ABC')\n    'C'\n    ";
static const char __pyx_k_getter_index___setstate_cython[] = "_getter_index.__setstate_cython__";
static const char __pyx_k_inner_join_key___reduce_cython[] = "_inner_join_key.__reduce_cython__";
static const char __pyx_k_left_outer_join_index___reduce[] = "_left_outer_join_index.__reduce_cython__";
static const char __pyx_k_left_outer_join_key___setstate[] = "_left_outer_join_key.__setstate_cython__";
static const char __pyx_k_merge_sorted___setstate_cython[] = "_merge_sorted.__setstate_cython__";
static const char __pyx_k_outer_join_key___reduce_cython[] = "_outer_join_key.__reduce_cython__";
static const char __pyx_k_pluck_index_default___setstate[] = "_pluck_index_default.__setstate_cython__";
static const char __pyx_k_sliding_window___reduce_cython[] = "sliding_window.__reduce_cython__";
static const char __pyx_k_Add_el_to_beginning_of_possibly[] = "\n    Add el to beginning of (possibly infinite) sequence seq.\n\n    >>> list(cons(1, [2, 3]))\n    [1, 2, 3]\n    ";
static const char __pyx_k_All_values_in_sequence_are_dist[] = "\n    All values in sequence are distinct\n\n    >>> isdistinct([1, 2, 3])\n    True\n    >>> isdistinct([1, 2, 1])\n    False\n\n    >>> isdistinct(\"Hello\")\n    False\n    >>> isdistinct(\"World\")\n    True\n    ";
static const char __pyx_k_Concatenate_zero_or_more_iterab[] = "\n    Concatenate zero or more iterables, any of which may be infinite.\n\n    An infinite sequence will prevent the rest of the arguments from\n    being included.\n\n    We use chain.from_iterable rather than ``chain(*seqs)`` so that seqs\n    can be a generator.\n\n    >>> list(concat([[], [1], [2, 3]]))\n    [1, 2, 3]\n\n    See also:\n        itertools.chain.from_iterable  equivalent\n    ";
static const char __pyx_k_Every_nth_item_in_seq_list_take[] = "\n    Every nth item in seq\n\n    >>> list(take_nth(2, [10, 20, 30, 40, 50]))\n    [10, 30, 50]\n    ";
static const char __pyx_k_Find_number_of_occurrences_of_e[] = "\n    Find number of occurrences of each value in seq\n\n    >>> frequencies(['cat', 'cat', 'ox', 'pig', 'pig', 'cat'])  #doctest: +SKIP\n    {'cat': 3, 'ox': 1, 'pig': 2}\n\n    See Also:\n        countby\n        groupby\n    ";
static const char __pyx_k_Get_element_in_a_sequence_or_di[] = "\n    Get element in a sequence or dict\n\n    Provides standard indexing\n\n    >>> get(1, 'ABC')       # Same as 'ABC'[1]\n    'B'\n\n    Pass a list to get multiple values\n\n    >>> get([1, 2], 'ABC')  # ('ABC'[1], 'ABC'[2])\n    ('B', 'C')\n\n    Works on any value that supports indexing/getitem\n    For example here we see that it works with dictionaries\n\n    >>> phonebook = {'Alice':  '555-1234',\n    ...              'Bob':    '555-5678',\n    ...              'Charlie':'555-9999'}\n    >>> get('Alice', phonebook)\n    '555-1234'\n\n    >>> get(['Alice', 'Bob'], phonebook)\n    ('555-1234', '555-5678')\n\n    Provide a default for missing values\n\n    >>> get(['Alice', 'Dennis'], phonebook, None)\n    ('555-1234', None)\n\n    See Also:\n        pluck\n    ";
static const char __pyx_k_Group_a_collection_by_a_key_fun[] = "\n    Group a collection by a key function\n\n    >>> names = ['Alice', 'Bob', 'Charlie', 'Dan', 'Edith', 'Frank']\n    >>> groupby(len, names)  # doctest: +SKIP\n    {3: ['Bob', 'Dan'], 5: ['Alice', 'Edith', 'Frank'], 7: ['Charlie']}\n\n    >>> iseven = lambda x: x % 2 == 0\n    >>> groupby(iseven, [1, 2, 3, 4, 5, 6, 7, 8])  # doctest: +SKIP\n    {False: [1, 3, 5, 7], True: [2, 4, 6, 8]}\n\n    Non-callable keys imply grouping on a member.\n\n    >>> groupby('gender', [{'name': 'Alice', 'gender': 'F'},\n    ...                    {'name': 'Bob', 'gender': 'M'},\n    ...                    {'name': 'Charlie', 'gender': 'M'}]) # doctest:+SKIP\n    {'F': [{'gender': 'F', 'name': 'Alice'}],\n     'M': [{'gender': 'M', 'name': 'Bob'},\n           {'gender': 'M', 'name': 'Charlie'}]}\n\n    Not to be confused with ``itertools.groupby``\n\n    See Also:\n        countby\n    ";
static const char __pyx_k_Join_two_sequences_on_common_at[] = "\n    Join two sequences on common attributes\n\n    This is a semi-streaming operation.  The LEFT sequence is fully evaluated\n    and placed into memory.  The RIGHT sequence is evaluated lazily and so can\n    be arbitrarily large.\n    (Note: If right_default is defined, then unique keys of rightseq\n        will also be stored in memory.)\n\n    >>> friends = [('Alice', 'Edith'),\n    ...            ('Alice', 'Zhao'),\n    ...            ('Edith', 'Alice'),\n    ...            ('Zhao', 'Alice'),\n    ...            ('Zhao', 'Edith')]\n\n    >>> cities = [('Alice', 'NYC'),\n    ...           ('Alice', 'Chicago'),\n    ...           ('Dan', 'Syndey'),\n    ...           ('Edith', 'Paris'),\n    ...           ('Edith', 'Berlin'),\n    ...           ('Zhao', 'Shanghai')]\n\n    >>> # Vacation opportunities\n    >>> # In what cities do people have friends?\n    >>> result = join(second, friends,\n    ...               first, cities)\n    >>> for ((a, b), (c, d)) in sorted(unique(result)):\n    ...     print((a, d))\n    ('Alice', 'Berlin')\n    ('Alice', 'Paris')\n    ('Alice', 'Shanghai')\n    ('Edith', 'Chicago')\n    ('Edith', 'NYC')\n    ('Zhao', 'Chicago')\n    ('Zhao', 'NYC')\n    ('Zhao', 'Berlin')\n    ('Zhao', 'Paris')\n\n    Specify outer joins with keyword arguments ``left_default`` and/or\n    ``right_default``.  Here is a full outer join in which unmatched elements\n    are paired with None.\n\n    >>> identity = lambda x: x\n    >>> list(join(identity, [1, 2, 3],\n    ...           identity, [2, 3, 4],\n    ...           left_default=None, right_default=None))\n    [(2, 2), (3, 3), (None, 4), (1, None)]\n\n    Usually the key arguments are callables to be applied to the sequences.  If\n    the keys are not obviously callable then it is assumed that indexing was\n    intended, e.g. the following is a legal change.\n    The join is implemented as a hash join and the keys of leftseq must be\n    hashable. Additionally, if right_default is defined, then key""s of rightseq\n    must also be hashable.\n\n    >>> # result = join(second, friends, first, cities)\n    >>> result = join(1, friends, 0, cities)  # doctest: +SKIP\n    ";
static const char __pyx_k_Retrieve_the_next_n_elements_of[] = "\n    Retrieve the next n elements of a sequence\n\n    Returns a tuple of the first n elements and an iterable equivalent\n    to the original, still having the elements retrieved.\n\n    >>> seq = [0, 1, 2, 3, 4]\n    >>> first_two, seq = peekn(2, seq)\n    >>> first_two\n    (0, 1)\n    >>> list(seq)\n    [0, 1, 2, 3, 4]\n    ";
static const char __pyx_k_The_first_element_in_a_sequence[] = "\n    The first element in a sequence\n\n    >>> first('ABC')\n    'A'\n    ";
static const char __pyx_k_The_first_n_elements_of_a_seque[] = "\n    The first n elements of a sequence\n\n    >>> list(take(2, [10, 20, 30, 40, 50]))\n    [10, 20]\n\n    See Also:\n        drop\n        tail\n    ";
static const char __pyx_k_The_last_n_elements_of_a_sequen[] = "\n    The last n elements of a sequence\n\n    >>> tail(2, [10, 20, 30, 40, 50])\n    [40, 50]\n\n    See Also:\n        drop\n        take\n    ";
static const char __pyx_k_The_nth_element_in_a_sequence_n[] = "\n    The nth element in a sequence\n\n    >>> nth(1, 'ABC')\n    'B'\n    ";
static const char __pyx_k_The_second_element_in_a_sequenc[] = "\n    The second element in a sequence\n\n    >>> second('ABC')\n    'B'\n    ";
static const char __pyx_k_The_sequence_following_the_firs[] = "\n    The sequence following the first n elements\n\n    >>> list(drop(2, [10, 20, 30, 40, 50]))\n    [30, 40, 50]\n\n    See Also:\n        take\n        tail\n    ";
static const char __pyx_k_Variadic_version_of_concat_list[] = "\n    Variadic version of concat\n\n    >>> list(concatv([], [\"a\"], [\"b\", \"c\"]))\n    ['a', 'b', 'c']\n\n    See also:\n        itertools.chain\n    ";
static const char __pyx_k_diff_identity___setstate_cython[] = "_diff_identity.__setstate_cython__";
static const char __pyx_k_inner_join_index___reduce_cytho[] = "_inner_join_index.__reduce_cython__";
static const char __pyx_k_inner_join_index___setstate_cyt[] = "_inner_join_index.__setstate_cython__";
static const char __pyx_k_inner_join_indices___reduce_cyt[] = "_inner_join_indices.__reduce_cython__";
static const char __pyx_k_inner_join_indices___setstate_c[] = "_inner_join_indices.__setstate_cython__";
static const char __pyx_k_inner_join_key___setstate_cytho[] = "_inner_join_key.__setstate_cython__";
static const char __pyx_k_left_outer_join___reduce_cython[] = "_left_outer_join.__reduce_cython__";
static const char __pyx_k_left_outer_join___setstate_cyth[] = "_left_outer_join.__setstate_cython__";
static const char __pyx_k_left_outer_join_index___setstat[] = "_left_outer_join_index.__setstate_cython__";
static const char __pyx_k_left_outer_join_indices___reduc[] = "_left_outer_join_indices.__reduce_cython__";
static const char __pyx_k_left_outer_join_indices___setst[] = "_left_outer_join_indices.__setstate_cython__";
static const char __pyx_k_left_outer_join_key___reduce_cy[] = "_left_outer_join_key.__reduce_cython__";
static const char __pyx_k_merge_sorted_key___reduce_cytho[] = "_merge_sorted_key.__reduce_cython__";
static const char __pyx_k_merge_sorted_key___setstate_cyt[] = "_merge_sorted_key.__setstate_cython__";
static const char __pyx_k_n_argument_for_drop_must_be_non[] = "n argument for drop() must be non-negative";
static const char __pyx_k_n_must_be_positive_when_indexin[] = "\"n\" must be positive when indexing an iterator";
static const char __pyx_k_outer_join_index___reduce_cytho[] = "_outer_join_index.__reduce_cython__";
static const char __pyx_k_outer_join_index___setstate_cyt[] = "_outer_join_index.__setstate_cython__";
static const char __pyx_k_outer_join_indices___reduce_cyt[] = "_outer_join_indices.__reduce_cython__";
static const char __pyx_k_outer_join_indices___setstate_c[] = "_outer_join_indices.__setstate_cython__";
static const char __pyx_k_outer_join_key___setstate_cytho[] = "_outer_join_key.__setstate_cython__";
static const char __pyx_k_partition_all___setstate_cython[] = "partition_all.__setstate_cython__";
static const char __pyx_k_pluck_index_default___reduce_cy[] = "_pluck_index_default.__reduce_cython__";
static const char __pyx_k_pluck_list_default___reduce_cyt[] = "_pluck_list_default.__reduce_cython__";
static const char __pyx_k_pluck_list_default___setstate_c[] = "_pluck_list_default.__setstate_cython__";
static const char __pyx_k_plucks_an_element_or_several_el[] = "\n    plucks an element or several elements from each item in a sequence.\n\n    ``pluck`` maps ``itertoolz.get`` over a sequence and returns one or more\n    elements of each item in the sequence.\n\n    This is equivalent to running `map(curried.get(ind), seqs)`\n\n    ``ind`` can be either a single string/index or a list of strings/indices.\n    ``seqs`` should be sequence containing sequences or dicts.\n\n    e.g.\n\n    >>> data = [{'id': 1, 'name': 'Cheese'}, {'id': 2, 'name': 'Pies'}]\n    >>> list(pluck('name', data))\n    ['Cheese', 'Pies']\n    >>> list(pluck([0, 1], [[1, 2, 3], [4, 5, 7]]))\n    [(1, 2), (4, 5)]\n\n    See Also:\n        get\n        map\n    ";
static const char __pyx_k_random_sample___setstate_cython[] = "random_sample.__setstate_cython__";
static const char __pyx_k_right_outer_join___reduce_cytho[] = "_right_outer_join.__reduce_cython__";
static const char __pyx_k_right_outer_join___setstate_cyt[] = "_right_outer_join.__setstate_cython__";
static const char __pyx_k_right_outer_join_index___reduce[] = "_right_outer_join_index.__reduce_cython__";
static const char __pyx_k_right_outer_join_index___setsta[] = "_right_outer_join_index.__setstate_cython__";
static const char __pyx_k_right_outer_join_indices___redu[] = "_right_outer_join_indices.__reduce_cython__";
static const char __pyx_k_right_outer_join_indices___sets[] = "_right_outer_join_indices.__setstate_cython__";
static const char __pyx_k_right_outer_join_key___reduce_c[] = "_right_outer_join_key.__reduce_cython__";
static const char __pyx_k_right_outer_join_key___setstate[] = "_right_outer_join_key.__setstate_cython__";
static const char __pyx_k_unique_identity___reduce_cython[] = "_unique_identity.__reduce_cython__";
static const char __pyx_k_unique_identity___setstate_cyth[] = "_unique_identity.__setstate_cython__";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())";
static const char __pyx_k_Too_few_sequences_given_min_2_re[] = "Too few sequences given (min 2 required)";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_sliding_window___setstate_cython[] = "sliding_window.__setstate_cython__";
static PyObject *__pyx_kp_u_Add_el_to_beginning_of_possibly;
static PyObject *__pyx_kp_u_All_values_in_sequence_are_dist;
static PyObject *__pyx_kp_u_Apply_func_to_each_sequence_in;
static PyObject *__pyx_kp_u_Concatenate_zero_or_more_iterab;
static PyObject *__pyx_kp_u_Every_nth_item_in_seq_list_take;
static PyObject *__pyx_kp_u_Find_number_of_occurrences_of_e;
static PyObject *__pyx_kp_u_Find_the_k_largest_elements_of;
static PyObject *__pyx_kp_u_Get_element_in_a_sequence_or_di;
static PyObject *__pyx_kp_u_Group_a_collection_by_a_key_fun;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_kp_u_Is_x_iterable_isiterable_1_2_3;
static PyObject *__pyx_kp_u_Join_two_sequences_on_common_at;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_kp_u_Merge_and_sort_a_collection_of;
static PyObject *__pyx_n_s_N;
static PyObject *__pyx_kp_u_Partition_sequence_into_tuples;
static PyObject *__pyx_kp_u_Perform_a_simultaneous_groupby;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_Random;
static PyObject *__pyx_kp_u_Retrieve_the_next_element_of_a;
static PyObject *__pyx_kp_u_Retrieve_the_next_n_elements_of;
static PyObject *__pyx_kp_u_Return_only_unique_elements_of;
static PyObject *__pyx_kp_u_Return_those_items_that_differ;
static PyObject *__pyx_n_s_StopIteration;
static PyObject *__pyx_kp_u_The_first_element_in_a_sequence;
static PyObject *__pyx_kp_u_The_first_n_elements_of_a_seque;
static PyObject *__pyx_kp_u_The_last_element_in_a_sequence;
static PyObject *__pyx_kp_u_The_last_n_elements_of_a_sequen;
static PyObject *__pyx_kp_u_The_nth_element_in_a_sequence_n;
static PyObject *__pyx_kp_u_The_second_element_in_a_sequenc;
static PyObject *__pyx_kp_u_The_sequence_following_the_firs;
static PyObject *__pyx_kp_u_Too_few_sequences_given_min_2_re;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_kp_u_Variadic_version_of_concat_list;
static PyObject *__pyx_n_s_accumulate;
static PyObject *__pyx_n_u_accumulate;
static PyObject *__pyx_n_s_accumulate___reduce_cython;
static PyObject *__pyx_n_s_accumulate___setstate_cython;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_n_s_binop;
static PyObject *__pyx_n_s_chain;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_concat;
static PyObject *__pyx_n_u_concat;
static PyObject *__pyx_kp_u_concat_line_695;
static PyObject *__pyx_n_s_concatv;
static PyObject *__pyx_n_u_concatv;
static PyObject *__pyx_kp_u_concatv_line_714;
static PyObject *__pyx_n_s_cons;
static PyObject *__pyx_n_u_cons;
static PyObject *__pyx_kp_u_cons_line_738;
static PyObject *__pyx_n_s_count;
static PyObject *__pyx_n_u_count;
static PyObject *__pyx_n_s_cytoolz_itertoolz;
static PyObject *__pyx_kp_s_cytoolz_itertoolz_pyx;
static PyObject *__pyx_n_s_cytoolz_utils;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_u_default;
static PyObject *__pyx_n_s_deque;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_2;
static PyObject *__pyx_n_s_diff;
static PyObject *__pyx_n_u_diff;
static PyObject *__pyx_n_s_diff_identity;
static PyObject *__pyx_n_s_diff_identity___reduce_cython;
static PyObject *__pyx_n_s_diff_identity___setstate_cython;
static PyObject *__pyx_n_s_diff_key;
static PyObject *__pyx_n_s_diff_key___reduce_cython;
static PyObject *__pyx_n_s_diff_key___setstate_cython;
static PyObject *__pyx_kp_u_diff_line_1623;
static PyObject *__pyx_n_s_drop;
static PyObject *__pyx_n_u_drop;
static PyObject *__pyx_kp_u_drop_line_515;
static PyObject *__pyx_n_s_el;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_fillvalue;
static PyObject *__pyx_n_s_first;
static PyObject *__pyx_n_u_first;
static PyObject *__pyx_kp_u_first_line_549;
static PyObject *__pyx_n_s_frequencies;
static PyObject *__pyx_n_u_frequencies;
static PyObject *__pyx_kp_u_frequencies_line_778;
static PyObject *__pyx_n_s_from_iterable;
static PyObject *__pyx_n_s_func;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_u_get;
static PyObject *__pyx_kp_u_get_line_617;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_getter;
static PyObject *__pyx_n_s_getter_index;
static PyObject *__pyx_n_s_getter_index___reduce_cython;
static PyObject *__pyx_n_s_getter_index___setstate_cython;
static PyObject *__pyx_n_s_getter_list;
static PyObject *__pyx_n_s_getter_list___reduce_cython;
static PyObject *__pyx_n_s_getter_list___setstate_cython;
static PyObject *__pyx_n_s_getter_null;
static PyObject *__pyx_n_s_getter_null___reduce_cython;
static PyObject *__pyx_n_s_getter_null___setstate_cython;
static PyObject *__pyx_n_s_groupby;
static PyObject *__pyx_n_u_groupby;
static PyObject *__pyx_kp_u_groupby_line_116;
static PyObject *__pyx_n_s_heapify;
static PyObject *__pyx_n_s_heappop;
static PyObject *__pyx_n_s_heapq;
static PyObject *__pyx_n_s_heapreplace;
static PyObject *__pyx_n_s_identity;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_ind;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_initial;
static PyObject *__pyx_n_s_inner_join;
static PyObject *__pyx_n_s_inner_join___reduce_cython;
static PyObject *__pyx_n_s_inner_join___setstate_cython;
static PyObject *__pyx_n_s_inner_join_index;
static PyObject *__pyx_n_s_inner_join_index___reduce_cytho;
static PyObject *__pyx_n_s_inner_join_index___setstate_cyt;
static PyObject *__pyx_n_s_inner_join_indices;
static PyObject *__pyx_n_s_inner_join_indices___reduce_cyt;
static PyObject *__pyx_n_s_inner_join_indices___setstate_c;
static PyObject *__pyx_n_s_inner_join_key;
static PyObject *__pyx_n_s_inner_join_key___reduce_cython;
static PyObject *__pyx_n_s_inner_join_key___setstate_cytho;
static PyObject *__pyx_n_s_interleave;
static PyObject *__pyx_n_u_interleave;
static PyObject *__pyx_n_s_interleave___reduce_cython;
static PyObject *__pyx_n_s_interleave___setstate_cython;
static PyObject *__pyx_n_s_interpose;
static PyObject *__pyx_n_u_interpose;
static PyObject *__pyx_n_s_interpose___reduce_cython;
static PyObject *__pyx_n_s_interpose___setstate_cython;
static PyObject *__pyx_n_s_isdistinct;
static PyObject *__pyx_n_u_isdistinct;
static PyObject *__pyx_kp_u_isdistinct_line_460;
static PyObject *__pyx_n_s_isiterable;
static PyObject *__pyx_n_u_isiterable;
static PyObject *__pyx_kp_u_isiterable_line_441;
static PyObject *__pyx_n_s_islice;
static PyObject *__pyx_n_s_itemgetter;
static PyObject *__pyx_n_s_iterate;
static PyObject *__pyx_n_u_iterate;
static PyObject *__pyx_n_s_iterate___reduce_cython;
static PyObject *__pyx_n_s_iterate___setstate_cython;
static PyObject *__pyx_n_s_itertools;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_join_2;
static PyObject *__pyx_n_u_join_2;
static PyObject *__pyx_n_s_join___reduce_cython;
static PyObject *__pyx_n_s_join___setstate_cython;
static PyObject *__pyx_kp_u_join_line_1250;
static PyObject *__pyx_n_s_k;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_u_key;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_last;
static PyObject *__pyx_n_u_last;
static PyObject *__pyx_kp_u_last_line_589;
static PyObject *__pyx_n_s_left_default;
static PyObject *__pyx_n_s_left_outer_join;
static PyObject *__pyx_n_s_left_outer_join___reduce_cython;
static PyObject *__pyx_n_s_left_outer_join___setstate_cyth;
static PyObject *__pyx_n_s_left_outer_join_index;
static PyObject *__pyx_n_s_left_outer_join_index___reduce;
static PyObject *__pyx_n_s_left_outer_join_index___setstat;
static PyObject *__pyx_n_s_left_outer_join_indices;
static PyObject *__pyx_n_s_left_outer_join_indices___reduc;
static PyObject *__pyx_n_s_left_outer_join_indices___setst;
static PyObject *__pyx_n_s_left_outer_join_key;
static PyObject *__pyx_n_s_left_outer_join_key___reduce_cy;
static PyObject *__pyx_n_s_left_outer_join_key___setstate;
static PyObject *__pyx_n_s_leftkey;
static PyObject *__pyx_n_s_leftseq;
static PyObject *__pyx_n_u_len;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_map;
static PyObject *__pyx_n_s_mapcat;
static PyObject *__pyx_n_u_mapcat;
static PyObject *__pyx_kp_u_mapcat_line_727;
static PyObject *__pyx_n_s_max;
static PyObject *__pyx_n_s_merge_sorted;
static PyObject *__pyx_n_s_merge_sorted_2;
static PyObject *__pyx_n_u_merge_sorted_2;
static PyObject *__pyx_n_s_merge_sorted___reduce_cython;
static PyObject *__pyx_n_s_merge_sorted___setstate_cython;
static PyObject *__pyx_n_s_merge_sorted_key;
static PyObject *__pyx_n_s_merge_sorted_key___reduce_cytho;
static PyObject *__pyx_n_s_merge_sorted_key___setstate_cyt;
static PyObject *__pyx_kp_u_merge_sorted_line_293;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_kp_u_n_argument_for_drop_must_be_non;
static PyObject *__pyx_kp_u_n_must_be_positive_when_indexin;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_u_no__default;
static PyObject *__pyx_n_u_no__pad;
static PyObject *__pyx_n_s_no_default;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_no_pad;
static PyObject *__pyx_n_s_nth;
static PyObject *__pyx_n_u_nth;
static PyObject *__pyx_kp_u_nth_line_571;
static PyObject *__pyx_n_s_operator;
static PyObject *__pyx_n_s_outer_join;
static PyObject *__pyx_n_s_outer_join___reduce_cython;
static PyObject *__pyx_n_s_outer_join___setstate_cython;
static PyObject *__pyx_n_s_outer_join_index;
static PyObject *__pyx_n_s_outer_join_index___reduce_cytho;
static PyObject *__pyx_n_s_outer_join_index___setstate_cyt;
static PyObject *__pyx_n_s_outer_join_indices;
static PyObject *__pyx_n_s_outer_join_indices___reduce_cyt;
static PyObject *__pyx_n_s_outer_join_indices___setstate_c;
static PyObject *__pyx_n_s_outer_join_key;
static PyObject *__pyx_n_s_outer_join_key___reduce_cython;
static PyObject *__pyx_n_s_outer_join_key___setstate_cytho;
static PyObject *__pyx_n_s_pad;
static PyObject *__pyx_n_s_partition;
static PyObject *__pyx_n_u_partition;
static PyObject *__pyx_n_s_partition_all;
static PyObject *__pyx_n_u_partition_all;
static PyObject *__pyx_n_s_partition_all___reduce_cython;
static PyObject *__pyx_n_s_partition_all___setstate_cython;
static PyObject *__pyx_kp_u_partition_line_995;
static PyObject *__pyx_n_s_peek;
static PyObject *__pyx_n_u_peek;
static PyObject *__pyx_kp_u_peek_line_1721;
static PyObject *__pyx_n_s_peekn;
static PyObject *__pyx_n_u_peekn;
static PyObject *__pyx_kp_u_peekn_line_1740;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_pluck;
static PyObject *__pyx_n_u_pluck;
static PyObject *__pyx_n_s_pluck_index;
static PyObject *__pyx_n_s_pluck_index___reduce_cython;
static PyObject *__pyx_n_s_pluck_index___setstate_cython;
static PyObject *__pyx_n_s_pluck_index_default;
static PyObject *__pyx_n_s_pluck_index_default___reduce_cy;
static PyObject *__pyx_n_s_pluck_index_default___setstate;
static PyObject *__pyx_kp_u_pluck_line_1174;
static PyObject *__pyx_n_s_pluck_list;
static PyObject *__pyx_n_s_pluck_list___reduce_cython;
static PyObject *__pyx_n_s_pluck_list___setstate_cython;
static PyObject *__pyx_n_s_pluck_list_default;
static PyObject *__pyx_n_s_pluck_list_default___reduce_cyt;
static PyObject *__pyx_n_s_pluck_list_default___setstate_c;
static PyObject *__pyx_kp_u_plucks_an_element_or_several_el;
static PyObject *__pyx_n_s_predicate;
static PyObject *__pyx_n_s_prob;
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__getter_null;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_random;
static PyObject *__pyx_n_u_random;
static PyObject *__pyx_n_s_random_sample;
static PyObject *__pyx_n_u_random_sample;
static PyObject *__pyx_n_s_random_sample___reduce_cython;
static PyObject *__pyx_n_s_random_sample___setstate_cython;
static PyObject *__pyx_n_s_random_state;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_reduceby;
static PyObject *__pyx_n_u_reduceby;
static PyObject *__pyx_kp_u_reduceby_line_815;
static PyObject *__pyx_n_s_remove;
static PyObject *__pyx_n_u_remove;
static PyObject *__pyx_n_s_remove___reduce_cython;
static PyObject *__pyx_n_s_remove___setstate_cython;
static PyObject *__pyx_n_s_rest;
static PyObject *__pyx_n_s_reverse;
static PyObject *__pyx_n_s_right_default;
static PyObject *__pyx_n_s_right_outer_join;
static PyObject *__pyx_n_s_right_outer_join___reduce_cytho;
static PyObject *__pyx_n_s_right_outer_join___setstate_cyt;
static PyObject *__pyx_n_s_right_outer_join_index;
static PyObject *__pyx_n_s_right_outer_join_index___reduce;
static PyObject *__pyx_n_s_right_outer_join_index___setsta;
static PyObject *__pyx_n_s_right_outer_join_indices;
static PyObject *__pyx_n_s_right_outer_join_indices___redu;
static PyObject *__pyx_n_s_right_outer_join_indices___sets;
static PyObject *__pyx_n_s_right_outer_join_key;
static PyObject *__pyx_n_s_right_outer_join_key___reduce_c;
static PyObject *__pyx_n_s_right_outer_join_key___setstate;
static PyObject *__pyx_n_s_rightkey;
static PyObject *__pyx_n_s_rightseq;
static PyObject *__pyx_n_s_second;
static PyObject *__pyx_n_u_second;
static PyObject *__pyx_kp_u_second_line_559;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_seq;
static PyObject *__pyx_n_s_seq1;
static PyObject *__pyx_n_s_seq2;
static PyObject *__pyx_n_s_seqs;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_sliding_window;
static PyObject *__pyx_n_u_sliding_window;
static PyObject *__pyx_n_s_sliding_window___reduce_cython;
static PyObject *__pyx_n_s_sliding_window___setstate_cython;
static PyObject *__pyx_n_s_sort;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_tail;
static PyObject *__pyx_n_u_tail;
static PyObject *__pyx_kp_u_tail_line_499;
static PyObject *__pyx_n_s_take;
static PyObject *__pyx_n_u_take;
static PyObject *__pyx_kp_u_take_line_485;
static PyObject *__pyx_n_s_take_nth;
static PyObject *__pyx_n_u_take_nth;
static PyObject *__pyx_kp_u_take_nth_line_539;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_topk;
static PyObject *__pyx_n_u_topk;
static PyObject *__pyx_kp_u_topk_line_1649;
static PyObject *__pyx_n_s_unique;
static PyObject *__pyx_n_u_unique;
static PyObject *__pyx_n_s_unique_identity;
static PyObject *__pyx_n_s_unique_identity___reduce_cython;
static PyObject *__pyx_n_s_unique_identity___setstate_cyth;
static PyObject *__pyx_n_s_unique_key;
static PyObject *__pyx_n_s_unique_key___reduce_cython;
static PyObject *__pyx_n_s_unique_key___setstate_cython;
static PyObject *__pyx_kp_u_unique_line_421;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_use_setstate;
static PyObject *__pyx_n_s_val2;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_n_s_zip_longest;
static PyObject *__pyx_pf_7cytoolz_9itertoolz_identity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_6remove___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_remove *__pyx_v_self, PyObject *__pyx_v_predicate, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_6remove_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_remove *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_6remove_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_remove *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_6remove_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_remove *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_6remove_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_remove *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_10accumulate___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_accumulate *__pyx_v_self, PyObject *__pyx_v_binop, PyObject *__pyx_v_seq, PyObject *__pyx_v_initial); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_10accumulate_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_accumulate *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_10accumulate_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_accumulate *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_10accumulate_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_accumulate *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_10accumulate_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_accumulate *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_2groupby(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_key, PyObject *__pyx_v_seq); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_13_merge_sorted___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *__pyx_v_self, PyObject *__pyx_v_seq1, PyObject *__pyx_v_seq2, PyObject *__pyx_v_val2); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *__pyx_v_self, PyObject *__pyx_v_seq1, PyObject *__pyx_v_seq2, PyObject *__pyx_v_val2, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_4merge_sorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seqs, PyObject *__pyx_v_kwargs); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_10interleave___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_interleave *__pyx_v_self, PyObject *__pyx_v_seqs); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_10interleave_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_interleave *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_10interleave_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_interleave *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_10interleave_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_interleave *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_10interleave_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_interleave *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_11_unique_key___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__unique_key *__pyx_v_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_unique_key_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__unique_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_unique_key_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__unique_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_unique_key_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__unique_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_unique_key_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__unique_key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_16_unique_identity___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *__pyx_v_self, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_unique_identity_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_unique_identity_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_unique_identity_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_unique_identity_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_6unique(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_8isiterable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_10isdistinct(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12take(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_14tail(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_16drop(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_18take_nth(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_20first(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_22second(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_24nth(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_26last(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_28rest(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_30get(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seq, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_32concat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seqs); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_34concatv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seqs); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_36mapcat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_seqs); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_38cons(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_el, PyObject *__pyx_v_seq); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_9interpose___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_interpose *__pyx_v_self, PyObject *__pyx_v_el, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_9interpose_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_interpose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_9interpose_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_interpose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_9interpose_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_interpose *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_9interpose_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_interpose *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_40frequencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_42reduceby(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_key, PyObject *__pyx_v_binop, PyObject *__pyx_v_seq, PyObject *__pyx_v_init); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_7iterate___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_iterate *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_7iterate_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_iterate *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_7iterate_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_iterate *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_7iterate_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_iterate *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_7iterate_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_iterate *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_14sliding_window___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *__pyx_v_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_14sliding_window_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_14sliding_window_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_14sliding_window_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_14sliding_window_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_44partition(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq, PyObject *__pyx_v_pad); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_13partition_all___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_partition_all *__pyx_v_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13partition_all_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_partition_all *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13partition_all_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_partition_all *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13partition_all_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_partition_all *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13partition_all_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_partition_all *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_46count(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_12_pluck_index___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *__pyx_v_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_pluck_index_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_pluck_index_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_pluck_index_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_pluck_index_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *__pyx_v_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_11_pluck_list___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *__pyx_v_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_pluck_list_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_pluck_list_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_pluck_list_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_pluck_list_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *__pyx_v_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_48pluck(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs, PyObject *__pyx_v_default); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_13_getter_index___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__getter_index *__pyx_v_self, PyObject *__pyx_v_ind); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_getter_index_2__call__(struct __pyx_obj_7cytoolz_9itertoolz__getter_index *__pyx_v_self, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_getter_index_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__getter_index *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_getter_index_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__getter_index *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_12_getter_list___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__getter_list *__pyx_v_self, PyObject *__pyx_v_ind); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_list_2__call__(struct __pyx_obj_7cytoolz_9itertoolz__getter_list *__pyx_v_self, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_list_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__getter_list *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_list_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__getter_list *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_null___call__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__getter_null *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_null_2__reduce_cython__(struct __pyx_obj_7cytoolz_9itertoolz__getter_null *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_null_4__setstate_cython__(struct __pyx_obj_7cytoolz_9itertoolz__getter_null *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_50getter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_52join(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_leftkey, PyObject *__pyx_v_leftseq, PyObject *__pyx_v_rightkey, PyObject *__pyx_v_rightseq, PyObject *__pyx_v_left_default, PyObject *__pyx_v_right_default); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_5_join___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__join *__pyx_v_self, PyObject *__pyx_v_leftkey, PyObject *__pyx_v_leftseq, PyObject *__pyx_v_rightkey, PyObject *__pyx_v_rightseq, PyObject *__pyx_v_left_default, PyObject *__pyx_v_right_default); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_5_join_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__join *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_5_join_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__join *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_5_join_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__join *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_right_outer_join___next__(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_right_outer_join_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_right_outer_join_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_21_right_outer_join_key___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_21_right_outer_join_key_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_23_right_outer_join_index___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_23_right_outer_join_index_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_25_right_outer_join_indices___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_25_right_outer_join_indices_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_outer_join___next__(struct __pyx_obj_7cytoolz_9itertoolz__outer_join *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_outer_join_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_outer_join_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_15_outer_join_key___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_15_outer_join_key_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_outer_join_index___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_outer_join_index_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_outer_join_indices___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_outer_join_indices_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_left_outer_join___next__(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_left_outer_join_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_left_outer_join_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_left_outer_join_key___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_left_outer_join_key_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_22_left_outer_join_index___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_22_left_outer_join_index_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_24_left_outer_join_indices___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_24_left_outer_join_indices_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_inner_join___next__(struct __pyx_obj_7cytoolz_9itertoolz__inner_join *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_inner_join_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_inner_join_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_15_inner_join_key___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_15_inner_join_key_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_inner_join_index___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_inner_join_index_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_inner_join_indices___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_inner_join_indices_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_9_diff_key___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__diff_key *__pyx_v_self, PyObject *__pyx_v_seqs, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_9_diff_key_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__diff_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_9_diff_key_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__diff_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_9_diff_key_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__diff_key *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_9_diff_key_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__diff_key *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_14_diff_identity___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *__pyx_v_self, PyObject *__pyx_v_seqs, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_14_diff_identity_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_14_diff_identity_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_14_diff_identity_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_14_diff_identity_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_54diff(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seqs, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_56topk(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_k, PyObject *__pyx_v_seq, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_58peek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_60peekn(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq); /* proto */
static int __pyx_pf_7cytoolz_9itertoolz_13random_sample___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_random_sample *__pyx_v_self, PyObject *__pyx_v_prob, PyObject *__pyx_v_seq, PyObject *__pyx_v_random_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13random_sample_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_random_sample *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13random_sample_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_random_sample *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13random_sample_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_random_sample *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_13random_sample_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_random_sample *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7cytoolz_9itertoolz_62__pyx_unpickle__getter_null(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_7cytoolz_9itertoolz_remove(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz_accumulate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__merge_sorted(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__merge_sorted_key(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz_interleave(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__unique_key(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__unique_identity(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz_interpose(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz_iterate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz_sliding_window(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz_partition_all(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__pluck_index(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__pluck_index_default(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__pluck_list(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__pluck_list_default(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__getter_index(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__getter_list(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__getter_null(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__join(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__inner_join(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__right_outer_join(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__left_outer_join(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__outer_join(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__inner_join_key(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__inner_join_index(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__inner_join_indices(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__right_outer_join_key(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__right_outer_join_index(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__right_outer_join_indices(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__left_outer_join_key(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__left_outer_join_index(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__left_outer_join_indices(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__outer_join_key(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__outer_join_index(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__outer_join_indices(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__diff_key(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__diff_identity(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7cytoolz_9itertoolz_random_sample(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_222419149;
static PyObject *__pyx_int_228825662;
static PyObject *__pyx_int_238750788;
static PyObject *__pyx_k__37;
static PyObject *__pyx_k__38;
static PyObject *__pyx_k__73;
static PyObject *__pyx_k__77;
static PyObject *__pyx_k__80;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__83;
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_tuple__100;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__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_tuple__140;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__144;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__150;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__154;
static PyObject *__pyx_tuple__156;
static PyObject *__pyx_tuple__158;
static PyObject *__pyx_tuple__160;
static PyObject *__pyx_tuple__162;
static PyObject *__pyx_tuple__164;
static PyObject *__pyx_tuple__166;
static PyObject *__pyx_tuple__168;
static PyObject *__pyx_tuple__170;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__182;
static PyObject *__pyx_tuple__184;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__194;
static PyObject *__pyx_tuple__196;
static PyObject *__pyx_tuple__198;
static PyObject *__pyx_tuple__200;
static PyObject *__pyx_tuple__202;
static PyObject *__pyx_tuple__204;
static PyObject *__pyx_tuple__206;
static PyObject *__pyx_tuple__208;
static PyObject *__pyx_tuple__210;
static PyObject *__pyx_tuple__212;
static PyObject *__pyx_tuple__214;
static PyObject *__pyx_tuple__216;
static PyObject *__pyx_tuple__218;
static PyObject *__pyx_tuple__220;
static PyObject *__pyx_tuple__222;
static PyObject *__pyx_tuple__224;
static PyObject *__pyx_tuple__226;
static PyObject *__pyx_tuple__228;
static PyObject *__pyx_tuple__230;
static PyObject *__pyx_tuple__232;
static PyObject *__pyx_tuple__234;
static PyObject *__pyx_tuple__236;
static PyObject *__pyx_tuple__238;
static PyObject *__pyx_tuple__240;
static PyObject *__pyx_tuple__242;
static PyObject *__pyx_tuple__244;
static PyObject *__pyx_tuple__246;
static PyObject *__pyx_tuple__248;
static PyObject *__pyx_tuple__250;
static PyObject *__pyx_tuple__252;
static PyObject *__pyx_tuple__254;
static PyObject *__pyx_tuple__256;
static PyObject *__pyx_tuple__258;
static PyObject *__pyx_tuple__260;
static PyObject *__pyx_tuple__262;
static PyObject *__pyx_tuple__264;
static PyObject *__pyx_tuple__266;
static PyObject *__pyx_tuple__268;
static PyObject *__pyx_tuple__270;
static PyObject *__pyx_tuple__272;
static PyObject *__pyx_tuple__274;
static PyObject *__pyx_tuple__276;
static PyObject *__pyx_tuple__278;
static PyObject *__pyx_tuple__280;
static PyObject *__pyx_tuple__282;
static PyObject *__pyx_tuple__284;
static PyObject *__pyx_tuple__286;
static PyObject *__pyx_tuple__288;
static PyObject *__pyx_tuple__290;
static PyObject *__pyx_tuple__292;
static PyObject *__pyx_tuple__294;
static PyObject *__pyx_tuple__296;
static PyObject *__pyx_tuple__298;
static PyObject *__pyx_tuple__300;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__99;
static PyObject *__pyx_codeobj__101;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__105;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__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;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__145;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__153;
static PyObject *__pyx_codeobj__155;
static PyObject *__pyx_codeobj__157;
static PyObject *__pyx_codeobj__159;
static PyObject *__pyx_codeobj__161;
static PyObject *__pyx_codeobj__163;
static PyObject *__pyx_codeobj__165;
static PyObject *__pyx_codeobj__167;
static PyObject *__pyx_codeobj__169;
static PyObject *__pyx_codeobj__171;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__175;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__183;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__187;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__193;
static PyObject *__pyx_codeobj__195;
static PyObject *__pyx_codeobj__197;
static PyObject *__pyx_codeobj__199;
static PyObject *__pyx_codeobj__201;
static PyObject *__pyx_codeobj__203;
static PyObject *__pyx_codeobj__205;
static PyObject *__pyx_codeobj__207;
static PyObject *__pyx_codeobj__209;
static PyObject *__pyx_codeobj__211;
static PyObject *__pyx_codeobj__213;
static PyObject *__pyx_codeobj__215;
static PyObject *__pyx_codeobj__217;
static PyObject *__pyx_codeobj__219;
static PyObject *__pyx_codeobj__221;
static PyObject *__pyx_codeobj__223;
static PyObject *__pyx_codeobj__225;
static PyObject *__pyx_codeobj__227;
static PyObject *__pyx_codeobj__229;
static PyObject *__pyx_codeobj__231;
static PyObject *__pyx_codeobj__233;
static PyObject *__pyx_codeobj__235;
static PyObject *__pyx_codeobj__237;
static PyObject *__pyx_codeobj__239;
static PyObject *__pyx_codeobj__241;
static PyObject *__pyx_codeobj__243;
static PyObject *__pyx_codeobj__245;
static PyObject *__pyx_codeobj__247;
static PyObject *__pyx_codeobj__249;
static PyObject *__pyx_codeobj__251;
static PyObject *__pyx_codeobj__253;
static PyObject *__pyx_codeobj__255;
static PyObject *__pyx_codeobj__257;
static PyObject *__pyx_codeobj__259;
static PyObject *__pyx_codeobj__261;
static PyObject *__pyx_codeobj__263;
static PyObject *__pyx_codeobj__265;
static PyObject *__pyx_codeobj__267;
static PyObject *__pyx_codeobj__269;
static PyObject *__pyx_codeobj__271;
static PyObject *__pyx_codeobj__273;
static PyObject *__pyx_codeobj__275;
static PyObject *__pyx_codeobj__277;
static PyObject *__pyx_codeobj__279;
static PyObject *__pyx_codeobj__281;
static PyObject *__pyx_codeobj__283;
static PyObject *__pyx_codeobj__285;
static PyObject *__pyx_codeobj__287;
static PyObject *__pyx_codeobj__289;
static PyObject *__pyx_codeobj__291;
static PyObject *__pyx_codeobj__293;
static PyObject *__pyx_codeobj__295;
static PyObject *__pyx_codeobj__297;
static PyObject *__pyx_codeobj__299;
static PyObject *__pyx_codeobj__301;
/* Late includes */

/* "cytoolz/itertoolz.pyx":28
 * 
 * 
 * cpdef object identity(object x):             # <<<<<<<<<<<<<<
 *     return x
 * 
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_1identity(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_identity(PyObject *__pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("identity", 0);

  /* "cytoolz/itertoolz.pyx":29
 * 
 * cpdef object identity(object x):
 *     return x             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_x);
  __pyx_r = __pyx_v_x;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":28
 * 
 * 
 * cpdef object identity(object x):             # <<<<<<<<<<<<<<
 *     return x
 * 
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_1identity(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_identity[] = "identity(x)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_1identity = {"identity", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_1identity, METH_O, __pyx_doc_7cytoolz_9itertoolz_identity};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_1identity(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("identity (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_identity(__pyx_self, ((PyObject *)__pyx_v_x));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_identity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  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("identity", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_identity(__pyx_v_x, 0); 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("cytoolz.itertoolz.identity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":42
 *     [1, 3]
 *     """
 *     def __cinit__(self, object predicate, object seq):             # <<<<<<<<<<<<<<
 *         self.predicate = predicate
 *         self.iter_seq = iter(seq)
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_6remove_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_6remove_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_predicate = 0;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_predicate,&__pyx_n_s_seq,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_predicate)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 42, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 42, __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_predicate = values[0];
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 42, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.remove.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_6remove___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz_remove *)__pyx_v_self), __pyx_v_predicate, __pyx_v_seq);

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

static int __pyx_pf_7cytoolz_9itertoolz_6remove___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_remove *__pyx_v_self, PyObject *__pyx_v_predicate, PyObject *__pyx_v_seq) {
  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("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":43
 *     """
 *     def __cinit__(self, object predicate, object seq):
 *         self.predicate = predicate             # <<<<<<<<<<<<<<
 *         self.iter_seq = iter(seq)
 * 
 */
  __Pyx_INCREF(__pyx_v_predicate);
  __Pyx_GIVEREF(__pyx_v_predicate);
  __Pyx_GOTREF(__pyx_v_self->predicate);
  __Pyx_DECREF(__pyx_v_self->predicate);
  __pyx_v_self->predicate = __pyx_v_predicate;

  /* "cytoolz/itertoolz.pyx":44
 *     def __cinit__(self, object predicate, object seq):
 *         self.predicate = predicate
 *         self.iter_seq = iter(seq)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iter_seq);
  __Pyx_DECREF(__pyx_v_self->iter_seq);
  __pyx_v_self->iter_seq = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":42
 *     [1, 3]
 *     """
 *     def __cinit__(self, object predicate, object seq):             # <<<<<<<<<<<<<<
 *         self.predicate = predicate
 *         self.iter_seq = iter(seq)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.remove.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":46
 *         self.iter_seq = iter(seq)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_6remove_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_6remove_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_6remove_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz_remove *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_6remove_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_remove *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":47
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":46
 *         self.iter_seq = iter(seq)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":49
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef object val
 *         val = next(self.iter_seq)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_6remove_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_6remove_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_6remove_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz_remove *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_6remove_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_remove *__pyx_v_self) {
  PyObject *__pyx_v_val = 0;
  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("__next__", 0);

  /* "cytoolz/itertoolz.pyx":51
 *     def __next__(self):
 *         cdef object val
 *         val = next(self.iter_seq)             # <<<<<<<<<<<<<<
 *         while self.predicate(val):
 *             val = next(self.iter_seq)
 */
  __pyx_t_1 = __pyx_v_self->iter_seq;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_val = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":52
 *         cdef object val
 *         val = next(self.iter_seq)
 *         while self.predicate(val):             # <<<<<<<<<<<<<<
 *             val = next(self.iter_seq)
 *         return val
 */
  while (1) {
    __Pyx_INCREF(__pyx_v_self->predicate);
    __pyx_t_1 = __pyx_v_self->predicate; __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_val) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_val);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_4) break;

    /* "cytoolz/itertoolz.pyx":53
 *         val = next(self.iter_seq)
 *         while self.predicate(val):
 *             val = next(self.iter_seq)             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
    __pyx_t_2 = __pyx_v_self->iter_seq;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;
  }

  /* "cytoolz/itertoolz.pyx":54
 *         while self.predicate(val):
 *             val = next(self.iter_seq)
 *         return val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_val);
  __pyx_r = __pyx_v_val;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":49
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef object val
 *         val = next(self.iter_seq)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz.remove.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_6remove_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_6remove_6__reduce_cython__[] = "remove.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_6remove_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_6remove_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_6remove_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_6remove_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_6remove_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_remove *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_6remove_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_remove *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.remove.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_6remove_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_6remove_8__setstate_cython__[] = "remove.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_6remove_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_6remove_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_6remove_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_6remove_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_6remove_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_remove *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_6remove_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_remove *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.remove.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":86
 *         itertools.accumulate :  In standard itertools for Python 3.2+
 *     """
 *     def __cinit__(self, object binop, object seq, object initial='__no__default__'):             # <<<<<<<<<<<<<<
 *         self.binop = binop
 *         self.iter_seq = iter(seq)
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_10accumulate_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_10accumulate_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_binop = 0;
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_v_initial = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_binop,&__pyx_n_s_seq,&__pyx_n_s_initial,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_n_u_no__default);
    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_binop)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 86, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 86, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_binop = values[0];
    __pyx_v_seq = values[1];
    __pyx_v_initial = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 86, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.accumulate.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10accumulate___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz_accumulate *)__pyx_v_self), __pyx_v_binop, __pyx_v_seq, __pyx_v_initial);

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

static int __pyx_pf_7cytoolz_9itertoolz_10accumulate___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_accumulate *__pyx_v_self, PyObject *__pyx_v_binop, PyObject *__pyx_v_seq, PyObject *__pyx_v_initial) {
  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("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":87
 *     """
 *     def __cinit__(self, object binop, object seq, object initial='__no__default__'):
 *         self.binop = binop             # <<<<<<<<<<<<<<
 *         self.iter_seq = iter(seq)
 *         self.result = self  # sentinel
 */
  __Pyx_INCREF(__pyx_v_binop);
  __Pyx_GIVEREF(__pyx_v_binop);
  __Pyx_GOTREF(__pyx_v_self->binop);
  __Pyx_DECREF(__pyx_v_self->binop);
  __pyx_v_self->binop = __pyx_v_binop;

  /* "cytoolz/itertoolz.pyx":88
 *     def __cinit__(self, object binop, object seq, object initial='__no__default__'):
 *         self.binop = binop
 *         self.iter_seq = iter(seq)             # <<<<<<<<<<<<<<
 *         self.result = self  # sentinel
 *         self.initial = initial
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iter_seq);
  __Pyx_DECREF(__pyx_v_self->iter_seq);
  __pyx_v_self->iter_seq = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":89
 *         self.binop = binop
 *         self.iter_seq = iter(seq)
 *         self.result = self  # sentinel             # <<<<<<<<<<<<<<
 *         self.initial = initial
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_self->result);
  __Pyx_DECREF(__pyx_v_self->result);
  __pyx_v_self->result = ((PyObject *)__pyx_v_self);

  /* "cytoolz/itertoolz.pyx":90
 *         self.iter_seq = iter(seq)
 *         self.result = self  # sentinel
 *         self.initial = initial             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_INCREF(__pyx_v_initial);
  __Pyx_GIVEREF(__pyx_v_initial);
  __Pyx_GOTREF(__pyx_v_self->initial);
  __Pyx_DECREF(__pyx_v_self->initial);
  __pyx_v_self->initial = __pyx_v_initial;

  /* "cytoolz/itertoolz.pyx":86
 *         itertools.accumulate :  In standard itertools for Python 3.2+
 *     """
 *     def __cinit__(self, object binop, object seq, object initial='__no__default__'):             # <<<<<<<<<<<<<<
 *         self.binop = binop
 *         self.iter_seq = iter(seq)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.accumulate.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":92
 *         self.initial = initial
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10accumulate_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10accumulate_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10accumulate_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz_accumulate *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_10accumulate_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_accumulate *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":93
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":92
 *         self.initial = initial
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":95
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.result is self:
 *             if self.initial != no_default:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10accumulate_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10accumulate_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10accumulate_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz_accumulate *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_10accumulate_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_accumulate *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":96
 * 
 *     def __next__(self):
 *         if self.result is self:             # <<<<<<<<<<<<<<
 *             if self.initial != no_default:
 *                 self.result = self.initial
 */
  __pyx_t_1 = (__pyx_v_self->result == ((PyObject *)__pyx_v_self));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":97
 *     def __next__(self):
 *         if self.result is self:
 *             if self.initial != no_default:             # <<<<<<<<<<<<<<
 *                 self.result = self.initial
 *             else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_no_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->initial, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 97, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":98
 *         if self.result is self:
 *             if self.initial != no_default:
 *                 self.result = self.initial             # <<<<<<<<<<<<<<
 *             else:
 *                 self.result = next(self.iter_seq)
 */
      __pyx_t_4 = __pyx_v_self->initial;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_v_self->result);
      __Pyx_DECREF(__pyx_v_self->result);
      __pyx_v_self->result = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cytoolz/itertoolz.pyx":97
 *     def __next__(self):
 *         if self.result is self:
 *             if self.initial != no_default:             # <<<<<<<<<<<<<<
 *                 self.result = self.initial
 *             else:
 */
      goto __pyx_L4;
    }

    /* "cytoolz/itertoolz.pyx":100
 *                 self.result = self.initial
 *             else:
 *                 self.result = next(self.iter_seq)             # <<<<<<<<<<<<<<
 *         else:
 *             self.result = self.binop(self.result, next(self.iter_seq))
 */
    /*else*/ {
      __pyx_t_4 = __pyx_v_self->iter_seq;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyIter_Next(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_v_self->result);
      __Pyx_DECREF(__pyx_v_self->result);
      __pyx_v_self->result = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L4:;

    /* "cytoolz/itertoolz.pyx":96
 * 
 *     def __next__(self):
 *         if self.result is self:             # <<<<<<<<<<<<<<
 *             if self.initial != no_default:
 *                 self.result = self.initial
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":102
 *                 self.result = next(self.iter_seq)
 *         else:
 *             self.result = self.binop(self.result, next(self.iter_seq))             # <<<<<<<<<<<<<<
 *         return self.result
 * 
 */
  /*else*/ {
    __pyx_t_4 = __pyx_v_self->iter_seq;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_v_self->binop);
    __pyx_t_4 = __pyx_v_self->binop; __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self->result, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self->result, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_self->result);
      __Pyx_GIVEREF(__pyx_v_self->result);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->result);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->result);
    __Pyx_DECREF(__pyx_v_self->result);
    __pyx_v_self->result = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "cytoolz/itertoolz.pyx":103
 *         else:
 *             self.result = self.binop(self.result, next(self.iter_seq))
 *         return self.result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->result);
  __pyx_r = __pyx_v_self->result;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":95
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.result is self:
 *             if self.initial != no_default:
 */

  /* 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_8);
  __Pyx_AddTraceback("cytoolz.itertoolz.accumulate.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10accumulate_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_10accumulate_6__reduce_cython__[] = "accumulate.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_10accumulate_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_10accumulate_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_10accumulate_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10accumulate_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10accumulate_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_accumulate *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_10accumulate_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_accumulate *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.accumulate.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10accumulate_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_10accumulate_8__setstate_cython__[] = "accumulate.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_10accumulate_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_10accumulate_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_10accumulate_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10accumulate_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10accumulate_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_accumulate *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_10accumulate_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_accumulate *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.accumulate.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":106
 * 
 * 
 * cdef inline object _groupby_core(dict d, object key, object item):             # <<<<<<<<<<<<<<
 *     cdef PyObject *obj = PyDict_GetItem(d, key)
 *     if obj is NULL:
 */

static CYTHON_INLINE PyObject *__pyx_f_7cytoolz_9itertoolz__groupby_core(PyObject *__pyx_v_d, PyObject *__pyx_v_key, PyObject *__pyx_v_item) {
  PyObject *__pyx_v_obj;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_groupby_core", 0);

  /* "cytoolz/itertoolz.pyx":107
 * 
 * cdef inline object _groupby_core(dict d, object key, object item):
 *     cdef PyObject *obj = PyDict_GetItem(d, key)             # <<<<<<<<<<<<<<
 *     if obj is NULL:
 *         val = []
 */
  __pyx_v_obj = PyDict_GetItem(__pyx_v_d, __pyx_v_key);

  /* "cytoolz/itertoolz.pyx":108
 * cdef inline object _groupby_core(dict d, object key, object item):
 *     cdef PyObject *obj = PyDict_GetItem(d, key)
 *     if obj is NULL:             # <<<<<<<<<<<<<<
 *         val = []
 *         PyList_Append(val, item)
 */
  __pyx_t_1 = ((__pyx_v_obj == NULL) != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":109
 *     cdef PyObject *obj = PyDict_GetItem(d, key)
 *     if obj is NULL:
 *         val = []             # <<<<<<<<<<<<<<
 *         PyList_Append(val, item)
 *         PyDict_SetItem(d, key, val)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_val = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":110
 *     if obj is NULL:
 *         val = []
 *         PyList_Append(val, item)             # <<<<<<<<<<<<<<
 *         PyDict_SetItem(d, key, val)
 *     else:
 */
    __pyx_t_3 = PyList_Append(__pyx_v_val, __pyx_v_item); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 110, __pyx_L1_error)

    /* "cytoolz/itertoolz.pyx":111
 *         val = []
 *         PyList_Append(val, item)
 *         PyDict_SetItem(d, key, val)             # <<<<<<<<<<<<<<
 *     else:
 *         PyList_Append(<object>obj, item)
 */
    __pyx_t_3 = PyDict_SetItem(__pyx_v_d, __pyx_v_key, __pyx_v_val); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 111, __pyx_L1_error)

    /* "cytoolz/itertoolz.pyx":108
 * cdef inline object _groupby_core(dict d, object key, object item):
 *     cdef PyObject *obj = PyDict_GetItem(d, key)
 *     if obj is NULL:             # <<<<<<<<<<<<<<
 *         val = []
 *         PyList_Append(val, item)
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":113
 *         PyDict_SetItem(d, key, val)
 *     else:
 *         PyList_Append(<object>obj, item)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_obj), __pyx_v_item); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 113, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cytoolz/itertoolz.pyx":106
 * 
 * 
 * cdef inline object _groupby_core(dict d, object key, object item):             # <<<<<<<<<<<<<<
 *     cdef PyObject *obj = PyDict_GetItem(d, key)
 *     if obj is NULL:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz._groupby_core", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":116
 * 
 * 
 * cpdef dict groupby(object key, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Group a collection by a key function
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_3groupby(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_groupby(PyObject *__pyx_v_key, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_v_keyval = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupby", 0);

  /* "cytoolz/itertoolz.pyx":142
 *         countby
 *     """
 *     cdef dict d = {}             # <<<<<<<<<<<<<<
 *     cdef object item, keyval
 *     cdef Py_ssize_t i, N
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_d = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":145
 *     cdef object item, keyval
 *     cdef Py_ssize_t i, N
 *     if callable(key):             # <<<<<<<<<<<<<<
 *         for item in seq:
 *             keyval = key(item)
 */
  __pyx_t_2 = __Pyx_PyCallable_Check(__pyx_v_key); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 145, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":146
 *     cdef Py_ssize_t i, N
 *     if callable(key):
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = key(item)
 *             _groupby_core(d, keyval, item)
 */
    if (likely(PyList_CheckExact(__pyx_v_seq)) || PyTuple_CheckExact(__pyx_v_seq)) {
      __pyx_t_1 = __pyx_v_seq; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_1);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 146, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cytoolz/itertoolz.pyx":147
 *     if callable(key):
 *         for item in seq:
 *             keyval = key(item)             # <<<<<<<<<<<<<<
 *             _groupby_core(d, keyval, item)
 *     elif isinstance(key, list):
 */
      __Pyx_INCREF(__pyx_v_key);
      __pyx_t_7 = __pyx_v_key; __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_item) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_item);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_keyval, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cytoolz/itertoolz.pyx":148
 *         for item in seq:
 *             keyval = key(item)
 *             _groupby_core(d, keyval, item)             # <<<<<<<<<<<<<<
 *     elif isinstance(key, list):
 *         N = PyList_GET_SIZE(key)
 */
      __pyx_t_6 = __pyx_f_7cytoolz_9itertoolz__groupby_core(__pyx_v_d, __pyx_v_keyval, __pyx_v_item); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cytoolz/itertoolz.pyx":146
 *     cdef Py_ssize_t i, N
 *     if callable(key):
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = key(item)
 *             _groupby_core(d, keyval, item)
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":145
 *     cdef object item, keyval
 *     cdef Py_ssize_t i, N
 *     if callable(key):             # <<<<<<<<<<<<<<
 *         for item in seq:
 *             keyval = key(item)
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":149
 *             keyval = key(item)
 *             _groupby_core(d, keyval, item)
 *     elif isinstance(key, list):             # <<<<<<<<<<<<<<
 *         N = PyList_GET_SIZE(key)
 *         for item in seq:
 */
  __pyx_t_3 = PyList_Check(__pyx_v_key); 
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":150
 *             _groupby_core(d, keyval, item)
 *     elif isinstance(key, list):
 *         N = PyList_GET_SIZE(key)             # <<<<<<<<<<<<<<
 *         for item in seq:
 *             keyval = PyTuple_New(N)
 */
    __pyx_v_N = PyList_GET_SIZE(__pyx_v_key);

    /* "cytoolz/itertoolz.pyx":151
 *     elif isinstance(key, list):
 *         N = PyList_GET_SIZE(key)
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = PyTuple_New(N)
 *             for i in range(N):
 */
    if (likely(PyList_CheckExact(__pyx_v_seq)) || PyTuple_CheckExact(__pyx_v_seq)) {
      __pyx_t_1 = __pyx_v_seq; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_1);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 151, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cytoolz/itertoolz.pyx":152
 *         N = PyList_GET_SIZE(key)
 *         for item in seq:
 *             keyval = PyTuple_New(N)             # <<<<<<<<<<<<<<
 *             for i in range(N):
 *                 val = <object>PyList_GET_ITEM(key, i)
 */
      __pyx_t_6 = PyTuple_New(__pyx_v_N); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_keyval, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cytoolz/itertoolz.pyx":153
 *         for item in seq:
 *             keyval = PyTuple_New(N)
 *             for i in range(N):             # <<<<<<<<<<<<<<
 *                 val = <object>PyList_GET_ITEM(key, i)
 *                 val = item[val]
 */
      __pyx_t_9 = __pyx_v_N;
      __pyx_t_10 = __pyx_t_9;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "cytoolz/itertoolz.pyx":154
 *             keyval = PyTuple_New(N)
 *             for i in range(N):
 *                 val = <object>PyList_GET_ITEM(key, i)             # <<<<<<<<<<<<<<
 *                 val = item[val]
 *                 Py_INCREF(val)
 */
        __pyx_t_12 = PyList_GET_ITEM(__pyx_v_key, __pyx_v_i);
        __pyx_t_6 = ((PyObject *)__pyx_t_12);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cytoolz/itertoolz.pyx":155
 *             for i in range(N):
 *                 val = <object>PyList_GET_ITEM(key, i)
 *                 val = item[val]             # <<<<<<<<<<<<<<
 *                 Py_INCREF(val)
 *                 PyTuple_SET_ITEM(keyval, i, val)
 */
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_item, __pyx_v_val); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cytoolz/itertoolz.pyx":156
 *                 val = <object>PyList_GET_ITEM(key, i)
 *                 val = item[val]
 *                 Py_INCREF(val)             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(keyval, i, val)
 *             _groupby_core(d, keyval, item)
 */
        Py_INCREF(__pyx_v_val);

        /* "cytoolz/itertoolz.pyx":157
 *                 val = item[val]
 *                 Py_INCREF(val)
 *                 PyTuple_SET_ITEM(keyval, i, val)             # <<<<<<<<<<<<<<
 *             _groupby_core(d, keyval, item)
 *     else:
 */
        PyTuple_SET_ITEM(__pyx_v_keyval, __pyx_v_i, __pyx_v_val);
      }

      /* "cytoolz/itertoolz.pyx":158
 *                 Py_INCREF(val)
 *                 PyTuple_SET_ITEM(keyval, i, val)
 *             _groupby_core(d, keyval, item)             # <<<<<<<<<<<<<<
 *     else:
 *         for item in seq:
 */
      __pyx_t_6 = __pyx_f_7cytoolz_9itertoolz__groupby_core(__pyx_v_d, __pyx_v_keyval, __pyx_v_item); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cytoolz/itertoolz.pyx":151
 *     elif isinstance(key, list):
 *         N = PyList_GET_SIZE(key)
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = PyTuple_New(N)
 *             for i in range(N):
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":149
 *             keyval = key(item)
 *             _groupby_core(d, keyval, item)
 *     elif isinstance(key, list):             # <<<<<<<<<<<<<<
 *         N = PyList_GET_SIZE(key)
 *         for item in seq:
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":160
 *             _groupby_core(d, keyval, item)
 *     else:
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = item[key]
 *             _groupby_core(d, keyval, item)
 */
  /*else*/ {
    if (likely(PyList_CheckExact(__pyx_v_seq)) || PyTuple_CheckExact(__pyx_v_seq)) {
      __pyx_t_1 = __pyx_v_seq; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 160, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 160, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_1);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 160, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cytoolz/itertoolz.pyx":161
 *     else:
 *         for item in seq:
 *             keyval = item[key]             # <<<<<<<<<<<<<<
 *             _groupby_core(d, keyval, item)
 *     return d
 */
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_item, __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_keyval, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cytoolz/itertoolz.pyx":162
 *         for item in seq:
 *             keyval = item[key]
 *             _groupby_core(d, keyval, item)             # <<<<<<<<<<<<<<
 *     return d
 * 
 */
      __pyx_t_6 = __pyx_f_7cytoolz_9itertoolz__groupby_core(__pyx_v_d, __pyx_v_keyval, __pyx_v_item); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cytoolz/itertoolz.pyx":160
 *             _groupby_core(d, keyval, item)
 *     else:
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = item[key]
 *             _groupby_core(d, keyval, item)
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "cytoolz/itertoolz.pyx":163
 *             keyval = item[key]
 *             _groupby_core(d, keyval, item)
 *     return d             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":116
 * 
 * 
 * cpdef dict groupby(object key, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Group a collection by a key function
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytoolz.itertoolz.groupby", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_keyval);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_3groupby(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_2groupby[] = "groupby(key, seq) -> dict\n\n    Group a collection by a key function\n\n    >>> names = ['Alice', 'Bob', 'Charlie', 'Dan', 'Edith', 'Frank']\n    >>> groupby(len, names)  # doctest: +SKIP\n    {3: ['Bob', 'Dan'], 5: ['Alice', 'Edith', 'Frank'], 7: ['Charlie']}\n\n    >>> iseven = lambda x: x % 2 == 0\n    >>> groupby(iseven, [1, 2, 3, 4, 5, 6, 7, 8])  # doctest: +SKIP\n    {False: [1, 3, 5, 7], True: [2, 4, 6, 8]}\n\n    Non-callable keys imply grouping on a member.\n\n    >>> groupby('gender', [{'name': 'Alice', 'gender': 'F'},\n    ...                    {'name': 'Bob', 'gender': 'M'},\n    ...                    {'name': 'Charlie', 'gender': 'M'}]) # doctest:+SKIP\n    {'F': [{'gender': 'F', 'name': 'Alice'}],\n     'M': [{'gender': 'M', 'name': 'Bob'},\n           {'gender': 'M', 'name': 'Charlie'}]}\n\n    Not to be confused with ``itertools.groupby``\n\n    See Also:\n        countby\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_3groupby = {"groupby", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_3groupby, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_2groupby};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_3groupby(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("groupby (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_seq,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("groupby", 1, 2, 2, 1); __PYX_ERR(0, 116, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby") < 0)) __PYX_ERR(0, 116, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = values[0];
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("groupby", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 116, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.groupby", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_2groupby(__pyx_self, __pyx_v_key, __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_2groupby(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_key, PyObject *__pyx_v_seq) {
  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("groupby", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_groupby(__pyx_v_key, __pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":166
 * 
 * 
 * cdef object _merge_sorted_binary(object seqs):             # <<<<<<<<<<<<<<
 *     mid = len(seqs) // 2
 *     L1 = seqs[:mid]
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz__merge_sorted_binary(PyObject *__pyx_v_seqs) {
  Py_ssize_t __pyx_v_mid;
  PyObject *__pyx_v_L1 = NULL;
  PyObject *__pyx_v_seq1 = NULL;
  PyObject *__pyx_v_L2 = NULL;
  PyObject *__pyx_v_seq2 = NULL;
  PyObject *__pyx_v_val2 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_merge_sorted_binary", 0);

  /* "cytoolz/itertoolz.pyx":167
 * 
 * cdef object _merge_sorted_binary(object seqs):
 *     mid = len(seqs) // 2             # <<<<<<<<<<<<<<
 *     L1 = seqs[:mid]
 *     if len(L1) == 1:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_seqs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 167, __pyx_L1_error)
  __pyx_v_mid = __Pyx_div_Py_ssize_t(__pyx_t_1, 2);

  /* "cytoolz/itertoolz.pyx":168
 * cdef object _merge_sorted_binary(object seqs):
 *     mid = len(seqs) // 2
 *     L1 = seqs[:mid]             # <<<<<<<<<<<<<<
 *     if len(L1) == 1:
 *         seq1 = iter(L1[0])
 */
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_seqs, 0, __pyx_v_mid, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_L1 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":169
 *     mid = len(seqs) // 2
 *     L1 = seqs[:mid]
 *     if len(L1) == 1:             # <<<<<<<<<<<<<<
 *         seq1 = iter(L1[0])
 *     else:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_L1); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 169, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_1 == 1) != 0);
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":170
 *     L1 = seqs[:mid]
 *     if len(L1) == 1:
 *         seq1 = iter(L1[0])             # <<<<<<<<<<<<<<
 *     else:
 *         seq1 = _merge_sorted_binary(L1)
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_L1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_seq1 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":169
 *     mid = len(seqs) // 2
 *     L1 = seqs[:mid]
 *     if len(L1) == 1:             # <<<<<<<<<<<<<<
 *         seq1 = iter(L1[0])
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":172
 *         seq1 = iter(L1[0])
 *     else:
 *         seq1 = _merge_sorted_binary(L1)             # <<<<<<<<<<<<<<
 *     L2 = seqs[mid:]
 *     if len(L2) == 1:
 */
  /*else*/ {
    __pyx_t_4 = __pyx_f_7cytoolz_9itertoolz__merge_sorted_binary(__pyx_v_L1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_seq1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "cytoolz/itertoolz.pyx":173
 *     else:
 *         seq1 = _merge_sorted_binary(L1)
 *     L2 = seqs[mid:]             # <<<<<<<<<<<<<<
 *     if len(L2) == 1:
 *         seq2 = iter(L2[0])
 */
  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_seqs, __pyx_v_mid, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_L2 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytoolz/itertoolz.pyx":174
 *         seq1 = _merge_sorted_binary(L1)
 *     L2 = seqs[mid:]
 *     if len(L2) == 1:             # <<<<<<<<<<<<<<
 *         seq2 = iter(L2[0])
 *     else:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_L2); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 174, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_1 == 1) != 0);
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":175
 *     L2 = seqs[mid:]
 *     if len(L2) == 1:
 *         seq2 = iter(L2[0])             # <<<<<<<<<<<<<<
 *     else:
 *         seq2 = _merge_sorted_binary(L2)
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_L2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_seq2 = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":174
 *         seq1 = _merge_sorted_binary(L1)
 *     L2 = seqs[mid:]
 *     if len(L2) == 1:             # <<<<<<<<<<<<<<
 *         seq2 = iter(L2[0])
 *     else:
 */
    goto __pyx_L4;
  }

  /* "cytoolz/itertoolz.pyx":177
 *         seq2 = iter(L2[0])
 *     else:
 *         seq2 = _merge_sorted_binary(L2)             # <<<<<<<<<<<<<<
 *     try:
 *         val2 = next(seq2)
 */
  /*else*/ {
    __pyx_t_2 = __pyx_f_7cytoolz_9itertoolz__merge_sorted_binary(__pyx_v_L2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_seq2 = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "cytoolz/itertoolz.pyx":178
 *     else:
 *         seq2 = _merge_sorted_binary(L2)
 *     try:             # <<<<<<<<<<<<<<
 *         val2 = next(seq2)
 *     except StopIteration:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "cytoolz/itertoolz.pyx":179
 *         seq2 = _merge_sorted_binary(L2)
 *     try:
 *         val2 = next(seq2)             # <<<<<<<<<<<<<<
 *     except StopIteration:
 *         return seq1
 */
      __pyx_t_2 = __Pyx_PyIter_Next(__pyx_v_seq2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_val2 = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "cytoolz/itertoolz.pyx":178
 *     else:
 *         seq2 = _merge_sorted_binary(L2)
 *     try:             # <<<<<<<<<<<<<<
 *         val2 = next(seq2)
 *     except StopIteration:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L10_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":180
 *     try:
 *         val2 = next(seq2)
 *     except StopIteration:             # <<<<<<<<<<<<<<
 *         return seq1
 *     return _merge_sorted(seq1, seq2, val2)
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(0, 180, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_9);

      /* "cytoolz/itertoolz.pyx":181
 *         val2 = next(seq2)
 *     except StopIteration:
 *         return seq1             # <<<<<<<<<<<<<<
 *     return _merge_sorted(seq1, seq2, val2)
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_seq1);
      __pyx_r = __pyx_v_seq1;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L8_except_return;
    }
    goto __pyx_L7_except_error;
    __pyx_L7_except_error:;

    /* "cytoolz/itertoolz.pyx":178
 *     else:
 *         seq2 = _merge_sorted_binary(L2)
 *     try:             # <<<<<<<<<<<<<<
 *         val2 = next(seq2)
 *     except StopIteration:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
    __pyx_L10_try_end:;
  }

  /* "cytoolz/itertoolz.pyx":182
 *     except StopIteration:
 *         return seq1
 *     return _merge_sorted(seq1, seq2, val2)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_seq1);
  __Pyx_GIVEREF(__pyx_v_seq1);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_seq1);
  __Pyx_INCREF(__pyx_v_seq2);
  __Pyx_GIVEREF(__pyx_v_seq2);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_seq2);
  __Pyx_INCREF(__pyx_v_val2);
  __Pyx_GIVEREF(__pyx_v_val2);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_val2);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__merge_sorted), __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":166
 * 
 * 
 * cdef object _merge_sorted_binary(object seqs):             # <<<<<<<<<<<<<<
 *     mid = len(seqs) // 2
 *     L1 = seqs[:mid]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_L1);
  __Pyx_XDECREF(__pyx_v_seq1);
  __Pyx_XDECREF(__pyx_v_L2);
  __Pyx_XDECREF(__pyx_v_seq2);
  __Pyx_XDECREF(__pyx_v_val2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":186
 * 
 * cdef class _merge_sorted:
 *     def __cinit__(self, seq1, seq2, val2):             # <<<<<<<<<<<<<<
 *         self.seq1 = seq1
 *         self.seq2 = seq2
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seq1 = 0;
  PyObject *__pyx_v_seq2 = 0;
  PyObject *__pyx_v_val2 = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seq1,&__pyx_n_s_seq2,&__pyx_n_s_val2,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_seq1)) != 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_seq2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(0, 186, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(0, 186, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 186, __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_seq1 = values[0];
    __pyx_v_seq2 = values[1];
    __pyx_v_val2 = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 186, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13_merge_sorted___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *)__pyx_v_self), __pyx_v_seq1, __pyx_v_seq2, __pyx_v_val2);

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

static int __pyx_pf_7cytoolz_9itertoolz_13_merge_sorted___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *__pyx_v_self, PyObject *__pyx_v_seq1, PyObject *__pyx_v_seq2, PyObject *__pyx_v_val2) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":187
 * cdef class _merge_sorted:
 *     def __cinit__(self, seq1, seq2, val2):
 *         self.seq1 = seq1             # <<<<<<<<<<<<<<
 *         self.seq2 = seq2
 *         self.val1 = None
 */
  __Pyx_INCREF(__pyx_v_seq1);
  __Pyx_GIVEREF(__pyx_v_seq1);
  __Pyx_GOTREF(__pyx_v_self->seq1);
  __Pyx_DECREF(__pyx_v_self->seq1);
  __pyx_v_self->seq1 = __pyx_v_seq1;

  /* "cytoolz/itertoolz.pyx":188
 *     def __cinit__(self, seq1, seq2, val2):
 *         self.seq1 = seq1
 *         self.seq2 = seq2             # <<<<<<<<<<<<<<
 *         self.val1 = None
 *         self.val2 = val2
 */
  __Pyx_INCREF(__pyx_v_seq2);
  __Pyx_GIVEREF(__pyx_v_seq2);
  __Pyx_GOTREF(__pyx_v_self->seq2);
  __Pyx_DECREF(__pyx_v_self->seq2);
  __pyx_v_self->seq2 = __pyx_v_seq2;

  /* "cytoolz/itertoolz.pyx":189
 *         self.seq1 = seq1
 *         self.seq2 = seq2
 *         self.val1 = None             # <<<<<<<<<<<<<<
 *         self.val2 = val2
 *         self.loop = 0
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->val1);
  __Pyx_DECREF(__pyx_v_self->val1);
  __pyx_v_self->val1 = Py_None;

  /* "cytoolz/itertoolz.pyx":190
 *         self.seq2 = seq2
 *         self.val1 = None
 *         self.val2 = val2             # <<<<<<<<<<<<<<
 *         self.loop = 0
 * 
 */
  __Pyx_INCREF(__pyx_v_val2);
  __Pyx_GIVEREF(__pyx_v_val2);
  __Pyx_GOTREF(__pyx_v_self->val2);
  __Pyx_DECREF(__pyx_v_self->val2);
  __pyx_v_self->val2 = __pyx_v_val2;

  /* "cytoolz/itertoolz.pyx":191
 *         self.val1 = None
 *         self.val2 = val2
 *         self.loop = 0             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_v_self->loop = 0;

  /* "cytoolz/itertoolz.pyx":186
 * 
 * cdef class _merge_sorted:
 *     def __cinit__(self, seq1, seq2, val2):             # <<<<<<<<<<<<<<
 *         self.seq1 = seq1
 *         self.seq2 = seq2
 */

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

/* "cytoolz/itertoolz.pyx":193
 *         self.loop = 0
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":194
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":193
 *         self.loop = 0
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":196
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.loop == 0:
 *             try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":197
 * 
 *     def __next__(self):
 *         if self.loop == 0:             # <<<<<<<<<<<<<<
 *             try:
 *                 self.val1 = next(self.seq1)
 */
  switch (__pyx_v_self->loop) {
    case 0:

    /* "cytoolz/itertoolz.pyx":198
 *     def __next__(self):
 *         if self.loop == 0:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val1 = next(self.seq1)
 *             except StopIteration:
 */
    {
      __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:*/ {

        /* "cytoolz/itertoolz.pyx":199
 *         if self.loop == 0:
 *             try:
 *                 self.val1 = next(self.seq1)             # <<<<<<<<<<<<<<
 *             except StopIteration:
 *                 self.loop = 2
 */
        __pyx_t_4 = __pyx_v_self->seq1;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GIVEREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_v_self->val1);
        __Pyx_DECREF(__pyx_v_self->val1);
        __pyx_v_self->val1 = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "cytoolz/itertoolz.pyx":198
 *     def __next__(self):
 *         if self.loop == 0:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val1 = next(self.seq1)
 *             except StopIteration:
 */
      }
      __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;

      /* "cytoolz/itertoolz.pyx":200
 *             try:
 *                 self.val1 = next(self.seq1)
 *             except StopIteration:             # <<<<<<<<<<<<<<
 *                 self.loop = 2
 *                 return self.val2
 */
      __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
      if (__pyx_t_6) {
        __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 200, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_7);

        /* "cytoolz/itertoolz.pyx":201
 *                 self.val1 = next(self.seq1)
 *             except StopIteration:
 *                 self.loop = 2             # <<<<<<<<<<<<<<
 *                 return self.val2
 *             if self.val2 < self.val1:
 */
        __pyx_v_self->loop = 2;

        /* "cytoolz/itertoolz.pyx":202
 *             except StopIteration:
 *                 self.loop = 2
 *                 return self.val2             # <<<<<<<<<<<<<<
 *             if self.val2 < self.val1:
 *                 self.loop = 1
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_self->val2);
        __pyx_r = __pyx_v_self->val2;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L6_except_return;
      }
      goto __pyx_L5_except_error;
      __pyx_L5_except_error:;

      /* "cytoolz/itertoolz.pyx":198
 *     def __next__(self):
 *         if self.loop == 0:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val1 = next(self.seq1)
 *             except StopIteration:
 */
      __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:;
    }

    /* "cytoolz/itertoolz.pyx":203
 *                 self.loop = 2
 *                 return self.val2
 *             if self.val2 < self.val1:             # <<<<<<<<<<<<<<
 *                 self.loop = 1
 *                 return self.val2
 */
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_self->val2, __pyx_v_self->val1, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 203, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_8) {

      /* "cytoolz/itertoolz.pyx":204
 *                 return self.val2
 *             if self.val2 < self.val1:
 *                 self.loop = 1             # <<<<<<<<<<<<<<
 *                 return self.val2
 *             return self.val1
 */
      __pyx_v_self->loop = 1;

      /* "cytoolz/itertoolz.pyx":205
 *             if self.val2 < self.val1:
 *                 self.loop = 1
 *                 return self.val2             # <<<<<<<<<<<<<<
 *             return self.val1
 *         elif self.loop == 1:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->val2);
      __pyx_r = __pyx_v_self->val2;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":203
 *                 self.loop = 2
 *                 return self.val2
 *             if self.val2 < self.val1:             # <<<<<<<<<<<<<<
 *                 self.loop = 1
 *                 return self.val2
 */
    }

    /* "cytoolz/itertoolz.pyx":206
 *                 self.loop = 1
 *                 return self.val2
 *             return self.val1             # <<<<<<<<<<<<<<
 *         elif self.loop == 1:
 *             try:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->val1);
    __pyx_r = __pyx_v_self->val1;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":197
 * 
 *     def __next__(self):
 *         if self.loop == 0:             # <<<<<<<<<<<<<<
 *             try:
 *                 self.val1 = next(self.seq1)
 */
    break;
    case 1:

    /* "cytoolz/itertoolz.pyx":208
 *             return self.val1
 *         elif self.loop == 1:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val2 = next(self.seq2)
 *             except StopIteration:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      /*try:*/ {

        /* "cytoolz/itertoolz.pyx":209
 *         elif self.loop == 1:
 *             try:
 *                 self.val2 = next(self.seq2)             # <<<<<<<<<<<<<<
 *             except StopIteration:
 *                 self.loop = 3
 */
        __pyx_t_7 = __pyx_v_self->seq2;
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyIter_Next(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->val2);
        __Pyx_DECREF(__pyx_v_self->val2);
        __pyx_v_self->val2 = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "cytoolz/itertoolz.pyx":208
 *             return self.val1
 *         elif self.loop == 1:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val2 = next(self.seq2)
 *             except StopIteration:
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L17_try_end;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "cytoolz/itertoolz.pyx":210
 *             try:
 *                 self.val2 = next(self.seq2)
 *             except StopIteration:             # <<<<<<<<<<<<<<
 *                 self.loop = 3
 *                 return self.val1
 */
      __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
      if (__pyx_t_6) {
        __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_5) < 0) __PYX_ERR(0, 210, __pyx_L14_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_5);

        /* "cytoolz/itertoolz.pyx":211
 *                 self.val2 = next(self.seq2)
 *             except StopIteration:
 *                 self.loop = 3             # <<<<<<<<<<<<<<
 *                 return self.val1
 *             if self.val2 < self.val1:
 */
        __pyx_v_self->loop = 3;

        /* "cytoolz/itertoolz.pyx":212
 *             except StopIteration:
 *                 self.loop = 3
 *                 return self.val1             # <<<<<<<<<<<<<<
 *             if self.val2 < self.val1:
 *                 return self.val2
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_self->val1);
        __pyx_r = __pyx_v_self->val1;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L15_except_return;
      }
      goto __pyx_L14_except_error;
      __pyx_L14_except_error:;

      /* "cytoolz/itertoolz.pyx":208
 *             return self.val1
 *         elif self.loop == 1:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val2 = next(self.seq2)
 *             except StopIteration:
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      goto __pyx_L1_error;
      __pyx_L15_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      goto __pyx_L0;
      __pyx_L17_try_end:;
    }

    /* "cytoolz/itertoolz.pyx":213
 *                 self.loop = 3
 *                 return self.val1
 *             if self.val2 < self.val1:             # <<<<<<<<<<<<<<
 *                 return self.val2
 *             self.loop = 0
 */
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_self->val2, __pyx_v_self->val1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_8) {

      /* "cytoolz/itertoolz.pyx":214
 *                 return self.val1
 *             if self.val2 < self.val1:
 *                 return self.val2             # <<<<<<<<<<<<<<
 *             self.loop = 0
 *             return self.val1
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->val2);
      __pyx_r = __pyx_v_self->val2;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":213
 *                 self.loop = 3
 *                 return self.val1
 *             if self.val2 < self.val1:             # <<<<<<<<<<<<<<
 *                 return self.val2
 *             self.loop = 0
 */
    }

    /* "cytoolz/itertoolz.pyx":215
 *             if self.val2 < self.val1:
 *                 return self.val2
 *             self.loop = 0             # <<<<<<<<<<<<<<
 *             return self.val1
 *         elif self.loop == 2:
 */
    __pyx_v_self->loop = 0;

    /* "cytoolz/itertoolz.pyx":216
 *                 return self.val2
 *             self.loop = 0
 *             return self.val1             # <<<<<<<<<<<<<<
 *         elif self.loop == 2:
 *             return next(self.seq2)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->val1);
    __pyx_r = __pyx_v_self->val1;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":207
 *                 return self.val2
 *             return self.val1
 *         elif self.loop == 1:             # <<<<<<<<<<<<<<
 *             try:
 *                 self.val2 = next(self.seq2)
 */
    break;
    case 2:

    /* "cytoolz/itertoolz.pyx":218
 *             return self.val1
 *         elif self.loop == 2:
 *             return next(self.seq2)             # <<<<<<<<<<<<<<
 *         return next(self.seq1)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __pyx_v_self->seq2;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyIter_Next(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":217
 *             self.loop = 0
 *             return self.val1
 *         elif self.loop == 2:             # <<<<<<<<<<<<<<
 *             return next(self.seq2)
 *         return next(self.seq1)
 */
    break;
    default: break;
  }

  /* "cytoolz/itertoolz.pyx":219
 *         elif self.loop == 2:
 *             return next(self.seq2)
 *         return next(self.seq1)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __pyx_v_self->seq1;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":196
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.loop == 0:
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_13_merge_sorted_6__reduce_cython__[] = "_merge_sorted.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_13_merge_sorted_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_13_merge_sorted_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_13_merge_sorted_8__setstate_cython__[] = "_merge_sorted.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_13_merge_sorted_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_13_merge_sorted_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_merge_sorted_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":222
 * 
 * 
 * cdef object _merge_sorted_binary_key(object seqs, object key):             # <<<<<<<<<<<<<<
 *     mid = len(seqs) // 2
 *     L1 = seqs[:mid]
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz__merge_sorted_binary_key(PyObject *__pyx_v_seqs, PyObject *__pyx_v_key) {
  Py_ssize_t __pyx_v_mid;
  PyObject *__pyx_v_L1 = NULL;
  PyObject *__pyx_v_seq1 = NULL;
  PyObject *__pyx_v_L2 = NULL;
  PyObject *__pyx_v_seq2 = NULL;
  PyObject *__pyx_v_val2 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  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;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_merge_sorted_binary_key", 0);

  /* "cytoolz/itertoolz.pyx":223
 * 
 * cdef object _merge_sorted_binary_key(object seqs, object key):
 *     mid = len(seqs) // 2             # <<<<<<<<<<<<<<
 *     L1 = seqs[:mid]
 *     if len(L1) == 1:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_seqs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
  __pyx_v_mid = __Pyx_div_Py_ssize_t(__pyx_t_1, 2);

  /* "cytoolz/itertoolz.pyx":224
 * cdef object _merge_sorted_binary_key(object seqs, object key):
 *     mid = len(seqs) // 2
 *     L1 = seqs[:mid]             # <<<<<<<<<<<<<<
 *     if len(L1) == 1:
 *         seq1 = iter(L1[0])
 */
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_seqs, 0, __pyx_v_mid, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_L1 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":225
 *     mid = len(seqs) // 2
 *     L1 = seqs[:mid]
 *     if len(L1) == 1:             # <<<<<<<<<<<<<<
 *         seq1 = iter(L1[0])
 *     else:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_L1); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 225, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_1 == 1) != 0);
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":226
 *     L1 = seqs[:mid]
 *     if len(L1) == 1:
 *         seq1 = iter(L1[0])             # <<<<<<<<<<<<<<
 *     else:
 *         seq1 = _merge_sorted_binary_key(L1, key)
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_L1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_seq1 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":225
 *     mid = len(seqs) // 2
 *     L1 = seqs[:mid]
 *     if len(L1) == 1:             # <<<<<<<<<<<<<<
 *         seq1 = iter(L1[0])
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":228
 *         seq1 = iter(L1[0])
 *     else:
 *         seq1 = _merge_sorted_binary_key(L1, key)             # <<<<<<<<<<<<<<
 *     L2 = seqs[mid:]
 *     if len(L2) == 1:
 */
  /*else*/ {
    __pyx_t_4 = __pyx_f_7cytoolz_9itertoolz__merge_sorted_binary_key(__pyx_v_L1, __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_seq1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "cytoolz/itertoolz.pyx":229
 *     else:
 *         seq1 = _merge_sorted_binary_key(L1, key)
 *     L2 = seqs[mid:]             # <<<<<<<<<<<<<<
 *     if len(L2) == 1:
 *         seq2 = iter(L2[0])
 */
  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_seqs, __pyx_v_mid, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_L2 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytoolz/itertoolz.pyx":230
 *         seq1 = _merge_sorted_binary_key(L1, key)
 *     L2 = seqs[mid:]
 *     if len(L2) == 1:             # <<<<<<<<<<<<<<
 *         seq2 = iter(L2[0])
 *     else:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_L2); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 230, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_1 == 1) != 0);
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":231
 *     L2 = seqs[mid:]
 *     if len(L2) == 1:
 *         seq2 = iter(L2[0])             # <<<<<<<<<<<<<<
 *     else:
 *         seq2 = _merge_sorted_binary_key(L2, key)
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_L2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_seq2 = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":230
 *         seq1 = _merge_sorted_binary_key(L1, key)
 *     L2 = seqs[mid:]
 *     if len(L2) == 1:             # <<<<<<<<<<<<<<
 *         seq2 = iter(L2[0])
 *     else:
 */
    goto __pyx_L4;
  }

  /* "cytoolz/itertoolz.pyx":233
 *         seq2 = iter(L2[0])
 *     else:
 *         seq2 = _merge_sorted_binary_key(L2, key)             # <<<<<<<<<<<<<<
 *     try:
 *         val2 = next(seq2)
 */
  /*else*/ {
    __pyx_t_2 = __pyx_f_7cytoolz_9itertoolz__merge_sorted_binary_key(__pyx_v_L2, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_seq2 = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "cytoolz/itertoolz.pyx":234
 *     else:
 *         seq2 = _merge_sorted_binary_key(L2, key)
 *     try:             # <<<<<<<<<<<<<<
 *         val2 = next(seq2)
 *     except StopIteration:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "cytoolz/itertoolz.pyx":235
 *         seq2 = _merge_sorted_binary_key(L2, key)
 *     try:
 *         val2 = next(seq2)             # <<<<<<<<<<<<<<
 *     except StopIteration:
 *         return seq1
 */
      __pyx_t_2 = __Pyx_PyIter_Next(__pyx_v_seq2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_val2 = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "cytoolz/itertoolz.pyx":234
 *     else:
 *         seq2 = _merge_sorted_binary_key(L2, key)
 *     try:             # <<<<<<<<<<<<<<
 *         val2 = next(seq2)
 *     except StopIteration:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L10_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":236
 *     try:
 *         val2 = next(seq2)
 *     except StopIteration:             # <<<<<<<<<<<<<<
 *         return seq1
 *     return _merge_sorted_key(seq1, seq2, val2, key)
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted_binary_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(0, 236, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_9);

      /* "cytoolz/itertoolz.pyx":237
 *         val2 = next(seq2)
 *     except StopIteration:
 *         return seq1             # <<<<<<<<<<<<<<
 *     return _merge_sorted_key(seq1, seq2, val2, key)
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_seq1);
      __pyx_r = __pyx_v_seq1;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L8_except_return;
    }
    goto __pyx_L7_except_error;
    __pyx_L7_except_error:;

    /* "cytoolz/itertoolz.pyx":234
 *     else:
 *         seq2 = _merge_sorted_binary_key(L2, key)
 *     try:             # <<<<<<<<<<<<<<
 *         val2 = next(seq2)
 *     except StopIteration:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
    __pyx_L10_try_end:;
  }

  /* "cytoolz/itertoolz.pyx":238
 *     except StopIteration:
 *         return seq1
 *     return _merge_sorted_key(seq1, seq2, val2, key)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_seq1);
  __Pyx_GIVEREF(__pyx_v_seq1);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_seq1);
  __Pyx_INCREF(__pyx_v_seq2);
  __Pyx_GIVEREF(__pyx_v_seq2);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_seq2);
  __Pyx_INCREF(__pyx_v_val2);
  __Pyx_GIVEREF(__pyx_v_val2);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_val2);
  __Pyx_INCREF(__pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_v_key);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__merge_sorted_key), __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":222
 * 
 * 
 * cdef object _merge_sorted_binary_key(object seqs, object key):             # <<<<<<<<<<<<<<
 *     mid = len(seqs) // 2
 *     L1 = seqs[:mid]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted_binary_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_L1);
  __Pyx_XDECREF(__pyx_v_seq1);
  __Pyx_XDECREF(__pyx_v_L2);
  __Pyx_XDECREF(__pyx_v_seq2);
  __Pyx_XDECREF(__pyx_v_val2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":242
 * 
 * cdef class _merge_sorted_key:
 *     def __cinit__(self, seq1, seq2, val2, key):             # <<<<<<<<<<<<<<
 *         self.seq1 = seq1
 *         self.seq2 = seq2
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seq1 = 0;
  PyObject *__pyx_v_seq2 = 0;
  PyObject *__pyx_v_val2 = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seq1,&__pyx_n_s_seq2,&__pyx_n_s_val2,&__pyx_n_s_key,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_seq1)) != 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_seq2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); __PYX_ERR(0, 242, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); __PYX_ERR(0, 242, __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("__cinit__", 1, 4, 4, 3); __PYX_ERR(0, 242, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 242, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_seq1 = values[0];
    __pyx_v_seq2 = values[1];
    __pyx_v_val2 = values[2];
    __pyx_v_key = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 242, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted_key.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *)__pyx_v_self), __pyx_v_seq1, __pyx_v_seq2, __pyx_v_val2, __pyx_v_key);

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

static int __pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *__pyx_v_self, PyObject *__pyx_v_seq1, PyObject *__pyx_v_seq2, PyObject *__pyx_v_val2, PyObject *__pyx_v_key) {
  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("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":243
 * cdef class _merge_sorted_key:
 *     def __cinit__(self, seq1, seq2, val2, key):
 *         self.seq1 = seq1             # <<<<<<<<<<<<<<
 *         self.seq2 = seq2
 *         self.key = key
 */
  __Pyx_INCREF(__pyx_v_seq1);
  __Pyx_GIVEREF(__pyx_v_seq1);
  __Pyx_GOTREF(__pyx_v_self->seq1);
  __Pyx_DECREF(__pyx_v_self->seq1);
  __pyx_v_self->seq1 = __pyx_v_seq1;

  /* "cytoolz/itertoolz.pyx":244
 *     def __cinit__(self, seq1, seq2, val2, key):
 *         self.seq1 = seq1
 *         self.seq2 = seq2             # <<<<<<<<<<<<<<
 *         self.key = key
 *         self.val1 = None
 */
  __Pyx_INCREF(__pyx_v_seq2);
  __Pyx_GIVEREF(__pyx_v_seq2);
  __Pyx_GOTREF(__pyx_v_self->seq2);
  __Pyx_DECREF(__pyx_v_self->seq2);
  __pyx_v_self->seq2 = __pyx_v_seq2;

  /* "cytoolz/itertoolz.pyx":245
 *         self.seq1 = seq1
 *         self.seq2 = seq2
 *         self.key = key             # <<<<<<<<<<<<<<
 *         self.val1 = None
 *         self.key1 = None
 */
  __Pyx_INCREF(__pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __Pyx_GOTREF(__pyx_v_self->key);
  __Pyx_DECREF(__pyx_v_self->key);
  __pyx_v_self->key = __pyx_v_key;

  /* "cytoolz/itertoolz.pyx":246
 *         self.seq2 = seq2
 *         self.key = key
 *         self.val1 = None             # <<<<<<<<<<<<<<
 *         self.key1 = None
 *         self.val2 = val2
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->val1);
  __Pyx_DECREF(__pyx_v_self->val1);
  __pyx_v_self->val1 = Py_None;

  /* "cytoolz/itertoolz.pyx":247
 *         self.key = key
 *         self.val1 = None
 *         self.key1 = None             # <<<<<<<<<<<<<<
 *         self.val2 = val2
 *         self.key2 = key(val2)
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->key1);
  __Pyx_DECREF(__pyx_v_self->key1);
  __pyx_v_self->key1 = Py_None;

  /* "cytoolz/itertoolz.pyx":248
 *         self.val1 = None
 *         self.key1 = None
 *         self.val2 = val2             # <<<<<<<<<<<<<<
 *         self.key2 = key(val2)
 *         self.loop = 0
 */
  __Pyx_INCREF(__pyx_v_val2);
  __Pyx_GIVEREF(__pyx_v_val2);
  __Pyx_GOTREF(__pyx_v_self->val2);
  __Pyx_DECREF(__pyx_v_self->val2);
  __pyx_v_self->val2 = __pyx_v_val2;

  /* "cytoolz/itertoolz.pyx":249
 *         self.key1 = None
 *         self.val2 = val2
 *         self.key2 = key(val2)             # <<<<<<<<<<<<<<
 *         self.loop = 0
 * 
 */
  __Pyx_INCREF(__pyx_v_key);
  __pyx_t_2 = __pyx_v_key; __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_val2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_val2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->key2);
  __Pyx_DECREF(__pyx_v_self->key2);
  __pyx_v_self->key2 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":250
 *         self.val2 = val2
 *         self.key2 = key(val2)
 *         self.loop = 0             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_v_self->loop = 0;

  /* "cytoolz/itertoolz.pyx":242
 * 
 * cdef class _merge_sorted_key:
 *     def __cinit__(self, seq1, seq2, val2, key):             # <<<<<<<<<<<<<<
 *         self.seq1 = seq1
 *         self.seq2 = seq2
 */

  /* 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("cytoolz.itertoolz._merge_sorted_key.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":252
 *         self.loop = 0
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":253
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":252
 *         self.loop = 0
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":255
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.loop == 0:
 *             try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":256
 * 
 *     def __next__(self):
 *         if self.loop == 0:             # <<<<<<<<<<<<<<
 *             try:
 *                 self.val1 = next(self.seq1)
 */
  switch (__pyx_v_self->loop) {
    case 0:

    /* "cytoolz/itertoolz.pyx":257
 *     def __next__(self):
 *         if self.loop == 0:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val1 = next(self.seq1)
 *             except StopIteration:
 */
    {
      __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:*/ {

        /* "cytoolz/itertoolz.pyx":258
 *         if self.loop == 0:
 *             try:
 *                 self.val1 = next(self.seq1)             # <<<<<<<<<<<<<<
 *             except StopIteration:
 *                 self.loop = 2
 */
        __pyx_t_4 = __pyx_v_self->seq1;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 258, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GIVEREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_v_self->val1);
        __Pyx_DECREF(__pyx_v_self->val1);
        __pyx_v_self->val1 = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "cytoolz/itertoolz.pyx":257
 *     def __next__(self):
 *         if self.loop == 0:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val1 = next(self.seq1)
 *             except StopIteration:
 */
      }
      __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;

      /* "cytoolz/itertoolz.pyx":259
 *             try:
 *                 self.val1 = next(self.seq1)
 *             except StopIteration:             # <<<<<<<<<<<<<<
 *                 self.loop = 2
 *                 return self.val2
 */
      __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
      if (__pyx_t_6) {
        __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted_key.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 259, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_7);

        /* "cytoolz/itertoolz.pyx":260
 *                 self.val1 = next(self.seq1)
 *             except StopIteration:
 *                 self.loop = 2             # <<<<<<<<<<<<<<
 *                 return self.val2
 *             self.key1 = self.key(self.val1)
 */
        __pyx_v_self->loop = 2;

        /* "cytoolz/itertoolz.pyx":261
 *             except StopIteration:
 *                 self.loop = 2
 *                 return self.val2             # <<<<<<<<<<<<<<
 *             self.key1 = self.key(self.val1)
 *             if self.key2 < self.key1:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_self->val2);
        __pyx_r = __pyx_v_self->val2;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L6_except_return;
      }
      goto __pyx_L5_except_error;
      __pyx_L5_except_error:;

      /* "cytoolz/itertoolz.pyx":257
 *     def __next__(self):
 *         if self.loop == 0:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val1 = next(self.seq1)
 *             except StopIteration:
 */
      __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:;
    }

    /* "cytoolz/itertoolz.pyx":262
 *                 self.loop = 2
 *                 return self.val2
 *             self.key1 = self.key(self.val1)             # <<<<<<<<<<<<<<
 *             if self.key2 < self.key1:
 *                 self.loop = 1
 */
    __Pyx_INCREF(__pyx_v_self->key);
    __pyx_t_4 = __pyx_v_self->key; __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_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_self->val1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->val1);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->key1);
    __Pyx_DECREF(__pyx_v_self->key1);
    __pyx_v_self->key1 = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "cytoolz/itertoolz.pyx":263
 *                 return self.val2
 *             self.key1 = self.key(self.val1)
 *             if self.key2 < self.key1:             # <<<<<<<<<<<<<<
 *                 self.loop = 1
 *                 return self.val2
 */
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_self->key2, __pyx_v_self->key1, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 263, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_8) {

      /* "cytoolz/itertoolz.pyx":264
 *             self.key1 = self.key(self.val1)
 *             if self.key2 < self.key1:
 *                 self.loop = 1             # <<<<<<<<<<<<<<
 *                 return self.val2
 *             return self.val1
 */
      __pyx_v_self->loop = 1;

      /* "cytoolz/itertoolz.pyx":265
 *             if self.key2 < self.key1:
 *                 self.loop = 1
 *                 return self.val2             # <<<<<<<<<<<<<<
 *             return self.val1
 *         elif self.loop == 1:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->val2);
      __pyx_r = __pyx_v_self->val2;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":263
 *                 return self.val2
 *             self.key1 = self.key(self.val1)
 *             if self.key2 < self.key1:             # <<<<<<<<<<<<<<
 *                 self.loop = 1
 *                 return self.val2
 */
    }

    /* "cytoolz/itertoolz.pyx":266
 *                 self.loop = 1
 *                 return self.val2
 *             return self.val1             # <<<<<<<<<<<<<<
 *         elif self.loop == 1:
 *             try:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->val1);
    __pyx_r = __pyx_v_self->val1;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":256
 * 
 *     def __next__(self):
 *         if self.loop == 0:             # <<<<<<<<<<<<<<
 *             try:
 *                 self.val1 = next(self.seq1)
 */
    break;
    case 1:

    /* "cytoolz/itertoolz.pyx":268
 *             return self.val1
 *         elif self.loop == 1:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val2 = next(self.seq2)
 *             except StopIteration:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      /*try:*/ {

        /* "cytoolz/itertoolz.pyx":269
 *         elif self.loop == 1:
 *             try:
 *                 self.val2 = next(self.seq2)             # <<<<<<<<<<<<<<
 *             except StopIteration:
 *                 self.loop = 3
 */
        __pyx_t_7 = __pyx_v_self->seq2;
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyIter_Next(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->val2);
        __Pyx_DECREF(__pyx_v_self->val2);
        __pyx_v_self->val2 = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "cytoolz/itertoolz.pyx":268
 *             return self.val1
 *         elif self.loop == 1:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val2 = next(self.seq2)
 *             except StopIteration:
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L17_try_end;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "cytoolz/itertoolz.pyx":270
 *             try:
 *                 self.val2 = next(self.seq2)
 *             except StopIteration:             # <<<<<<<<<<<<<<
 *                 self.loop = 3
 *                 return self.val1
 */
      __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
      if (__pyx_t_6) {
        __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted_key.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_5) < 0) __PYX_ERR(0, 270, __pyx_L14_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_5);

        /* "cytoolz/itertoolz.pyx":271
 *                 self.val2 = next(self.seq2)
 *             except StopIteration:
 *                 self.loop = 3             # <<<<<<<<<<<<<<
 *                 return self.val1
 *             self.key2 = self.key(self.val2)
 */
        __pyx_v_self->loop = 3;

        /* "cytoolz/itertoolz.pyx":272
 *             except StopIteration:
 *                 self.loop = 3
 *                 return self.val1             # <<<<<<<<<<<<<<
 *             self.key2 = self.key(self.val2)
 *             if self.key2 < self.key1:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_self->val1);
        __pyx_r = __pyx_v_self->val1;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L15_except_return;
      }
      goto __pyx_L14_except_error;
      __pyx_L14_except_error:;

      /* "cytoolz/itertoolz.pyx":268
 *             return self.val1
 *         elif self.loop == 1:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.val2 = next(self.seq2)
 *             except StopIteration:
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      goto __pyx_L1_error;
      __pyx_L15_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      goto __pyx_L0;
      __pyx_L17_try_end:;
    }

    /* "cytoolz/itertoolz.pyx":273
 *                 self.loop = 3
 *                 return self.val1
 *             self.key2 = self.key(self.val2)             # <<<<<<<<<<<<<<
 *             if self.key2 < self.key1:
 *                 return self.val2
 */
    __Pyx_INCREF(__pyx_v_self->key);
    __pyx_t_7 = __pyx_v_self->key; __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_v_self->val2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->val2);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->key2);
    __Pyx_DECREF(__pyx_v_self->key2);
    __pyx_v_self->key2 = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cytoolz/itertoolz.pyx":274
 *                 return self.val1
 *             self.key2 = self.key(self.val2)
 *             if self.key2 < self.key1:             # <<<<<<<<<<<<<<
 *                 return self.val2
 *             self.loop = 0
 */
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_self->key2, __pyx_v_self->key1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 274, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 274, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_8) {

      /* "cytoolz/itertoolz.pyx":275
 *             self.key2 = self.key(self.val2)
 *             if self.key2 < self.key1:
 *                 return self.val2             # <<<<<<<<<<<<<<
 *             self.loop = 0
 *             return self.val1
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->val2);
      __pyx_r = __pyx_v_self->val2;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":274
 *                 return self.val1
 *             self.key2 = self.key(self.val2)
 *             if self.key2 < self.key1:             # <<<<<<<<<<<<<<
 *                 return self.val2
 *             self.loop = 0
 */
    }

    /* "cytoolz/itertoolz.pyx":276
 *             if self.key2 < self.key1:
 *                 return self.val2
 *             self.loop = 0             # <<<<<<<<<<<<<<
 *             return self.val1
 *         elif self.loop == 2:
 */
    __pyx_v_self->loop = 0;

    /* "cytoolz/itertoolz.pyx":277
 *                 return self.val2
 *             self.loop = 0
 *             return self.val1             # <<<<<<<<<<<<<<
 *         elif self.loop == 2:
 *             return next(self.seq2)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->val1);
    __pyx_r = __pyx_v_self->val1;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":267
 *                 return self.val2
 *             return self.val1
 *         elif self.loop == 1:             # <<<<<<<<<<<<<<
 *             try:
 *                 self.val2 = next(self.seq2)
 */
    break;
    case 2:

    /* "cytoolz/itertoolz.pyx":279
 *             return self.val1
 *         elif self.loop == 2:
 *             return next(self.seq2)             # <<<<<<<<<<<<<<
 *         return next(self.seq1)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __pyx_v_self->seq2;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyIter_Next(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":278
 *             self.loop = 0
 *             return self.val1
 *         elif self.loop == 2:             # <<<<<<<<<<<<<<
 *             return next(self.seq2)
 *         return next(self.seq1)
 */
    break;
    default: break;
  }

  /* "cytoolz/itertoolz.pyx":280
 *         elif self.loop == 2:
 *             return next(self.seq2)
 *         return next(self.seq1)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __pyx_v_self->seq1;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":255
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.loop == 0:
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted_key.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_17_merge_sorted_key_6__reduce_cython__[] = "_merge_sorted_key.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_17_merge_sorted_key_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_17_merge_sorted_key_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted_key.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_17_merge_sorted_key_8__setstate_cython__[] = "_merge_sorted_key.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_17_merge_sorted_key_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_17_merge_sorted_key_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_merge_sorted_key_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._merge_sorted_key.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":283
 * 
 * 
 * cdef object c_merge_sorted(object seqs, object key=None):             # <<<<<<<<<<<<<<
 *     if len(seqs) == 0:
 *         return iter([])
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_c_merge_sorted(PyObject *__pyx_v_seqs, struct __pyx_opt_args_7cytoolz_9itertoolz_c_merge_sorted *__pyx_optional_args) {
  PyObject *__pyx_v_key = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("c_merge_sorted", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_key = __pyx_optional_args->key;
    }
  }

  /* "cytoolz/itertoolz.pyx":284
 * 
 * cdef object c_merge_sorted(object seqs, object key=None):
 *     if len(seqs) == 0:             # <<<<<<<<<<<<<<
 *         return iter([])
 *     elif len(seqs) == 1:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_seqs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 284, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":285
 * cdef object c_merge_sorted(object seqs, object key=None):
 *     if len(seqs) == 0:
 *         return iter([])             # <<<<<<<<<<<<<<
 *     elif len(seqs) == 1:
 *         return iter(seqs[0])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":284
 * 
 * cdef object c_merge_sorted(object seqs, object key=None):
 *     if len(seqs) == 0:             # <<<<<<<<<<<<<<
 *         return iter([])
 *     elif len(seqs) == 1:
 */
  }

  /* "cytoolz/itertoolz.pyx":286
 *     if len(seqs) == 0:
 *         return iter([])
 *     elif len(seqs) == 1:             # <<<<<<<<<<<<<<
 *         return iter(seqs[0])
 *     elif key is None:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_seqs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 286, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 1) != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":287
 *         return iter([])
 *     elif len(seqs) == 1:
 *         return iter(seqs[0])             # <<<<<<<<<<<<<<
 *     elif key is None:
 *         return _merge_sorted_binary(seqs)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_seqs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":286
 *     if len(seqs) == 0:
 *         return iter([])
 *     elif len(seqs) == 1:             # <<<<<<<<<<<<<<
 *         return iter(seqs[0])
 *     elif key is None:
 */
  }

  /* "cytoolz/itertoolz.pyx":288
 *     elif len(seqs) == 1:
 *         return iter(seqs[0])
 *     elif key is None:             # <<<<<<<<<<<<<<
 *         return _merge_sorted_binary(seqs)
 *     return _merge_sorted_binary_key(seqs, key)
 */
  __pyx_t_2 = (__pyx_v_key == Py_None);
  __pyx_t_5 = (__pyx_t_2 != 0);
  if (__pyx_t_5) {

    /* "cytoolz/itertoolz.pyx":289
 *         return iter(seqs[0])
 *     elif key is None:
 *         return _merge_sorted_binary(seqs)             # <<<<<<<<<<<<<<
 *     return _merge_sorted_binary_key(seqs, key)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_f_7cytoolz_9itertoolz__merge_sorted_binary(__pyx_v_seqs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":288
 *     elif len(seqs) == 1:
 *         return iter(seqs[0])
 *     elif key is None:             # <<<<<<<<<<<<<<
 *         return _merge_sorted_binary(seqs)
 *     return _merge_sorted_binary_key(seqs, key)
 */
  }

  /* "cytoolz/itertoolz.pyx":290
 *     elif key is None:
 *         return _merge_sorted_binary(seqs)
 *     return _merge_sorted_binary_key(seqs, key)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_f_7cytoolz_9itertoolz__merge_sorted_binary_key(__pyx_v_seqs, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":283
 * 
 * 
 * cdef object c_merge_sorted(object seqs, object key=None):             # <<<<<<<<<<<<<<
 *     if len(seqs) == 0:
 *         return iter([])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytoolz.itertoolz.c_merge_sorted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":293
 * 
 * 
 * def merge_sorted(*seqs, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Merge and sort a collection of sorted collections
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_5merge_sorted(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_4merge_sorted[] = "merge_sorted(*seqs, **kwargs)\n\n    Merge and sort a collection of sorted collections\n\n    This works lazily and only keeps one value from each iterable in memory.\n\n    >>> list(merge_sorted([1, 3, 5], [2, 4, 6]))\n    [1, 2, 3, 4, 5, 6]\n\n    >>> ''.join(merge_sorted('abc', 'abc', 'abc'))\n    'aaabbbccc'\n\n    The \"key\" function used to sort the input may be passed as a keyword.\n\n    >>> list(merge_sorted([2, 3], [1, 3], key=lambda x: x // 3))\n    [2, 1, 3, 3]\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_5merge_sorted = {"merge_sorted", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_5merge_sorted, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_4merge_sorted};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_5merge_sorted(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seqs = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("merge_sorted (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "merge_sorted", 1))) return NULL;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_seqs = __pyx_args;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_4merge_sorted(__pyx_self, __pyx_v_seqs, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_4merge_sorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seqs, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_7cytoolz_9itertoolz_c_merge_sorted __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_sorted", 0);

  /* "cytoolz/itertoolz.pyx":310
 *     [2, 1, 3, 3]
 *     """
 *     if 'key' in kwargs:             # <<<<<<<<<<<<<<
 *         return c_merge_sorted(seqs, kwargs['key'])
 *     return c_merge_sorted(seqs)
 */
  __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_key, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":311
 *     """
 *     if 'key' in kwargs:
 *         return c_merge_sorted(seqs, kwargs['key'])             # <<<<<<<<<<<<<<
 *     return c_merge_sorted(seqs)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_u_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.key = __pyx_t_3;
    __pyx_t_4 = __pyx_f_7cytoolz_9itertoolz_c_merge_sorted(__pyx_v_seqs, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":310
 *     [2, 1, 3, 3]
 *     """
 *     if 'key' in kwargs:             # <<<<<<<<<<<<<<
 *         return c_merge_sorted(seqs, kwargs['key'])
 *     return c_merge_sorted(seqs)
 */
  }

  /* "cytoolz/itertoolz.pyx":312
 *     if 'key' in kwargs:
 *         return c_merge_sorted(seqs, kwargs['key'])
 *     return c_merge_sorted(seqs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_f_7cytoolz_9itertoolz_c_merge_sorted(__pyx_v_seqs, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":293
 * 
 * 
 * def merge_sorted(*seqs, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Merge and sort a collection of sorted collections
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytoolz.itertoolz.merge_sorted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":330
 *     Returns a lazy iterator
 *     """
 *     def __cinit__(self, seqs):             # <<<<<<<<<<<<<<
 *         self.iters = [iter(seq) for seq in seqs]
 *         self.newiters = []
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_10interleave_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_10interleave_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seqs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seqs,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_seqs)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 330, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_seqs = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 330, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.interleave.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10interleave___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz_interleave *)__pyx_v_self), __pyx_v_seqs);

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

static int __pyx_pf_7cytoolz_9itertoolz_10interleave___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_interleave *__pyx_v_self, PyObject *__pyx_v_seqs) {
  PyObject *__pyx_7genexpr__pyx_v_seq = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":331
 *     """
 *     def __cinit__(self, seqs):
 *         self.iters = [iter(seq) for seq in seqs]             # <<<<<<<<<<<<<<
 *         self.newiters = []
 *         self.i = 0
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_seqs)) || PyTuple_CheckExact(__pyx_v_seqs)) {
      __pyx_t_2 = __pyx_v_seqs; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_seqs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L5_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 331, __pyx_L5_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 331, __pyx_L5_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 331, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_seq, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_GetIter(__pyx_7genexpr__pyx_v_seq); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 331, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_seq); __pyx_7genexpr__pyx_v_seq = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_seq); __pyx_7genexpr__pyx_v_seq = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iters);
  __Pyx_DECREF(__pyx_v_self->iters);
  __pyx_v_self->iters = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":332
 *     def __cinit__(self, seqs):
 *         self.iters = [iter(seq) for seq in seqs]
 *         self.newiters = []             # <<<<<<<<<<<<<<
 *         self.i = 0
 *         self.n = PyList_GET_SIZE(self.iters)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->newiters);
  __Pyx_DECREF(__pyx_v_self->newiters);
  __pyx_v_self->newiters = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":333
 *         self.iters = [iter(seq) for seq in seqs]
 *         self.newiters = []
 *         self.i = 0             # <<<<<<<<<<<<<<
 *         self.n = PyList_GET_SIZE(self.iters)
 * 
 */
  __pyx_v_self->i = 0;

  /* "cytoolz/itertoolz.pyx":334
 *         self.newiters = []
 *         self.i = 0
 *         self.n = PyList_GET_SIZE(self.iters)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_1 = __pyx_v_self->iters;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_self->n = PyList_GET_SIZE(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":330
 *     Returns a lazy iterator
 *     """
 *     def __cinit__(self, seqs):             # <<<<<<<<<<<<<<
 *         self.iters = [iter(seq) for seq in seqs]
 *         self.newiters = []
 */

  /* 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_5);
  __Pyx_AddTraceback("cytoolz.itertoolz.interleave.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_seq);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":336
 *         self.n = PyList_GET_SIZE(self.iters)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10interleave_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10interleave_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10interleave_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz_interleave *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_10interleave_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_interleave *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":337
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":336
 *         self.n = PyList_GET_SIZE(self.iters)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":339
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         # This implementation is similar to what is done in `toolz` in that we
 *         # construct a new list of iterators, `self.newiters`, when a value is
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10interleave_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10interleave_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10interleave_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz_interleave *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_10interleave_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_interleave *__pyx_v_self) {
  PyObject *__pyx_v_obj;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":346
 *         cdef object val
 * 
 *         if self.i == self.n:             # <<<<<<<<<<<<<<
 *             self.n = PyList_GET_SIZE(self.newiters)
 *             self.i = 0
 */
  __pyx_t_1 = ((__pyx_v_self->i == __pyx_v_self->n) != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":347
 * 
 *         if self.i == self.n:
 *             self.n = PyList_GET_SIZE(self.newiters)             # <<<<<<<<<<<<<<
 *             self.i = 0
 *             if self.n == 0:
 */
    __pyx_t_2 = __pyx_v_self->newiters;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_self->n = PyList_GET_SIZE(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":348
 *         if self.i == self.n:
 *             self.n = PyList_GET_SIZE(self.newiters)
 *             self.i = 0             # <<<<<<<<<<<<<<
 *             if self.n == 0:
 *                 raise StopIteration
 */
    __pyx_v_self->i = 0;

    /* "cytoolz/itertoolz.pyx":349
 *             self.n = PyList_GET_SIZE(self.newiters)
 *             self.i = 0
 *             if self.n == 0:             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *             self.iters = self.newiters
 */
    __pyx_t_1 = ((__pyx_v_self->n == 0) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cytoolz/itertoolz.pyx":350
 *             self.i = 0
 *             if self.n == 0:
 *                 raise StopIteration             # <<<<<<<<<<<<<<
 *             self.iters = self.newiters
 *             self.newiters = []
 */
      __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
      __PYX_ERR(0, 350, __pyx_L1_error)

      /* "cytoolz/itertoolz.pyx":349
 *             self.n = PyList_GET_SIZE(self.newiters)
 *             self.i = 0
 *             if self.n == 0:             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *             self.iters = self.newiters
 */
    }

    /* "cytoolz/itertoolz.pyx":351
 *             if self.n == 0:
 *                 raise StopIteration
 *             self.iters = self.newiters             # <<<<<<<<<<<<<<
 *             self.newiters = []
 *         val = <object>PyList_GET_ITEM(self.iters, self.i)
 */
    __pyx_t_2 = __pyx_v_self->newiters;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->iters);
    __Pyx_DECREF(__pyx_v_self->iters);
    __pyx_v_self->iters = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":352
 *                 raise StopIteration
 *             self.iters = self.newiters
 *             self.newiters = []             # <<<<<<<<<<<<<<
 *         val = <object>PyList_GET_ITEM(self.iters, self.i)
 *         self.i += 1
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->newiters);
    __Pyx_DECREF(__pyx_v_self->newiters);
    __pyx_v_self->newiters = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":346
 *         cdef object val
 * 
 *         if self.i == self.n:             # <<<<<<<<<<<<<<
 *             self.n = PyList_GET_SIZE(self.newiters)
 *             self.i = 0
 */
  }

  /* "cytoolz/itertoolz.pyx":353
 *             self.iters = self.newiters
 *             self.newiters = []
 *         val = <object>PyList_GET_ITEM(self.iters, self.i)             # <<<<<<<<<<<<<<
 *         self.i += 1
 *         obj = PtrIter_Next(val)
 */
  __pyx_t_2 = __pyx_v_self->iters;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_v_self->i);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = ((PyObject *)__pyx_t_3);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_val = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":354
 *             self.newiters = []
 *         val = <object>PyList_GET_ITEM(self.iters, self.i)
 *         self.i += 1             # <<<<<<<<<<<<<<
 *         obj = PtrIter_Next(val)
 * 
 */
  __pyx_v_self->i = (__pyx_v_self->i + 1);

  /* "cytoolz/itertoolz.pyx":355
 *         val = <object>PyList_GET_ITEM(self.iters, self.i)
 *         self.i += 1
 *         obj = PtrIter_Next(val)             # <<<<<<<<<<<<<<
 * 
 *         # TODO: optimization opportunity.  Previously, it was possible to
 */
  __pyx_v_obj = PyIter_Next(__pyx_v_val);

  /* "cytoolz/itertoolz.pyx":360
 *         # continue on given exceptions, `self.pass_exceptions`, which is
 *         # why this code is structured this way.  Time to clean up?
 *         while obj is NULL:             # <<<<<<<<<<<<<<
 *             obj = PyErr_Occurred()
 *             if obj is not NULL:
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_obj == NULL) != 0);
    if (!__pyx_t_1) break;

    /* "cytoolz/itertoolz.pyx":361
 *         # why this code is structured this way.  Time to clean up?
 *         while obj is NULL:
 *             obj = PyErr_Occurred()             # <<<<<<<<<<<<<<
 *             if obj is not NULL:
 *                 val = <object>obj
 */
    __pyx_v_obj = PyErr_Occurred();

    /* "cytoolz/itertoolz.pyx":362
 *         while obj is NULL:
 *             obj = PyErr_Occurred()
 *             if obj is not NULL:             # <<<<<<<<<<<<<<
 *                 val = <object>obj
 *                 PyErr_Clear()
 */
    __pyx_t_1 = ((__pyx_v_obj != NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cytoolz/itertoolz.pyx":363
 *             obj = PyErr_Occurred()
 *             if obj is not NULL:
 *                 val = <object>obj             # <<<<<<<<<<<<<<
 *                 PyErr_Clear()
 *                 raise val
 */
      __pyx_t_2 = ((PyObject *)__pyx_v_obj);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytoolz/itertoolz.pyx":364
 *             if obj is not NULL:
 *                 val = <object>obj
 *                 PyErr_Clear()             # <<<<<<<<<<<<<<
 *                 raise val
 * 
 */
      PyErr_Clear();

      /* "cytoolz/itertoolz.pyx":365
 *                 val = <object>obj
 *                 PyErr_Clear()
 *                 raise val             # <<<<<<<<<<<<<<
 * 
 *             if self.i == self.n:
 */
      __Pyx_Raise(__pyx_v_val, 0, 0, 0);
      __PYX_ERR(0, 365, __pyx_L1_error)

      /* "cytoolz/itertoolz.pyx":362
 *         while obj is NULL:
 *             obj = PyErr_Occurred()
 *             if obj is not NULL:             # <<<<<<<<<<<<<<
 *                 val = <object>obj
 *                 PyErr_Clear()
 */
    }

    /* "cytoolz/itertoolz.pyx":367
 *                 raise val
 * 
 *             if self.i == self.n:             # <<<<<<<<<<<<<<
 *                 self.n = PyList_GET_SIZE(self.newiters)
 *                 self.i = 0
 */
    __pyx_t_1 = ((__pyx_v_self->i == __pyx_v_self->n) != 0);
    if (__pyx_t_1) {

      /* "cytoolz/itertoolz.pyx":368
 * 
 *             if self.i == self.n:
 *                 self.n = PyList_GET_SIZE(self.newiters)             # <<<<<<<<<<<<<<
 *                 self.i = 0
 *                 if self.n == 0:
 */
      __pyx_t_2 = __pyx_v_self->newiters;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_self->n = PyList_GET_SIZE(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cytoolz/itertoolz.pyx":369
 *             if self.i == self.n:
 *                 self.n = PyList_GET_SIZE(self.newiters)
 *                 self.i = 0             # <<<<<<<<<<<<<<
 *                 if self.n == 0:
 *                     raise StopIteration
 */
      __pyx_v_self->i = 0;

      /* "cytoolz/itertoolz.pyx":370
 *                 self.n = PyList_GET_SIZE(self.newiters)
 *                 self.i = 0
 *                 if self.n == 0:             # <<<<<<<<<<<<<<
 *                     raise StopIteration
 *                 self.iters = self.newiters
 */
      __pyx_t_1 = ((__pyx_v_self->n == 0) != 0);
      if (unlikely(__pyx_t_1)) {

        /* "cytoolz/itertoolz.pyx":371
 *                 self.i = 0
 *                 if self.n == 0:
 *                     raise StopIteration             # <<<<<<<<<<<<<<
 *                 self.iters = self.newiters
 *                 self.newiters = []
 */
        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
        __PYX_ERR(0, 371, __pyx_L1_error)

        /* "cytoolz/itertoolz.pyx":370
 *                 self.n = PyList_GET_SIZE(self.newiters)
 *                 self.i = 0
 *                 if self.n == 0:             # <<<<<<<<<<<<<<
 *                     raise StopIteration
 *                 self.iters = self.newiters
 */
      }

      /* "cytoolz/itertoolz.pyx":372
 *                 if self.n == 0:
 *                     raise StopIteration
 *                 self.iters = self.newiters             # <<<<<<<<<<<<<<
 *                 self.newiters = []
 *             val = <object>PyList_GET_ITEM(self.iters, self.i)
 */
      __pyx_t_2 = __pyx_v_self->newiters;
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->iters);
      __Pyx_DECREF(__pyx_v_self->iters);
      __pyx_v_self->iters = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytoolz/itertoolz.pyx":373
 *                     raise StopIteration
 *                 self.iters = self.newiters
 *                 self.newiters = []             # <<<<<<<<<<<<<<
 *             val = <object>PyList_GET_ITEM(self.iters, self.i)
 *             self.i += 1
 */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->newiters);
      __Pyx_DECREF(__pyx_v_self->newiters);
      __pyx_v_self->newiters = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytoolz/itertoolz.pyx":367
 *                 raise val
 * 
 *             if self.i == self.n:             # <<<<<<<<<<<<<<
 *                 self.n = PyList_GET_SIZE(self.newiters)
 *                 self.i = 0
 */
    }

    /* "cytoolz/itertoolz.pyx":374
 *                 self.iters = self.newiters
 *                 self.newiters = []
 *             val = <object>PyList_GET_ITEM(self.iters, self.i)             # <<<<<<<<<<<<<<
 *             self.i += 1
 *             obj = PtrIter_Next(val)
 */
    __pyx_t_2 = __pyx_v_self->iters;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_v_self->i);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = ((PyObject *)__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":375
 *                 self.newiters = []
 *             val = <object>PyList_GET_ITEM(self.iters, self.i)
 *             self.i += 1             # <<<<<<<<<<<<<<
 *             obj = PtrIter_Next(val)
 * 
 */
    __pyx_v_self->i = (__pyx_v_self->i + 1);

    /* "cytoolz/itertoolz.pyx":376
 *             val = <object>PyList_GET_ITEM(self.iters, self.i)
 *             self.i += 1
 *             obj = PtrIter_Next(val)             # <<<<<<<<<<<<<<
 * 
 *         PyList_Append(self.newiters, val)
 */
    __pyx_v_obj = PyIter_Next(__pyx_v_val);
  }

  /* "cytoolz/itertoolz.pyx":378
 *             obj = PtrIter_Next(val)
 * 
 *         PyList_Append(self.newiters, val)             # <<<<<<<<<<<<<<
 *         val = <object>obj
 *         Py_XDECREF(obj)
 */
  __pyx_t_2 = __pyx_v_self->newiters;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = PyList_Append(__pyx_t_2, __pyx_v_val); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":379
 * 
 *         PyList_Append(self.newiters, val)
 *         val = <object>obj             # <<<<<<<<<<<<<<
 *         Py_XDECREF(obj)
 *         return val
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_obj);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":380
 *         PyList_Append(self.newiters, val)
 *         val = <object>obj
 *         Py_XDECREF(obj)             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  Py_XDECREF(__pyx_v_obj);

  /* "cytoolz/itertoolz.pyx":381
 *         val = <object>obj
 *         Py_XDECREF(obj)
 *         return val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_val);
  __pyx_r = __pyx_v_val;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":339
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         # This implementation is similar to what is done in `toolz` in that we
 *         # construct a new list of iterators, `self.newiters`, when a value is
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz.interleave.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10interleave_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_10interleave_6__reduce_cython__[] = "interleave.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_10interleave_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_10interleave_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_10interleave_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10interleave_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10interleave_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_interleave *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_10interleave_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_interleave *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.interleave.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10interleave_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_10interleave_8__setstate_cython__[] = "interleave.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_10interleave_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_10interleave_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_10interleave_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_10interleave_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10interleave_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_interleave *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_10interleave_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_interleave *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.interleave.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":385
 * 
 * cdef class _unique_key:
 *     def __cinit__(self, object seq, object key):             # <<<<<<<<<<<<<<
 *         self.iter_seq = iter(seq)
 *         self.key = key
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_11_unique_key_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_11_unique_key_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seq,&__pyx_n_s_key,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_seq)) != 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_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 385, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 385, __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_seq = values[0];
    __pyx_v_key = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 385, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._unique_key.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_unique_key___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__unique_key *)__pyx_v_self), __pyx_v_seq, __pyx_v_key);

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

static int __pyx_pf_7cytoolz_9itertoolz_11_unique_key___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__unique_key *__pyx_v_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":386
 * cdef class _unique_key:
 *     def __cinit__(self, object seq, object key):
 *         self.iter_seq = iter(seq)             # <<<<<<<<<<<<<<
 *         self.key = key
 *         self.seen = set()
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iter_seq);
  __Pyx_DECREF(__pyx_v_self->iter_seq);
  __pyx_v_self->iter_seq = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":387
 *     def __cinit__(self, object seq, object key):
 *         self.iter_seq = iter(seq)
 *         self.key = key             # <<<<<<<<<<<<<<
 *         self.seen = set()
 * 
 */
  __Pyx_INCREF(__pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __Pyx_GOTREF(__pyx_v_self->key);
  __Pyx_DECREF(__pyx_v_self->key);
  __pyx_v_self->key = __pyx_v_key;

  /* "cytoolz/itertoolz.pyx":388
 *         self.iter_seq = iter(seq)
 *         self.key = key
 *         self.seen = set()             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->seen);
  __Pyx_DECREF(__pyx_v_self->seen);
  __pyx_v_self->seen = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":385
 * 
 * cdef class _unique_key:
 *     def __cinit__(self, object seq, object key):             # <<<<<<<<<<<<<<
 *         self.iter_seq = iter(seq)
 *         self.key = key
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._unique_key.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":390
 *         self.seen = set()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_unique_key_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_unique_key_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_unique_key_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__unique_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_unique_key_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__unique_key *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":391
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":390
 *         self.seen = set()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":393
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef object item, tag
 *         item = next(self.iter_seq)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_unique_key_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_unique_key_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_unique_key_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz__unique_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_unique_key_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__unique_key *__pyx_v_self) {
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_v_tag = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":395
 *     def __next__(self):
 *         cdef object item, tag
 *         item = next(self.iter_seq)             # <<<<<<<<<<<<<<
 *         tag = self.key(item)
 *         while PySet_Contains(self.seen, tag):
 */
  __pyx_t_1 = __pyx_v_self->iter_seq;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_item = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":396
 *         cdef object item, tag
 *         item = next(self.iter_seq)
 *         tag = self.key(item)             # <<<<<<<<<<<<<<
 *         while PySet_Contains(self.seen, tag):
 *             item = next(self.iter_seq)
 */
  __Pyx_INCREF(__pyx_v_self->key);
  __pyx_t_1 = __pyx_v_self->key; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_item) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_item);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_tag = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":397
 *         item = next(self.iter_seq)
 *         tag = self.key(item)
 *         while PySet_Contains(self.seen, tag):             # <<<<<<<<<<<<<<
 *             item = next(self.iter_seq)
 *             tag = self.key(item)
 */
  while (1) {
    __pyx_t_2 = __pyx_v_self->seen;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = PySet_Contains(__pyx_t_2, __pyx_v_tag); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = (__pyx_t_4 != 0);
    if (!__pyx_t_5) break;

    /* "cytoolz/itertoolz.pyx":398
 *         tag = self.key(item)
 *         while PySet_Contains(self.seen, tag):
 *             item = next(self.iter_seq)             # <<<<<<<<<<<<<<
 *             tag = self.key(item)
 *         PySet_Add(self.seen, tag)
 */
    __pyx_t_2 = __pyx_v_self->iter_seq;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":399
 *         while PySet_Contains(self.seen, tag):
 *             item = next(self.iter_seq)
 *             tag = self.key(item)             # <<<<<<<<<<<<<<
 *         PySet_Add(self.seen, tag)
 *         return item
 */
    __Pyx_INCREF(__pyx_v_self->key);
    __pyx_t_2 = __pyx_v_self->key; __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_item) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_item);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_1);
    __pyx_t_1 = 0;
  }

  /* "cytoolz/itertoolz.pyx":400
 *             item = next(self.iter_seq)
 *             tag = self.key(item)
 *         PySet_Add(self.seen, tag)             # <<<<<<<<<<<<<<
 *         return item
 * 
 */
  __pyx_t_1 = __pyx_v_self->seen;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PySet_Add(__pyx_t_1, __pyx_v_tag); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":401
 *             tag = self.key(item)
 *         PySet_Add(self.seen, tag)
 *         return item             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_item);
  __pyx_r = __pyx_v_item;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":393
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef object item, tag
 *         item = next(self.iter_seq)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz._unique_key.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_tag);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_unique_key_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_11_unique_key_6__reduce_cython__[] = "_unique_key.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_11_unique_key_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_unique_key_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_11_unique_key_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_unique_key_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_unique_key_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__unique_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_unique_key_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__unique_key *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._unique_key.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_unique_key_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_11_unique_key_8__setstate_cython__[] = "_unique_key.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_11_unique_key_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_unique_key_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_11_unique_key_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_unique_key_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_unique_key_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__unique_key *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_unique_key_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__unique_key *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._unique_key.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":405
 * 
 * cdef class _unique_identity:
 *     def __cinit__(self, object seq):             # <<<<<<<<<<<<<<
 *         self.iter_seq = iter(seq)
 *         self.seen = set()
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_16_unique_identity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_16_unique_identity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seq,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_seq)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 405, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_seq = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 405, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._unique_identity.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_16_unique_identity___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *)__pyx_v_self), __pyx_v_seq);

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

static int __pyx_pf_7cytoolz_9itertoolz_16_unique_identity___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *__pyx_v_self, PyObject *__pyx_v_seq) {
  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("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":406
 * cdef class _unique_identity:
 *     def __cinit__(self, object seq):
 *         self.iter_seq = iter(seq)             # <<<<<<<<<<<<<<
 *         self.seen = set()
 * 
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iter_seq);
  __Pyx_DECREF(__pyx_v_self->iter_seq);
  __pyx_v_self->iter_seq = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":407
 *     def __cinit__(self, object seq):
 *         self.iter_seq = iter(seq)
 *         self.seen = set()             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->seen);
  __Pyx_DECREF(__pyx_v_self->seen);
  __pyx_v_self->seen = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":405
 * 
 * cdef class _unique_identity:
 *     def __cinit__(self, object seq):             # <<<<<<<<<<<<<<
 *         self.iter_seq = iter(seq)
 *         self.seen = set()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._unique_identity.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":409
 *         self.seen = set()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_16_unique_identity_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_unique_identity_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":410
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":409
 *         self.seen = set()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":412
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef object item
 *         item = next(self.iter_seq)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_16_unique_identity_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_unique_identity_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *__pyx_v_self) {
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":414
 *     def __next__(self):
 *         cdef object item
 *         item = next(self.iter_seq)             # <<<<<<<<<<<<<<
 *         while PySet_Contains(self.seen, item):
 *             item = next(self.iter_seq)
 */
  __pyx_t_1 = __pyx_v_self->iter_seq;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_item = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":415
 *         cdef object item
 *         item = next(self.iter_seq)
 *         while PySet_Contains(self.seen, item):             # <<<<<<<<<<<<<<
 *             item = next(self.iter_seq)
 *         PySet_Add(self.seen, item)
 */
  while (1) {
    __pyx_t_2 = __pyx_v_self->seen;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PySet_Contains(__pyx_t_2, __pyx_v_item); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (!__pyx_t_4) break;

    /* "cytoolz/itertoolz.pyx":416
 *         item = next(self.iter_seq)
 *         while PySet_Contains(self.seen, item):
 *             item = next(self.iter_seq)             # <<<<<<<<<<<<<<
 *         PySet_Add(self.seen, item)
 *         return item
 */
    __pyx_t_2 = __pyx_v_self->iter_seq;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_1);
    __pyx_t_1 = 0;
  }

  /* "cytoolz/itertoolz.pyx":417
 *         while PySet_Contains(self.seen, item):
 *             item = next(self.iter_seq)
 *         PySet_Add(self.seen, item)             # <<<<<<<<<<<<<<
 *         return item
 * 
 */
  __pyx_t_1 = __pyx_v_self->seen;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = PySet_Add(__pyx_t_1, __pyx_v_item); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":418
 *             item = next(self.iter_seq)
 *         PySet_Add(self.seen, item)
 *         return item             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_item);
  __pyx_r = __pyx_v_item;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":412
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef object item
 *         item = next(self.iter_seq)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz._unique_identity.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_16_unique_identity_6__reduce_cython__[] = "_unique_identity.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_16_unique_identity_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_16_unique_identity_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_16_unique_identity_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_unique_identity_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._unique_identity.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_16_unique_identity_8__setstate_cython__[] = "_unique_identity.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_16_unique_identity_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_16_unique_identity_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_16_unique_identity_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_unique_identity_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._unique_identity.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":421
 * 
 * 
 * cpdef object unique(object seq, object key=None):             # <<<<<<<<<<<<<<
 *     """
 *     Return only unique elements of a sequence
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_7unique(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_unique(PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_unique *__pyx_optional_args) {
  PyObject *__pyx_v_key = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __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("unique", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_key = __pyx_optional_args->key;
    }
  }

  /* "cytoolz/itertoolz.pyx":435
 *     ('cat', 'mouse')
 *     """
 *     if key is None:             # <<<<<<<<<<<<<<
 *         return _unique_identity(seq)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_key == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":436
 *     """
 *     if key is None:
 *         return _unique_identity(seq)             # <<<<<<<<<<<<<<
 *     else:
 *         return _unique_key(seq, key)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__unique_identity), __pyx_v_seq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":435
 *     ('cat', 'mouse')
 *     """
 *     if key is None:             # <<<<<<<<<<<<<<
 *         return _unique_identity(seq)
 *     else:
 */
  }

  /* "cytoolz/itertoolz.pyx":438
 *         return _unique_identity(seq)
 *     else:
 *         return _unique_key(seq, key)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_seq);
    __Pyx_GIVEREF(__pyx_v_seq);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_seq);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_key);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__unique_key), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "cytoolz/itertoolz.pyx":421
 * 
 * 
 * cpdef object unique(object seq, object key=None):             # <<<<<<<<<<<<<<
 *     """
 *     Return only unique elements of a sequence
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytoolz.itertoolz.unique", __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_7cytoolz_9itertoolz_7unique(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_6unique[] = "unique(seq, key=None)\n\n    Return only unique elements of a sequence\n\n    >>> tuple(unique((1, 2, 3)))\n    (1, 2, 3)\n    >>> tuple(unique((1, 2, 1, 3)))\n    (1, 2, 3)\n\n    Uniqueness can be defined by key keyword\n\n    >>> tuple(unique(['cat', 'mouse', 'dog', 'hen'], key=len))\n    ('cat', 'mouse')\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_7unique = {"unique", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_7unique, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_6unique};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_7unique(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unique (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seq,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_seq)) != 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_key);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "unique") < 0)) __PYX_ERR(0, 421, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_seq = values[0];
    __pyx_v_key = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unique", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 421, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_6unique(__pyx_self, __pyx_v_seq, __pyx_v_key);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_6unique(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytoolz_9itertoolz_unique __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unique", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.key = __pyx_v_key;
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_unique(__pyx_v_seq, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":441
 * 
 * 
 * cpdef object isiterable(object x):             # <<<<<<<<<<<<<<
 *     """
 *     Is x iterable?
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_9isiterable(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_isiterable(PyObject *__pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isiterable", 0);

  /* "cytoolz/itertoolz.pyx":452
 *     False
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         iter(x)
 *         return True
 */
  {
    __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:*/ {

      /* "cytoolz/itertoolz.pyx":453
 *     """
 *     try:
 *         iter(x)             # <<<<<<<<<<<<<<
 *         return True
 *     except TypeError:
 */
      __pyx_t_4 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cytoolz/itertoolz.pyx":454
 *     try:
 *         iter(x)
 *         return True             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         pass
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L7_try_return;

      /* "cytoolz/itertoolz.pyx":452
 *     False
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         iter(x)
 *         return True
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":455
 *         iter(x)
 *         return True
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         pass
 *     return False
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "cytoolz/itertoolz.pyx":452
 *     False
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         iter(x)
 *         return True
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __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);
  }

  /* "cytoolz/itertoolz.pyx":457
 *     except TypeError:
 *         pass
 *     return False             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":441
 * 
 * 
 * cpdef object isiterable(object x):             # <<<<<<<<<<<<<<
 *     """
 *     Is x iterable?
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytoolz.itertoolz.isiterable", __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_7cytoolz_9itertoolz_9isiterable(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_8isiterable[] = "isiterable(x)\n\n    Is x iterable?\n\n    >>> isiterable([1, 2, 3])\n    True\n    >>> isiterable('abc')\n    True\n    >>> isiterable(5)\n    False\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_9isiterable = {"isiterable", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_9isiterable, METH_O, __pyx_doc_7cytoolz_9itertoolz_8isiterable};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9isiterable(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isiterable (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_8isiterable(__pyx_self, ((PyObject *)__pyx_v_x));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_8isiterable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  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("isiterable", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_isiterable(__pyx_v_x, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":460
 * 
 * 
 * cpdef object isdistinct(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     All values in sequence are distinct
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_11isdistinct(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_isdistinct(PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_seen = NULL;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isdistinct", 0);

  /* "cytoolz/itertoolz.pyx":474
 *     True
 *     """
 *     if iter(seq) is seq:             # <<<<<<<<<<<<<<
 *         seen = set()
 *         for item in seq:
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == __pyx_v_seq);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":475
 *     """
 *     if iter(seq) is seq:
 *         seen = set()             # <<<<<<<<<<<<<<
 *         for item in seq:
 *             if PySet_Contains(seen, item):
 */
    __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_seen = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":476
 *     if iter(seq) is seq:
 *         seen = set()
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             if PySet_Contains(seen, item):
 *                 return False
 */
    if (likely(PyList_CheckExact(__pyx_v_seq)) || PyTuple_CheckExact(__pyx_v_seq)) {
      __pyx_t_1 = __pyx_v_seq; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 476, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 476, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 476, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_1);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 476, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cytoolz/itertoolz.pyx":477
 *         seen = set()
 *         for item in seq:
 *             if PySet_Contains(seen, item):             # <<<<<<<<<<<<<<
 *                 return False
 *             seen.add(item)
 */
      __pyx_t_3 = PySet_Contains(__pyx_v_seen, __pyx_v_item); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 477, __pyx_L1_error)
      __pyx_t_2 = (__pyx_t_3 != 0);
      if (__pyx_t_2) {

        /* "cytoolz/itertoolz.pyx":478
 *         for item in seq:
 *             if PySet_Contains(seen, item):
 *                 return False             # <<<<<<<<<<<<<<
 *             seen.add(item)
 *         return True
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "cytoolz/itertoolz.pyx":477
 *         seen = set()
 *         for item in seq:
 *             if PySet_Contains(seen, item):             # <<<<<<<<<<<<<<
 *                 return False
 *             seen.add(item)
 */
      }

      /* "cytoolz/itertoolz.pyx":479
 *             if PySet_Contains(seen, item):
 *                 return False
 *             seen.add(item)             # <<<<<<<<<<<<<<
 *         return True
 *     else:
 */
      __pyx_t_7 = PySet_Add(__pyx_v_seen, __pyx_v_item); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 479, __pyx_L1_error)

      /* "cytoolz/itertoolz.pyx":476
 *     if iter(seq) is seq:
 *         seen = set()
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             if PySet_Contains(seen, item):
 *                 return False
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":480
 *                 return False
 *             seen.add(item)
 *         return True             # <<<<<<<<<<<<<<
 *     else:
 *         return len(seq) == len(set(seq))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":474
 *     True
 *     """
 *     if iter(seq) is seq:             # <<<<<<<<<<<<<<
 *         seen = set()
 *         for item in seq:
 */
  }

  /* "cytoolz/itertoolz.pyx":482
 *         return True
 *     else:
 *         return len(seq) == len(set(seq))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 482, __pyx_L1_error)
    __pyx_t_1 = PySet_New(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 482, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_t_4 == __pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "cytoolz/itertoolz.pyx":460
 * 
 * 
 * cpdef object isdistinct(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     All values in sequence are distinct
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytoolz.itertoolz.isdistinct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_seen);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11isdistinct(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_10isdistinct[] = "isdistinct(seq)\n\n    All values in sequence are distinct\n\n    >>> isdistinct([1, 2, 3])\n    True\n    >>> isdistinct([1, 2, 1])\n    False\n\n    >>> isdistinct(\"Hello\")\n    False\n    >>> isdistinct(\"World\")\n    True\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_11isdistinct = {"isdistinct", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11isdistinct, METH_O, __pyx_doc_7cytoolz_9itertoolz_10isdistinct};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11isdistinct(PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isdistinct (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_10isdistinct(__pyx_self, ((PyObject *)__pyx_v_seq));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_10isdistinct(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  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("isdistinct", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_isdistinct(__pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":485
 * 
 * 
 * cpdef object take(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The first n elements of a sequence
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_13take(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_take(Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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("take", 0);

  /* "cytoolz/itertoolz.pyx":496
 *         tail
 *     """
 *     return islice(seq, n)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_islice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_seq, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_seq, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_seq);
    __Pyx_GIVEREF(__pyx_v_seq);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_seq);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":485
 * 
 * 
 * cpdef object take(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The first n elements of a sequence
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytoolz.itertoolz.take", __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_7cytoolz_9itertoolz_13take(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_12take[] = "take(Py_ssize_t n, seq)\n\n    The first n elements of a sequence\n\n    >>> list(take(2, [10, 20, 30, 40, 50]))\n    [10, 20]\n\n    See Also:\n        drop\n        tail\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_13take = {"take", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_13take, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_12take};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13take(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_seq,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_n)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take", 1, 2, 2, 1); __PYX_ERR(0, 485, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take") < 0)) __PYX_ERR(0, 485, __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_n = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_n == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 485, __pyx_L3_error)
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 485, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.take", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12take(__pyx_self, __pyx_v_n, __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12take(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq) {
  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("take", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_take(__pyx_v_n, __pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":499
 * 
 * 
 * cpdef object tail(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The last n elements of a sequence
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_15tail(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_tail(Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  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("tail", 0);

  /* "cytoolz/itertoolz.pyx":510
 *         take
 *     """
 *     if PySequence_Check(seq):             # <<<<<<<<<<<<<<
 *         return seq[-n:]
 *     return tuple(deque(seq, n))
 */
  __pyx_t_1 = (PySequence_Check(__pyx_v_seq) != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":511
 *     """
 *     if PySequence_Check(seq):
 *         return seq[-n:]             # <<<<<<<<<<<<<<
 *     return tuple(deque(seq, n))
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_seq, (-__pyx_v_n), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":510
 *         take
 *     """
 *     if PySequence_Check(seq):             # <<<<<<<<<<<<<<
 *         return seq[-n:]
 *     return tuple(deque(seq, n))
 */
  }

  /* "cytoolz/itertoolz.pyx":512
 *     if PySequence_Check(seq):
 *         return seq[-n:]
 *     return tuple(deque(seq, n))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_deque); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 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_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_seq, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_seq, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_seq);
    __Pyx_GIVEREF(__pyx_v_seq);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_seq);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":499
 * 
 * 
 * cpdef object tail(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The last n elements of a sequence
 */

  /* 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_7);
  __Pyx_AddTraceback("cytoolz.itertoolz.tail", __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_7cytoolz_9itertoolz_15tail(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_14tail[] = "tail(Py_ssize_t n, seq)\n\n    The last n elements of a sequence\n\n    >>> tail(2, [10, 20, 30, 40, 50])\n    [40, 50]\n\n    See Also:\n        drop\n        take\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_15tail = {"tail", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_15tail, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_14tail};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_15tail(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tail (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_seq,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_n)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("tail", 1, 2, 2, 1); __PYX_ERR(0, 499, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tail") < 0)) __PYX_ERR(0, 499, __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_n = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_n == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L3_error)
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tail", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 499, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.tail", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14tail(__pyx_self, __pyx_v_n, __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_14tail(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq) {
  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("tail", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_tail(__pyx_v_n, __pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":515
 * 
 * 
 * cpdef object drop(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The sequence following the first n elements
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_17drop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_drop(Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_iter_seq = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("drop", 0);

  /* "cytoolz/itertoolz.pyx":526
 *         tail
 *     """
 *     if n < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('n argument for drop() must be non-negative')
 *     cdef Py_ssize_t i
 */
  __pyx_t_1 = ((__pyx_v_n < 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cytoolz/itertoolz.pyx":527
 *     """
 *     if n < 0:
 *         raise ValueError('n argument for drop() must be non-negative')             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     cdef object iter_seq
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 527, __pyx_L1_error)

    /* "cytoolz/itertoolz.pyx":526
 *         tail
 *     """
 *     if n < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('n argument for drop() must be non-negative')
 *     cdef Py_ssize_t i
 */
  }

  /* "cytoolz/itertoolz.pyx":530
 *     cdef Py_ssize_t i
 *     cdef object iter_seq
 *     iter_seq = iter(seq)             # <<<<<<<<<<<<<<
 *     try:
 *         for i in range(n):
 */
  __pyx_t_2 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_iter_seq = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":531
 *     cdef object iter_seq
 *     iter_seq = iter(seq)
 *     try:             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             next(iter_seq)
 */
  {
    __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:*/ {

      /* "cytoolz/itertoolz.pyx":532
 *     iter_seq = iter(seq)
 *     try:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             next(iter_seq)
 *     except StopIteration:
 */
      __pyx_t_6 = __pyx_v_n;
      __pyx_t_7 = __pyx_t_6;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
        __pyx_v_i = __pyx_t_8;

        /* "cytoolz/itertoolz.pyx":533
 *     try:
 *         for i in range(n):
 *             next(iter_seq)             # <<<<<<<<<<<<<<
 *     except StopIteration:
 *         pass
 */
        __pyx_t_2 = __Pyx_PyIter_Next(__pyx_v_iter_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "cytoolz/itertoolz.pyx":531
 *     cdef object iter_seq
 *     iter_seq = iter(seq)
 *     try:             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             next(iter_seq)
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":534
 *         for i in range(n):
 *             next(iter_seq)
 *     except StopIteration:             # <<<<<<<<<<<<<<
 *         pass
 *     return iter_seq
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "cytoolz/itertoolz.pyx":531
 *     cdef object iter_seq
 *     iter_seq = iter(seq)
 *     try:             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             next(iter_seq)
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L9_try_end:;
  }

  /* "cytoolz/itertoolz.pyx":536
 *     except StopIteration:
 *         pass
 *     return iter_seq             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_iter_seq);
  __pyx_r = __pyx_v_iter_seq;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":515
 * 
 * 
 * cpdef object drop(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The sequence following the first n elements
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz.drop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_iter_seq);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17drop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_16drop[] = "drop(Py_ssize_t n, seq)\n\n    The sequence following the first n elements\n\n    >>> list(drop(2, [10, 20, 30, 40, 50]))\n    [30, 40, 50]\n\n    See Also:\n        take\n        tail\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_17drop = {"drop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_17drop, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_16drop};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17drop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("drop (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_seq,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_n)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("drop", 1, 2, 2, 1); __PYX_ERR(0, 515, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "drop") < 0)) __PYX_ERR(0, 515, __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_n = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_n == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 515, __pyx_L3_error)
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("drop", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 515, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.drop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_16drop(__pyx_self, __pyx_v_n, __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_16drop(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq) {
  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("drop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_drop(__pyx_v_n, __pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":539
 * 
 * 
 * cpdef object take_nth(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Every nth item in seq
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_19take_nth(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_take_nth(Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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("take_nth", 0);

  /* "cytoolz/itertoolz.pyx":546
 *     [10, 30, 50]
 *     """
 *     return islice(seq, 0, None, n)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_islice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_seq, __pyx_int_0, Py_None, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_seq, __pyx_int_0, Py_None, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_seq);
    __Pyx_GIVEREF(__pyx_v_seq);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_seq);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_int_0);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, Py_None);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":539
 * 
 * 
 * cpdef object take_nth(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Every nth item in seq
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytoolz.itertoolz.take_nth", __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_7cytoolz_9itertoolz_19take_nth(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_18take_nth[] = "take_nth(Py_ssize_t n, seq)\n\n    Every nth item in seq\n\n    >>> list(take_nth(2, [10, 20, 30, 40, 50]))\n    [10, 30, 50]\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_19take_nth = {"take_nth", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_19take_nth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_18take_nth};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19take_nth(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_nth (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_seq,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_n)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_nth", 1, 2, 2, 1); __PYX_ERR(0, 539, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_nth") < 0)) __PYX_ERR(0, 539, __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_n = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_n == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 539, __pyx_L3_error)
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_nth", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 539, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.take_nth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_18take_nth(__pyx_self, __pyx_v_n, __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_18take_nth(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq) {
  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("take_nth", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_take_nth(__pyx_v_n, __pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":549
 * 
 * 
 * cpdef object first(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The first element in a sequence
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_21first(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_first(PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  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("first", 0);

  /* "cytoolz/itertoolz.pyx":556
 *     'A'
 *     """
 *     return next(iter(seq))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __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;

  /* "cytoolz/itertoolz.pyx":549
 * 
 * 
 * cpdef object first(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The first element in a sequence
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz.first", __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_7cytoolz_9itertoolz_21first(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_20first[] = "first(seq)\n\n    The first element in a sequence\n\n    >>> first('ABC')\n    'A'\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_21first = {"first", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_21first, METH_O, __pyx_doc_7cytoolz_9itertoolz_20first};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_21first(PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("first (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_20first(__pyx_self, ((PyObject *)__pyx_v_seq));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_20first(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  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("first", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_first(__pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":559
 * 
 * 
 * cpdef object second(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The second element in a sequence
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_23second(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_second(PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  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("second", 0);
  __Pyx_INCREF(__pyx_v_seq);

  /* "cytoolz/itertoolz.pyx":566
 *     'B'
 *     """
 *     seq = iter(seq)             # <<<<<<<<<<<<<<
 *     next(seq)
 *     return next(seq)
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_seq, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":567
 *     """
 *     seq = iter(seq)
 *     next(seq)             # <<<<<<<<<<<<<<
 *     return next(seq)
 * 
 */
  __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":568
 *     seq = iter(seq)
 *     next(seq)
 *     return next(seq)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":559
 * 
 * 
 * cpdef object second(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The second element in a sequence
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.second", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_seq);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_23second(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_22second[] = "second(seq)\n\n    The second element in a sequence\n\n    >>> second('ABC')\n    'B'\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_23second = {"second", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_23second, METH_O, __pyx_doc_7cytoolz_9itertoolz_22second};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_23second(PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("second (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_22second(__pyx_self, ((PyObject *)__pyx_v_seq));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_22second(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  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("second", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_second(__pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":571
 * 
 * 
 * cpdef object nth(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The nth element in a sequence
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_25nth(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_nth(Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nth", 0);
  __Pyx_INCREF(__pyx_v_seq);

  /* "cytoolz/itertoolz.pyx":578
 *     'B'
 *     """
 *     if PySequence_Check(seq):             # <<<<<<<<<<<<<<
 *         return seq[n]
 *     if n < 0:
 */
  __pyx_t_1 = (PySequence_Check(__pyx_v_seq) != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":579
 *     """
 *     if PySequence_Check(seq):
 *         return seq[n]             # <<<<<<<<<<<<<<
 *     if n < 0:
 *         raise ValueError('"n" must be positive when indexing an iterator')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_seq, __pyx_v_n, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":578
 *     'B'
 *     """
 *     if PySequence_Check(seq):             # <<<<<<<<<<<<<<
 *         return seq[n]
 *     if n < 0:
 */
  }

  /* "cytoolz/itertoolz.pyx":580
 *     if PySequence_Check(seq):
 *         return seq[n]
 *     if n < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('"n" must be positive when indexing an iterator')
 *     seq = iter(seq)
 */
  __pyx_t_1 = ((__pyx_v_n < 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cytoolz/itertoolz.pyx":581
 *         return seq[n]
 *     if n < 0:
 *         raise ValueError('"n" must be positive when indexing an iterator')             # <<<<<<<<<<<<<<
 *     seq = iter(seq)
 *     while n > 0:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 581, __pyx_L1_error)

    /* "cytoolz/itertoolz.pyx":580
 *     if PySequence_Check(seq):
 *         return seq[n]
 *     if n < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('"n" must be positive when indexing an iterator')
 *     seq = iter(seq)
 */
  }

  /* "cytoolz/itertoolz.pyx":582
 *     if n < 0:
 *         raise ValueError('"n" must be positive when indexing an iterator')
 *     seq = iter(seq)             # <<<<<<<<<<<<<<
 *     while n > 0:
 *         n -= 1
 */
  __pyx_t_2 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_seq, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":583
 *         raise ValueError('"n" must be positive when indexing an iterator')
 *     seq = iter(seq)
 *     while n > 0:             # <<<<<<<<<<<<<<
 *         n -= 1
 *         next(seq)
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_n > 0) != 0);
    if (!__pyx_t_1) break;

    /* "cytoolz/itertoolz.pyx":584
 *     seq = iter(seq)
 *     while n > 0:
 *         n -= 1             # <<<<<<<<<<<<<<
 *         next(seq)
 *     return next(seq)
 */
    __pyx_v_n = (__pyx_v_n - 1);

    /* "cytoolz/itertoolz.pyx":585
 *     while n > 0:
 *         n -= 1
 *         next(seq)             # <<<<<<<<<<<<<<
 *     return next(seq)
 * 
 */
    __pyx_t_2 = __Pyx_PyIter_Next(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cytoolz/itertoolz.pyx":586
 *         n -= 1
 *         next(seq)
 *     return next(seq)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyIter_Next(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":571
 * 
 * 
 * cpdef object nth(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The nth element in a sequence
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz.nth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_seq);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_25nth(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_24nth[] = "nth(Py_ssize_t n, seq)\n\n    The nth element in a sequence\n\n    >>> nth(1, 'ABC')\n    'B'\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_25nth = {"nth", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_25nth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_24nth};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_25nth(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nth (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_seq,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_n)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("nth", 1, 2, 2, 1); __PYX_ERR(0, 571, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nth") < 0)) __PYX_ERR(0, 571, __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_n = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_n == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 571, __pyx_L3_error)
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("nth", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 571, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.nth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_24nth(__pyx_self, __pyx_v_n, __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_24nth(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq) {
  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("nth", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_nth(__pyx_v_n, __pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":589
 * 
 * 
 * cpdef object last(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The last element in a sequence
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_27last(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_last(PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("last", 0);

  /* "cytoolz/itertoolz.pyx":597
 *     """
 *     cdef object val
 *     if PySequence_Check(seq):             # <<<<<<<<<<<<<<
 *         return seq[-1]
 *     val = no_default
 */
  __pyx_t_1 = (PySequence_Check(__pyx_v_seq) != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":598
 *     cdef object val
 *     if PySequence_Check(seq):
 *         return seq[-1]             # <<<<<<<<<<<<<<
 *     val = no_default
 *     for val in seq:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_seq, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":597
 *     """
 *     cdef object val
 *     if PySequence_Check(seq):             # <<<<<<<<<<<<<<
 *         return seq[-1]
 *     val = no_default
 */
  }

  /* "cytoolz/itertoolz.pyx":599
 *     if PySequence_Check(seq):
 *         return seq[-1]
 *     val = no_default             # <<<<<<<<<<<<<<
 *     for val in seq:
 *         pass
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_val = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":600
 *         return seq[-1]
 *     val = no_default
 *     for val in seq:             # <<<<<<<<<<<<<<
 *         pass
 *     if val == no_default:
 */
  if (likely(PyList_CheckExact(__pyx_v_seq)) || PyTuple_CheckExact(__pyx_v_seq)) {
    __pyx_t_2 = __pyx_v_seq; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 600, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_5);
    __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":602
 *     for val in seq:
 *         pass
 *     if val == no_default:             # <<<<<<<<<<<<<<
 *         raise IndexError
 *     return val
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(__pyx_t_1)) {

    /* "cytoolz/itertoolz.pyx":603
 *         pass
 *     if val == no_default:
 *         raise IndexError             # <<<<<<<<<<<<<<
 *     return val
 * 
 */
    __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
    __PYX_ERR(0, 603, __pyx_L1_error)

    /* "cytoolz/itertoolz.pyx":602
 *     for val in seq:
 *         pass
 *     if val == no_default:             # <<<<<<<<<<<<<<
 *         raise IndexError
 *     return val
 */
  }

  /* "cytoolz/itertoolz.pyx":604
 *     if val == no_default:
 *         raise IndexError
 *     return val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_val);
  __pyx_r = __pyx_v_val;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":589
 * 
 * 
 * cpdef object last(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The last element in a sequence
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytoolz.itertoolz.last", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_27last(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_26last[] = "last(seq)\n\n    The last element in a sequence\n\n    >>> last('ABC')\n    'C'\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_27last = {"last", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_27last, METH_O, __pyx_doc_7cytoolz_9itertoolz_26last};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_27last(PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("last (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_26last(__pyx_self, ((PyObject *)__pyx_v_seq));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_26last(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  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("last", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_last(__pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":607
 * 
 * 
 * cpdef object rest(object seq):             # <<<<<<<<<<<<<<
 *     seq = iter(seq)
 *     next(seq)
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_29rest(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_rest(PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  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("rest", 0);
  __Pyx_INCREF(__pyx_v_seq);

  /* "cytoolz/itertoolz.pyx":608
 * 
 * cpdef object rest(object seq):
 *     seq = iter(seq)             # <<<<<<<<<<<<<<
 *     next(seq)
 *     return seq
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_seq, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":609
 * cpdef object rest(object seq):
 *     seq = iter(seq)
 *     next(seq)             # <<<<<<<<<<<<<<
 *     return seq
 * 
 */
  __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":610
 *     seq = iter(seq)
 *     next(seq)
 *     return seq             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_seq);
  __pyx_r = __pyx_v_seq;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":607
 * 
 * 
 * cpdef object rest(object seq):             # <<<<<<<<<<<<<<
 *     seq = iter(seq)
 *     next(seq)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.rest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_seq);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_29rest(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_28rest[] = "rest(seq)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_29rest = {"rest", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_29rest, METH_O, __pyx_doc_7cytoolz_9itertoolz_28rest};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_29rest(PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rest (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_28rest(__pyx_self, ((PyObject *)__pyx_v_seq));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_28rest(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  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("rest", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_rest(__pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":617
 * 
 * 
 * cpdef object get(object ind, object seq, object default='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     Get element in a sequence or dict
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_31get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_get(PyObject *__pyx_v_ind, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_get *__pyx_optional_args) {
  PyObject *__pyx_v_default = ((PyObject *)__pyx_n_u_no__default);
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_obj;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default = __pyx_optional_args->__pyx_default;
    }
  }

  /* "cytoolz/itertoolz.pyx":655
 *     cdef tuple result
 *     cdef PyObject *obj
 *     if isinstance(ind, list):             # <<<<<<<<<<<<<<
 *         i = PyList_GET_SIZE(ind)
 *         result = PyTuple_New(i)
 */
  __pyx_t_1 = PyList_Check(__pyx_v_ind); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":656
 *     cdef PyObject *obj
 *     if isinstance(ind, list):
 *         i = PyList_GET_SIZE(ind)             # <<<<<<<<<<<<<<
 *         result = PyTuple_New(i)
 *         # List of indices, no default
 */
    __pyx_v_i = PyList_GET_SIZE(__pyx_v_ind);

    /* "cytoolz/itertoolz.pyx":657
 *     if isinstance(ind, list):
 *         i = PyList_GET_SIZE(ind)
 *         result = PyTuple_New(i)             # <<<<<<<<<<<<<<
 *         # List of indices, no default
 *         if default == no_default:
 */
    __pyx_t_3 = PyTuple_New(__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_result = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytoolz/itertoolz.pyx":659
 *         result = PyTuple_New(i)
 *         # List of indices, no default
 *         if default == no_default:             # <<<<<<<<<<<<<<
 *             for i, val in enumerate(ind):
 *                 val = seq[val]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_no_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_default, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":660
 *         # List of indices, no default
 *         if default == no_default:
 *             for i, val in enumerate(ind):             # <<<<<<<<<<<<<<
 *                 val = seq[val]
 *                 Py_INCREF(val)
 */
      __pyx_t_5 = 0;
      if (likely(PyList_CheckExact(__pyx_v_ind)) || PyTuple_CheckExact(__pyx_v_ind)) {
        __pyx_t_4 = __pyx_v_ind; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 660, __pyx_L1_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          } else {
            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 660, __pyx_L1_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_7(__pyx_t_4);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 660, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_v_i = __pyx_t_5;
        __pyx_t_5 = (__pyx_t_5 + 1);

        /* "cytoolz/itertoolz.pyx":661
 *         if default == no_default:
 *             for i, val in enumerate(ind):
 *                 val = seq[val]             # <<<<<<<<<<<<<<
 *                 Py_INCREF(val)
 *                 PyTuple_SET_ITEM(result, i, val)
 */
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_seq, __pyx_v_val); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "cytoolz/itertoolz.pyx":662
 *             for i, val in enumerate(ind):
 *                 val = seq[val]
 *                 Py_INCREF(val)             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(result, i, val)
 *             return result
 */
        Py_INCREF(__pyx_v_val);

        /* "cytoolz/itertoolz.pyx":663
 *                 val = seq[val]
 *                 Py_INCREF(val)
 *                 PyTuple_SET_ITEM(result, i, val)             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
        PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_v_val);

        /* "cytoolz/itertoolz.pyx":660
 *         # List of indices, no default
 *         if default == no_default:
 *             for i, val in enumerate(ind):             # <<<<<<<<<<<<<<
 *                 val = seq[val]
 *                 Py_INCREF(val)
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cytoolz/itertoolz.pyx":664
 *                 Py_INCREF(val)
 *                 PyTuple_SET_ITEM(result, i, val)
 *             return result             # <<<<<<<<<<<<<<
 * 
 *         # List of indices with default
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":659
 *         result = PyTuple_New(i)
 *         # List of indices, no default
 *         if default == no_default:             # <<<<<<<<<<<<<<
 *             for i, val in enumerate(ind):
 *                 val = seq[val]
 */
    }

    /* "cytoolz/itertoolz.pyx":667
 * 
 *         # List of indices with default
 *         for i, val in enumerate(ind):             # <<<<<<<<<<<<<<
 *             obj = PtrObject_GetItem(seq, val)
 *             if obj is NULL:
 */
    __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_v_ind)) || PyTuple_CheckExact(__pyx_v_ind)) {
      __pyx_t_4 = __pyx_v_ind; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 667, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 667, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 667, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__pyx_t_4);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 667, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_v_i = __pyx_t_5;
      __pyx_t_5 = (__pyx_t_5 + 1);

      /* "cytoolz/itertoolz.pyx":668
 *         # List of indices with default
 *         for i, val in enumerate(ind):
 *             obj = PtrObject_GetItem(seq, val)             # <<<<<<<<<<<<<<
 *             if obj is NULL:
 *                 val = <object>PyErr_Occurred()
 */
      __pyx_v_obj = PyObject_GetItem(__pyx_v_seq, __pyx_v_val);

      /* "cytoolz/itertoolz.pyx":669
 *         for i, val in enumerate(ind):
 *             obj = PtrObject_GetItem(seq, val)
 *             if obj is NULL:             # <<<<<<<<<<<<<<
 *                 val = <object>PyErr_Occurred()
 *                 PyErr_Clear()
 */
      __pyx_t_2 = ((__pyx_v_obj == NULL) != 0);
      if (__pyx_t_2) {

        /* "cytoolz/itertoolz.pyx":670
 *             obj = PtrObject_GetItem(seq, val)
 *             if obj is NULL:
 *                 val = <object>PyErr_Occurred()             # <<<<<<<<<<<<<<
 *                 PyErr_Clear()
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):
 */
        __pyx_t_8 = PyErr_Occurred();
        __pyx_t_3 = ((PyObject *)__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "cytoolz/itertoolz.pyx":671
 *             if obj is NULL:
 *                 val = <object>PyErr_Occurred()
 *                 PyErr_Clear()             # <<<<<<<<<<<<<<
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):
 *                     raise val
 */
        PyErr_Clear();

        /* "cytoolz/itertoolz.pyx":672
 *                 val = <object>PyErr_Occurred()
 *                 PyErr_Clear()
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):             # <<<<<<<<<<<<<<
 *                     raise val
 *                 Py_INCREF(default)
 */
        __pyx_t_3 = __pyx_v_7cytoolz_9itertoolz__get_list_exc;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_2 = ((!(PyErr_GivenExceptionMatches(__pyx_v_val, __pyx_t_3) != 0)) != 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(__pyx_t_2)) {

          /* "cytoolz/itertoolz.pyx":673
 *                 PyErr_Clear()
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):
 *                     raise val             # <<<<<<<<<<<<<<
 *                 Py_INCREF(default)
 *                 PyTuple_SET_ITEM(result, i, default)
 */
          __Pyx_Raise(__pyx_v_val, 0, 0, 0);
          __PYX_ERR(0, 673, __pyx_L1_error)

          /* "cytoolz/itertoolz.pyx":672
 *                 val = <object>PyErr_Occurred()
 *                 PyErr_Clear()
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):             # <<<<<<<<<<<<<<
 *                     raise val
 *                 Py_INCREF(default)
 */
        }

        /* "cytoolz/itertoolz.pyx":674
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):
 *                     raise val
 *                 Py_INCREF(default)             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(result, i, default)
 *             else:
 */
        Py_INCREF(__pyx_v_default);

        /* "cytoolz/itertoolz.pyx":675
 *                     raise val
 *                 Py_INCREF(default)
 *                 PyTuple_SET_ITEM(result, i, default)             # <<<<<<<<<<<<<<
 *             else:
 *                 val = <object>obj
 */
        PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_v_default);

        /* "cytoolz/itertoolz.pyx":669
 *         for i, val in enumerate(ind):
 *             obj = PtrObject_GetItem(seq, val)
 *             if obj is NULL:             # <<<<<<<<<<<<<<
 *                 val = <object>PyErr_Occurred()
 *                 PyErr_Clear()
 */
        goto __pyx_L9;
      }

      /* "cytoolz/itertoolz.pyx":677
 *                 PyTuple_SET_ITEM(result, i, default)
 *             else:
 *                 val = <object>obj             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(result, i, val)
 *         return result
 */
      /*else*/ {
        __pyx_t_3 = ((PyObject *)__pyx_v_obj);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "cytoolz/itertoolz.pyx":678
 *             else:
 *                 val = <object>obj
 *                 PyTuple_SET_ITEM(result, i, val)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
        PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_v_val);
      }
      __pyx_L9:;

      /* "cytoolz/itertoolz.pyx":667
 * 
 *         # List of indices with default
 *         for i, val in enumerate(ind):             # <<<<<<<<<<<<<<
 *             obj = PtrObject_GetItem(seq, val)
 *             if obj is NULL:
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":679
 *                 val = <object>obj
 *                 PyTuple_SET_ITEM(result, i, val)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     obj = PtrObject_GetItem(seq, ind)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":655
 *     cdef tuple result
 *     cdef PyObject *obj
 *     if isinstance(ind, list):             # <<<<<<<<<<<<<<
 *         i = PyList_GET_SIZE(ind)
 *         result = PyTuple_New(i)
 */
  }

  /* "cytoolz/itertoolz.pyx":681
 *         return result
 * 
 *     obj = PtrObject_GetItem(seq, ind)             # <<<<<<<<<<<<<<
 *     if obj is NULL:
 *         val = <object>PyErr_Occurred()
 */
  __pyx_v_obj = PyObject_GetItem(__pyx_v_seq, __pyx_v_ind);

  /* "cytoolz/itertoolz.pyx":682
 * 
 *     obj = PtrObject_GetItem(seq, ind)
 *     if obj is NULL:             # <<<<<<<<<<<<<<
 *         val = <object>PyErr_Occurred()
 *         PyErr_Clear()
 */
  __pyx_t_2 = ((__pyx_v_obj == NULL) != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":683
 *     obj = PtrObject_GetItem(seq, ind)
 *     if obj is NULL:
 *         val = <object>PyErr_Occurred()             # <<<<<<<<<<<<<<
 *         PyErr_Clear()
 *         if default == no_default:
 */
    __pyx_t_8 = PyErr_Occurred();
    __pyx_t_4 = ((PyObject *)__pyx_t_8);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_v_val = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":684
 *     if obj is NULL:
 *         val = <object>PyErr_Occurred()
 *         PyErr_Clear()             # <<<<<<<<<<<<<<
 *         if default == no_default:
 *             raise val
 */
    PyErr_Clear();

    /* "cytoolz/itertoolz.pyx":685
 *         val = <object>PyErr_Occurred()
 *         PyErr_Clear()
 *         if default == no_default:             # <<<<<<<<<<<<<<
 *             raise val
 *         if PyErr_GivenExceptionMatches(val, _get_exceptions):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_no_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_default, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 685, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 685, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__pyx_t_2)) {

      /* "cytoolz/itertoolz.pyx":686
 *         PyErr_Clear()
 *         if default == no_default:
 *             raise val             # <<<<<<<<<<<<<<
 *         if PyErr_GivenExceptionMatches(val, _get_exceptions):
 *             return default
 */
      __Pyx_Raise(__pyx_v_val, 0, 0, 0);
      __PYX_ERR(0, 686, __pyx_L1_error)

      /* "cytoolz/itertoolz.pyx":685
 *         val = <object>PyErr_Occurred()
 *         PyErr_Clear()
 *         if default == no_default:             # <<<<<<<<<<<<<<
 *             raise val
 *         if PyErr_GivenExceptionMatches(val, _get_exceptions):
 */
    }

    /* "cytoolz/itertoolz.pyx":687
 *         if default == no_default:
 *             raise val
 *         if PyErr_GivenExceptionMatches(val, _get_exceptions):             # <<<<<<<<<<<<<<
 *             return default
 *         raise val
 */
    __pyx_t_3 = __pyx_v_7cytoolz_9itertoolz__get_exceptions;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = (PyErr_GivenExceptionMatches(__pyx_v_val, __pyx_t_3) != 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":688
 *             raise val
 *         if PyErr_GivenExceptionMatches(val, _get_exceptions):
 *             return default             # <<<<<<<<<<<<<<
 *         raise val
 *     val = <object>obj
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_default);
      __pyx_r = __pyx_v_default;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":687
 *         if default == no_default:
 *             raise val
 *         if PyErr_GivenExceptionMatches(val, _get_exceptions):             # <<<<<<<<<<<<<<
 *             return default
 *         raise val
 */
    }

    /* "cytoolz/itertoolz.pyx":689
 *         if PyErr_GivenExceptionMatches(val, _get_exceptions):
 *             return default
 *         raise val             # <<<<<<<<<<<<<<
 *     val = <object>obj
 *     Py_XDECREF(obj)
 */
    __Pyx_Raise(__pyx_v_val, 0, 0, 0);
    __PYX_ERR(0, 689, __pyx_L1_error)

    /* "cytoolz/itertoolz.pyx":682
 * 
 *     obj = PtrObject_GetItem(seq, ind)
 *     if obj is NULL:             # <<<<<<<<<<<<<<
 *         val = <object>PyErr_Occurred()
 *         PyErr_Clear()
 */
  }

  /* "cytoolz/itertoolz.pyx":690
 *             return default
 *         raise val
 *     val = <object>obj             # <<<<<<<<<<<<<<
 *     Py_XDECREF(obj)
 *     return val
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_obj);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_val = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytoolz/itertoolz.pyx":691
 *         raise val
 *     val = <object>obj
 *     Py_XDECREF(obj)             # <<<<<<<<<<<<<<
 *     return val
 * 
 */
  Py_XDECREF(__pyx_v_obj);

  /* "cytoolz/itertoolz.pyx":692
 *     val = <object>obj
 *     Py_XDECREF(obj)
 *     return val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_val);
  __pyx_r = __pyx_v_val;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":617
 * 
 * 
 * cpdef object get(object ind, object seq, object default='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     Get element in a sequence or dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytoolz.itertoolz.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_31get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_30get[] = "get(ind, seq, default=u'__no__default__')\n\n    Get element in a sequence or dict\n\n    Provides standard indexing\n\n    >>> get(1, 'ABC')       # Same as 'ABC'[1]\n    'B'\n\n    Pass a list to get multiple values\n\n    >>> get([1, 2], 'ABC')  # ('ABC'[1], 'ABC'[2])\n    ('B', 'C')\n\n    Works on any value that supports indexing/getitem\n    For example here we see that it works with dictionaries\n\n    >>> phonebook = {'Alice':  '555-1234',\n    ...              'Bob':    '555-5678',\n    ...              'Charlie':'555-9999'}\n    >>> get('Alice', phonebook)\n    '555-1234'\n\n    >>> get(['Alice', 'Bob'], phonebook)\n    ('555-1234', '555-5678')\n\n    Provide a default for missing values\n\n    >>> get(['Alice', 'Dennis'], phonebook, None)\n    ('555-1234', None)\n\n    See Also:\n        pluck\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_31get = {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_31get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_30get};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_31get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ind = 0;
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_v_default = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ind,&__pyx_n_s_seq,&__pyx_n_s_default,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_n_u_no__default);
    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_ind)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get", 0, 2, 3, 1); __PYX_ERR(0, 617, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 617, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ind = values[0];
    __pyx_v_seq = values[1];
    __pyx_v_default = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 617, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_30get(__pyx_self, __pyx_v_ind, __pyx_v_seq, __pyx_v_default);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_30get(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seq, PyObject *__pyx_v_default) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytoolz_9itertoolz_get __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.__pyx_default = __pyx_v_default;
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_get(__pyx_v_ind, __pyx_v_seq, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":695
 * 
 * 
 * cpdef object concat(object seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate zero or more iterables, any of which may be infinite.
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_33concat(PyObject *__pyx_self, PyObject *__pyx_v_seqs); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_concat(PyObject *__pyx_v_seqs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("concat", 0);

  /* "cytoolz/itertoolz.pyx":711
 *         itertools.chain.from_iterable  equivalent
 *     """
 *     return chain.from_iterable(seqs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chain); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_from_iterable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_seqs) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_seqs);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":695
 * 
 * 
 * cpdef object concat(object seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate zero or more iterables, any of which may be infinite.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz.concat", __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_7cytoolz_9itertoolz_33concat(PyObject *__pyx_self, PyObject *__pyx_v_seqs); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_32concat[] = "concat(seqs)\n\n    Concatenate zero or more iterables, any of which may be infinite.\n\n    An infinite sequence will prevent the rest of the arguments from\n    being included.\n\n    We use chain.from_iterable rather than ``chain(*seqs)`` so that seqs\n    can be a generator.\n\n    >>> list(concat([[], [1], [2, 3]]))\n    [1, 2, 3]\n\n    See also:\n        itertools.chain.from_iterable  equivalent\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_33concat = {"concat", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_33concat, METH_O, __pyx_doc_7cytoolz_9itertoolz_32concat};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_33concat(PyObject *__pyx_self, PyObject *__pyx_v_seqs) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("concat (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_32concat(__pyx_self, ((PyObject *)__pyx_v_seqs));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_32concat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seqs) {
  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("concat", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_concat(__pyx_v_seqs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":714
 * 
 * 
 * def concatv(*seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Variadic version of concat
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_35concatv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_34concatv[] = "concatv(*seqs)\n\n    Variadic version of concat\n\n    >>> list(concatv([], [\"a\"], [\"b\", \"c\"]))\n    ['a', 'b', 'c']\n\n    See also:\n        itertools.chain\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_35concatv = {"concatv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_35concatv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_34concatv};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_35concatv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seqs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("concatv (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "concatv", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_seqs = __pyx_args;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_34concatv(__pyx_self, __pyx_v_seqs);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_34concatv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seqs) {
  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("concatv", 0);

  /* "cytoolz/itertoolz.pyx":724
 *         itertools.chain
 *     """
 *     return chain.from_iterable(seqs)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chain); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_from_iterable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_seqs) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_seqs);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":714
 * 
 * 
 * def concatv(*seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Variadic version of concat
 */

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

/* "cytoolz/itertoolz.pyx":727
 * 
 * 
 * cpdef object mapcat(object func, object seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Apply func to each sequence in seqs, concatenating results.
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_37mapcat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_mapcat(PyObject *__pyx_v_func, PyObject *__pyx_v_seqs, CYTHON_UNUSED int __pyx_skip_dispatch) {
  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("mapcat", 0);

  /* "cytoolz/itertoolz.pyx":735
 *     ['A', 'B', 'C', 'D', 'E']
 *     """
 *     return concat(map(func, seqs))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_func);
  __Pyx_GIVEREF(__pyx_v_func);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_func);
  __Pyx_INCREF(__pyx_v_seqs);
  __Pyx_GIVEREF(__pyx_v_seqs);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_seqs);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_concat(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __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;

  /* "cytoolz/itertoolz.pyx":727
 * 
 * 
 * cpdef object mapcat(object func, object seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Apply func to each sequence in seqs, concatenating results.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz.mapcat", __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_7cytoolz_9itertoolz_37mapcat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_36mapcat[] = "mapcat(func, seqs)\n\n    Apply func to each sequence in seqs, concatenating results.\n\n    >>> list(mapcat(lambda s: [c.upper() for c in s],\n    ...             [[\"a\", \"b\"], [\"c\", \"d\", \"e\"]]))\n    ['A', 'B', 'C', 'D', 'E']\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_37mapcat = {"mapcat", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_37mapcat, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_36mapcat};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_37mapcat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_seqs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mapcat (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,&__pyx_n_s_seqs,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_func)) != 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_seqs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mapcat", 1, 2, 2, 1); __PYX_ERR(0, 727, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mapcat") < 0)) __PYX_ERR(0, 727, __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_func = values[0];
    __pyx_v_seqs = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mapcat", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 727, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.mapcat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_36mapcat(__pyx_self, __pyx_v_func, __pyx_v_seqs);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_36mapcat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_seqs) {
  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("mapcat", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_mapcat(__pyx_v_func, __pyx_v_seqs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":738
 * 
 * 
 * cpdef object cons(object el, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Add el to beginning of (possibly infinite) sequence seq.
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_39cons(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_cons(PyObject *__pyx_v_el, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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("cons", 0);

  /* "cytoolz/itertoolz.pyx":745
 *     [1, 2, 3]
 *     """
 *     return chain((el,), seq)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chain); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_el);
  __Pyx_GIVEREF(__pyx_v_el);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_el);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_seq};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_seq};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 745, __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_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_seq);
    __Pyx_GIVEREF(__pyx_v_seq);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_seq);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":738
 * 
 * 
 * cpdef object cons(object el, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Add el to beginning of (possibly infinite) sequence seq.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytoolz.itertoolz.cons", __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_7cytoolz_9itertoolz_39cons(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_38cons[] = "cons(el, seq)\n\n    Add el to beginning of (possibly infinite) sequence seq.\n\n    >>> list(cons(1, [2, 3]))\n    [1, 2, 3]\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_39cons = {"cons", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_39cons, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_38cons};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_39cons(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_el = 0;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cons (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_el,&__pyx_n_s_seq,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_el)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cons", 1, 2, 2, 1); __PYX_ERR(0, 738, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cons") < 0)) __PYX_ERR(0, 738, __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_el = values[0];
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cons", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 738, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.cons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_38cons(__pyx_self, __pyx_v_el, __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_38cons(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_el, PyObject *__pyx_v_seq) {
  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("cons", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_cons(__pyx_v_el, __pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":756
 *     [1, 'a', 2, 'a', 3]
 *     """
 *     def __cinit__(self, object el, object seq):             # <<<<<<<<<<<<<<
 *         self.el = el
 *         self.iter_seq = iter(seq)
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_9interpose_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_9interpose_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_el = 0;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_el,&__pyx_n_s_seq,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_el)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 756, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 756, __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_el = values[0];
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 756, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.interpose.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_9interpose___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz_interpose *)__pyx_v_self), __pyx_v_el, __pyx_v_seq);

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

static int __pyx_pf_7cytoolz_9itertoolz_9interpose___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_interpose *__pyx_v_self, PyObject *__pyx_v_el, PyObject *__pyx_v_seq) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":757
 *     """
 *     def __cinit__(self, object el, object seq):
 *         self.el = el             # <<<<<<<<<<<<<<
 *         self.iter_seq = iter(seq)
 *         self.do_el = False
 */
  __Pyx_INCREF(__pyx_v_el);
  __Pyx_GIVEREF(__pyx_v_el);
  __Pyx_GOTREF(__pyx_v_self->el);
  __Pyx_DECREF(__pyx_v_self->el);
  __pyx_v_self->el = __pyx_v_el;

  /* "cytoolz/itertoolz.pyx":758
 *     def __cinit__(self, object el, object seq):
 *         self.el = el
 *         self.iter_seq = iter(seq)             # <<<<<<<<<<<<<<
 *         self.do_el = False
 *         try:
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iter_seq);
  __Pyx_DECREF(__pyx_v_self->iter_seq);
  __pyx_v_self->iter_seq = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":759
 *         self.el = el
 *         self.iter_seq = iter(seq)
 *         self.do_el = False             # <<<<<<<<<<<<<<
 *         try:
 *             self.val = next(self.iter_seq)
 */
  __pyx_v_self->do_el = 0;

  /* "cytoolz/itertoolz.pyx":760
 *         self.iter_seq = iter(seq)
 *         self.do_el = False
 *         try:             # <<<<<<<<<<<<<<
 *             self.val = next(self.iter_seq)
 *         except StopIteration:
 */
  {
    __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:*/ {

      /* "cytoolz/itertoolz.pyx":761
 *         self.do_el = False
 *         try:
 *             self.val = next(self.iter_seq)             # <<<<<<<<<<<<<<
 *         except StopIteration:
 *             self.do_el = True
 */
      __pyx_t_1 = __pyx_v_self->iter_seq;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GIVEREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_v_self->val);
      __Pyx_DECREF(__pyx_v_self->val);
      __pyx_v_self->val = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "cytoolz/itertoolz.pyx":760
 *         self.iter_seq = iter(seq)
 *         self.do_el = False
 *         try:             # <<<<<<<<<<<<<<
 *             self.val = next(self.iter_seq)
 *         except StopIteration:
 */
    }
    __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;

    /* "cytoolz/itertoolz.pyx":762
 *         try:
 *             self.val = next(self.iter_seq)
 *         except StopIteration:             # <<<<<<<<<<<<<<
 *             self.do_el = True
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cytoolz.itertoolz.interpose.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 762, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);

      /* "cytoolz/itertoolz.pyx":763
 *             self.val = next(self.iter_seq)
 *         except StopIteration:
 *             self.do_el = True             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
      __pyx_v_self->do_el = 1;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "cytoolz/itertoolz.pyx":760
 *         self.iter_seq = iter(seq)
 *         self.do_el = False
 *         try:             # <<<<<<<<<<<<<<
 *             self.val = next(self.iter_seq)
 *         except StopIteration:
 */
    __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_L4_exception_handled:;
    __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);
    __pyx_L8_try_end:;
  }

  /* "cytoolz/itertoolz.pyx":756
 *     [1, 'a', 2, 'a', 3]
 *     """
 *     def __cinit__(self, object el, object seq):             # <<<<<<<<<<<<<<
 *         self.el = el
 *         self.iter_seq = iter(seq)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytoolz.itertoolz.interpose.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":765
 *             self.do_el = True
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9interpose_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9interpose_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_9interpose_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz_interpose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_9interpose_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_interpose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":766
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":765
 *             self.do_el = True
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":768
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.do_el:
 *             self.val = next(self.iter_seq)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9interpose_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9interpose_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_9interpose_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz_interpose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_9interpose_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_interpose *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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("__next__", 0);

  /* "cytoolz/itertoolz.pyx":769
 * 
 *     def __next__(self):
 *         if self.do_el:             # <<<<<<<<<<<<<<
 *             self.val = next(self.iter_seq)
 *             self.do_el = False
 */
  __pyx_t_1 = (__pyx_v_self->do_el != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":770
 *     def __next__(self):
 *         if self.do_el:
 *             self.val = next(self.iter_seq)             # <<<<<<<<<<<<<<
 *             self.do_el = False
 *             return self.el
 */
    __pyx_t_2 = __pyx_v_self->iter_seq;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->val);
    __Pyx_DECREF(__pyx_v_self->val);
    __pyx_v_self->val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cytoolz/itertoolz.pyx":771
 *         if self.do_el:
 *             self.val = next(self.iter_seq)
 *             self.do_el = False             # <<<<<<<<<<<<<<
 *             return self.el
 *         else:
 */
    __pyx_v_self->do_el = 0;

    /* "cytoolz/itertoolz.pyx":772
 *             self.val = next(self.iter_seq)
 *             self.do_el = False
 *             return self.el             # <<<<<<<<<<<<<<
 *         else:
 *             self.do_el = True
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->el);
    __pyx_r = __pyx_v_self->el;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":769
 * 
 *     def __next__(self):
 *         if self.do_el:             # <<<<<<<<<<<<<<
 *             self.val = next(self.iter_seq)
 *             self.do_el = False
 */
  }

  /* "cytoolz/itertoolz.pyx":774
 *             return self.el
 *         else:
 *             self.do_el = True             # <<<<<<<<<<<<<<
 *             return self.val
 * 
 */
  /*else*/ {
    __pyx_v_self->do_el = 1;

    /* "cytoolz/itertoolz.pyx":775
 *         else:
 *             self.do_el = True
 *             return self.val             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->val);
    __pyx_r = __pyx_v_self->val;
    goto __pyx_L0;
  }

  /* "cytoolz/itertoolz.pyx":768
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.do_el:
 *             self.val = next(self.iter_seq)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz.interpose.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9interpose_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_9interpose_6__reduce_cython__[] = "interpose.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_9interpose_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_9interpose_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_9interpose_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9interpose_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_9interpose_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_interpose *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_9interpose_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_interpose *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.interpose.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9interpose_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_9interpose_8__setstate_cython__[] = "interpose.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_9interpose_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_9interpose_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_9interpose_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9interpose_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_9interpose_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_interpose *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_9interpose_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_interpose *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.interpose.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":778
 * 
 * 
 * cpdef dict frequencies(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Find number of occurrences of each value in seq
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_41frequencies(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_frequencies(PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_obj;
  Py_ssize_t __pyx_v_val;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("frequencies", 0);

  /* "cytoolz/itertoolz.pyx":789
 *         groupby
 *     """
 *     cdef dict d = {}             # <<<<<<<<<<<<<<
 *     cdef PyObject *obj
 *     cdef Py_ssize_t val
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_d = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":792
 *     cdef PyObject *obj
 *     cdef Py_ssize_t val
 *     for item in seq:             # <<<<<<<<<<<<<<
 *         obj = PyDict_GetItem(d, item)
 *         if obj is NULL:
 */
  if (likely(PyList_CheckExact(__pyx_v_seq)) || PyTuple_CheckExact(__pyx_v_seq)) {
    __pyx_t_1 = __pyx_v_seq; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 792, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 792, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 792, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 792, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":793
 *     cdef Py_ssize_t val
 *     for item in seq:
 *         obj = PyDict_GetItem(d, item)             # <<<<<<<<<<<<<<
 *         if obj is NULL:
 *             d[item] = 1
 */
    __pyx_v_obj = PyDict_GetItem(__pyx_v_d, __pyx_v_item);

    /* "cytoolz/itertoolz.pyx":794
 *     for item in seq:
 *         obj = PyDict_GetItem(d, item)
 *         if obj is NULL:             # <<<<<<<<<<<<<<
 *             d[item] = 1
 *         else:
 */
    __pyx_t_5 = ((__pyx_v_obj == NULL) != 0);
    if (__pyx_t_5) {

      /* "cytoolz/itertoolz.pyx":795
 *         obj = PyDict_GetItem(d, item)
 *         if obj is NULL:
 *             d[item] = 1             # <<<<<<<<<<<<<<
 *         else:
 *             val = <object>obj
 */
      if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_item, __pyx_int_1) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)

      /* "cytoolz/itertoolz.pyx":794
 *     for item in seq:
 *         obj = PyDict_GetItem(d, item)
 *         if obj is NULL:             # <<<<<<<<<<<<<<
 *             d[item] = 1
 *         else:
 */
      goto __pyx_L5;
    }

    /* "cytoolz/itertoolz.pyx":797
 *             d[item] = 1
 *         else:
 *             val = <object>obj             # <<<<<<<<<<<<<<
 *             d[item] = val + 1
 *     return d
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(((PyObject *)__pyx_v_obj)); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 797, __pyx_L1_error)
      __pyx_v_val = __pyx_t_6;

      /* "cytoolz/itertoolz.pyx":798
 *         else:
 *             val = <object>obj
 *             d[item] = val + 1             # <<<<<<<<<<<<<<
 *     return d
 * 
 */
      __pyx_t_4 = PyInt_FromSsize_t((__pyx_v_val + 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 798, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(PyDict_SetItem(__pyx_v_d, __pyx_v_item, __pyx_t_4) < 0)) __PYX_ERR(0, 798, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L5:;

    /* "cytoolz/itertoolz.pyx":792
 *     cdef PyObject *obj
 *     cdef Py_ssize_t val
 *     for item in seq:             # <<<<<<<<<<<<<<
 *         obj = PyDict_GetItem(d, item)
 *         if obj is NULL:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":799
 *             val = <object>obj
 *             d[item] = val + 1
 *     return d             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":778
 * 
 * 
 * cpdef dict frequencies(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Find number of occurrences of each value in seq
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytoolz.itertoolz.frequencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_41frequencies(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_40frequencies[] = "frequencies(seq) -> dict\n\n    Find number of occurrences of each value in seq\n\n    >>> frequencies(['cat', 'cat', 'ox', 'pig', 'pig', 'cat'])  #doctest: +SKIP\n    {'cat': 3, 'ox': 1, 'pig': 2}\n\n    See Also:\n        countby\n        groupby\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_41frequencies = {"frequencies", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_41frequencies, METH_O, __pyx_doc_7cytoolz_9itertoolz_40frequencies};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_41frequencies(PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frequencies (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_40frequencies(__pyx_self, ((PyObject *)__pyx_v_seq));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_40frequencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  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("frequencies", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_frequencies(__pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":802
 * 
 * 
 * cdef inline object _reduceby_core(dict d, object key, object item, object binop,             # <<<<<<<<<<<<<<
 *                                 object init, bint skip_init, bint call_init):
 *     cdef PyObject *obj = PyDict_GetItem(d, key)
 */

static CYTHON_INLINE PyObject *__pyx_f_7cytoolz_9itertoolz__reduceby_core(PyObject *__pyx_v_d, PyObject *__pyx_v_key, PyObject *__pyx_v_item, PyObject *__pyx_v_binop, PyObject *__pyx_v_init, int __pyx_v_skip_init, int __pyx_v_call_init) {
  PyObject *__pyx_v_obj;
  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;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_reduceby_core", 0);

  /* "cytoolz/itertoolz.pyx":804
 * cdef inline object _reduceby_core(dict d, object key, object item, object binop,
 *                                 object init, bint skip_init, bint call_init):
 *     cdef PyObject *obj = PyDict_GetItem(d, key)             # <<<<<<<<<<<<<<
 *     if obj is not NULL:
 *         PyDict_SetItem(d, key, binop(<object>obj, item))
 */
  __pyx_v_obj = PyDict_GetItem(__pyx_v_d, __pyx_v_key);

  /* "cytoolz/itertoolz.pyx":805
 *                                 object init, bint skip_init, bint call_init):
 *     cdef PyObject *obj = PyDict_GetItem(d, key)
 *     if obj is not NULL:             # <<<<<<<<<<<<<<
 *         PyDict_SetItem(d, key, binop(<object>obj, item))
 *     elif skip_init:
 */
  __pyx_t_1 = ((__pyx_v_obj != NULL) != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":806
 *     cdef PyObject *obj = PyDict_GetItem(d, key)
 *     if obj is not NULL:
 *         PyDict_SetItem(d, key, binop(<object>obj, item))             # <<<<<<<<<<<<<<
 *     elif skip_init:
 *         PyDict_SetItem(d, key, item)
 */
    __Pyx_INCREF(__pyx_v_binop);
    __pyx_t_3 = __pyx_v_binop; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_obj), __pyx_v_item};
      __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, 806, __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, ((PyObject *)__pyx_v_obj), __pyx_v_item};
      __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, 806, __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, 806, __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(((PyObject *)__pyx_v_obj));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_obj));
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_obj));
      __Pyx_INCREF(__pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_item);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = PyDict_SetItem(__pyx_v_d, __pyx_v_key, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 806, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":805
 *                                 object init, bint skip_init, bint call_init):
 *     cdef PyObject *obj = PyDict_GetItem(d, key)
 *     if obj is not NULL:             # <<<<<<<<<<<<<<
 *         PyDict_SetItem(d, key, binop(<object>obj, item))
 *     elif skip_init:
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":807
 *     if obj is not NULL:
 *         PyDict_SetItem(d, key, binop(<object>obj, item))
 *     elif skip_init:             # <<<<<<<<<<<<<<
 *         PyDict_SetItem(d, key, item)
 *     elif call_init:
 */
  __pyx_t_1 = (__pyx_v_skip_init != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":808
 *         PyDict_SetItem(d, key, binop(<object>obj, item))
 *     elif skip_init:
 *         PyDict_SetItem(d, key, item)             # <<<<<<<<<<<<<<
 *     elif call_init:
 *         PyDict_SetItem(d, key, binop(init(), item))
 */
    __pyx_t_5 = PyDict_SetItem(__pyx_v_d, __pyx_v_key, __pyx_v_item); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 808, __pyx_L1_error)

    /* "cytoolz/itertoolz.pyx":807
 *     if obj is not NULL:
 *         PyDict_SetItem(d, key, binop(<object>obj, item))
 *     elif skip_init:             # <<<<<<<<<<<<<<
 *         PyDict_SetItem(d, key, item)
 *     elif call_init:
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":809
 *     elif skip_init:
 *         PyDict_SetItem(d, key, item)
 *     elif call_init:             # <<<<<<<<<<<<<<
 *         PyDict_SetItem(d, key, binop(init(), item))
 *     else:
 */
  __pyx_t_1 = (__pyx_v_call_init != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":810
 *         PyDict_SetItem(d, key, item)
 *     elif call_init:
 *         PyDict_SetItem(d, key, binop(init(), item))             # <<<<<<<<<<<<<<
 *     else:
 *         PyDict_SetItem(d, key, binop(init, item))
 */
    __Pyx_INCREF(__pyx_v_init);
    __pyx_t_6 = __pyx_v_init; __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_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_v_binop);
    __pyx_t_6 = __pyx_v_binop; __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    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 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_item};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_item};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 810, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_5, __pyx_t_3);
      __Pyx_INCREF(__pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_5, __pyx_v_item);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = PyDict_SetItem(__pyx_v_d, __pyx_v_key, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 810, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":809
 *     elif skip_init:
 *         PyDict_SetItem(d, key, item)
 *     elif call_init:             # <<<<<<<<<<<<<<
 *         PyDict_SetItem(d, key, binop(init(), item))
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":812
 *         PyDict_SetItem(d, key, binop(init(), item))
 *     else:
 *         PyDict_SetItem(d, key, binop(init, item))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_binop);
    __pyx_t_6 = __pyx_v_binop; __pyx_t_7 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_init, __pyx_v_item};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_init, __pyx_v_item};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_init);
      __Pyx_GIVEREF(__pyx_v_init);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_v_init);
      __Pyx_INCREF(__pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_item);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = PyDict_SetItem(__pyx_v_d, __pyx_v_key, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 812, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "cytoolz/itertoolz.pyx":802
 * 
 * 
 * cdef inline object _reduceby_core(dict d, object key, object item, object binop,             # <<<<<<<<<<<<<<
 *                                 object init, bint skip_init, bint call_init):
 *     cdef PyObject *obj = PyDict_GetItem(d, key)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytoolz.itertoolz._reduceby_core", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":815
 * 
 * 
 * cpdef dict reduceby(object key, object binop, object seq, object init='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     Perform a simultaneous groupby and reduction
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_43reduceby(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_reduceby(PyObject *__pyx_v_key, PyObject *__pyx_v_binop, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_reduceby *__pyx_optional_args) {
  PyObject *__pyx_v_init = ((PyObject *)__pyx_n_u_no__default);
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_v_keyval = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  int __pyx_v_skip_init;
  int __pyx_v_call_init;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reduceby", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_init = __pyx_optional_args->init;
    }
  }

  /* "cytoolz/itertoolz.pyx":877
 *      False: set([1, 3])}
 *     """
 *     cdef dict d = {}             # <<<<<<<<<<<<<<
 *     cdef object item, keyval
 *     cdef Py_ssize_t i, N
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_d = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":880
 *     cdef object item, keyval
 *     cdef Py_ssize_t i, N
 *     cdef bint skip_init = init == no_default             # <<<<<<<<<<<<<<
 *     cdef bint call_init = callable(init)
 *     if callable(key):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_no_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_init, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 880, __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 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_skip_init = __pyx_t_3;

  /* "cytoolz/itertoolz.pyx":881
 *     cdef Py_ssize_t i, N
 *     cdef bint skip_init = init == no_default
 *     cdef bint call_init = callable(init)             # <<<<<<<<<<<<<<
 *     if callable(key):
 *         for item in seq:
 */
  __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_init); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 881, __pyx_L1_error)
  __pyx_v_call_init = __pyx_t_3;

  /* "cytoolz/itertoolz.pyx":882
 *     cdef bint skip_init = init == no_default
 *     cdef bint call_init = callable(init)
 *     if callable(key):             # <<<<<<<<<<<<<<
 *         for item in seq:
 *             keyval = key(item)
 */
  __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_key); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 882, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "cytoolz/itertoolz.pyx":883
 *     cdef bint call_init = callable(init)
 *     if callable(key):
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = key(item)
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 */
    if (likely(PyList_CheckExact(__pyx_v_seq)) || PyTuple_CheckExact(__pyx_v_seq)) {
      __pyx_t_2 = __pyx_v_seq; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 883, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 883, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__pyx_t_2);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 883, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":884
 *     if callable(key):
 *         for item in seq:
 *             keyval = key(item)             # <<<<<<<<<<<<<<
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 *     elif isinstance(key, list):
 */
      __Pyx_INCREF(__pyx_v_key);
      __pyx_t_7 = __pyx_v_key; __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_item) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_item);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_keyval, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":885
 *         for item in seq:
 *             keyval = key(item)
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)             # <<<<<<<<<<<<<<
 *     elif isinstance(key, list):
 *         N = PyList_GET_SIZE(key)
 */
      __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz__reduceby_core(__pyx_v_d, __pyx_v_keyval, __pyx_v_item, __pyx_v_binop, __pyx_v_init, __pyx_v_skip_init, __pyx_v_call_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":883
 *     cdef bint call_init = callable(init)
 *     if callable(key):
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = key(item)
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":882
 *     cdef bint skip_init = init == no_default
 *     cdef bint call_init = callable(init)
 *     if callable(key):             # <<<<<<<<<<<<<<
 *         for item in seq:
 *             keyval = key(item)
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":886
 *             keyval = key(item)
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 *     elif isinstance(key, list):             # <<<<<<<<<<<<<<
 *         N = PyList_GET_SIZE(key)
 *         for item in seq:
 */
  __pyx_t_4 = PyList_Check(__pyx_v_key); 
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":887
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 *     elif isinstance(key, list):
 *         N = PyList_GET_SIZE(key)             # <<<<<<<<<<<<<<
 *         for item in seq:
 *             keyval = PyTuple_New(N)
 */
    __pyx_v_N = PyList_GET_SIZE(__pyx_v_key);

    /* "cytoolz/itertoolz.pyx":888
 *     elif isinstance(key, list):
 *         N = PyList_GET_SIZE(key)
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = PyTuple_New(N)
 *             for i in range(N):
 */
    if (likely(PyList_CheckExact(__pyx_v_seq)) || PyTuple_CheckExact(__pyx_v_seq)) {
      __pyx_t_2 = __pyx_v_seq; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 888, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 888, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 888, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__pyx_t_2);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 888, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":889
 *         N = PyList_GET_SIZE(key)
 *         for item in seq:
 *             keyval = PyTuple_New(N)             # <<<<<<<<<<<<<<
 *             for i in range(N):
 *                 val = <object>PyList_GET_ITEM(key, i)
 */
      __pyx_t_1 = PyTuple_New(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_keyval, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":890
 *         for item in seq:
 *             keyval = PyTuple_New(N)
 *             for i in range(N):             # <<<<<<<<<<<<<<
 *                 val = <object>PyList_GET_ITEM(key, i)
 *                 val = item[val]
 */
      __pyx_t_9 = __pyx_v_N;
      __pyx_t_10 = __pyx_t_9;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "cytoolz/itertoolz.pyx":891
 *             keyval = PyTuple_New(N)
 *             for i in range(N):
 *                 val = <object>PyList_GET_ITEM(key, i)             # <<<<<<<<<<<<<<
 *                 val = item[val]
 *                 Py_INCREF(val)
 */
        __pyx_t_12 = PyList_GET_ITEM(__pyx_v_key, __pyx_v_i);
        __pyx_t_1 = ((PyObject *)__pyx_t_12);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "cytoolz/itertoolz.pyx":892
 *             for i in range(N):
 *                 val = <object>PyList_GET_ITEM(key, i)
 *                 val = item[val]             # <<<<<<<<<<<<<<
 *                 Py_INCREF(val)
 *                 PyTuple_SET_ITEM(keyval, i, val)
 */
        __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_item, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "cytoolz/itertoolz.pyx":893
 *                 val = <object>PyList_GET_ITEM(key, i)
 *                 val = item[val]
 *                 Py_INCREF(val)             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(keyval, i, val)
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 */
        Py_INCREF(__pyx_v_val);

        /* "cytoolz/itertoolz.pyx":894
 *                 val = item[val]
 *                 Py_INCREF(val)
 *                 PyTuple_SET_ITEM(keyval, i, val)             # <<<<<<<<<<<<<<
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 *     else:
 */
        PyTuple_SET_ITEM(__pyx_v_keyval, __pyx_v_i, __pyx_v_val);
      }

      /* "cytoolz/itertoolz.pyx":895
 *                 Py_INCREF(val)
 *                 PyTuple_SET_ITEM(keyval, i, val)
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)             # <<<<<<<<<<<<<<
 *     else:
 *         for item in seq:
 */
      __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz__reduceby_core(__pyx_v_d, __pyx_v_keyval, __pyx_v_item, __pyx_v_binop, __pyx_v_init, __pyx_v_skip_init, __pyx_v_call_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":888
 *     elif isinstance(key, list):
 *         N = PyList_GET_SIZE(key)
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = PyTuple_New(N)
 *             for i in range(N):
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":886
 *             keyval = key(item)
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 *     elif isinstance(key, list):             # <<<<<<<<<<<<<<
 *         N = PyList_GET_SIZE(key)
 *         for item in seq:
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":897
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 *     else:
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = item[key]
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 */
  /*else*/ {
    if (likely(PyList_CheckExact(__pyx_v_seq)) || PyTuple_CheckExact(__pyx_v_seq)) {
      __pyx_t_2 = __pyx_v_seq; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 897, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 897, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__pyx_t_2);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 897, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":898
 *     else:
 *         for item in seq:
 *             keyval = item[key]             # <<<<<<<<<<<<<<
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 *     return d
 */
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_item, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_keyval, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":899
 *         for item in seq:
 *             keyval = item[key]
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)             # <<<<<<<<<<<<<<
 *     return d
 * 
 */
      __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz__reduceby_core(__pyx_v_d, __pyx_v_keyval, __pyx_v_item, __pyx_v_binop, __pyx_v_init, __pyx_v_skip_init, __pyx_v_call_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":897
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 *     else:
 *         for item in seq:             # <<<<<<<<<<<<<<
 *             keyval = item[key]
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "cytoolz/itertoolz.pyx":900
 *             keyval = item[key]
 *             _reduceby_core(d, keyval, item, binop, init, skip_init, call_init)
 *     return d             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":815
 * 
 * 
 * cpdef dict reduceby(object key, object binop, object seq, object init='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     Perform a simultaneous groupby and reduction
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytoolz.itertoolz.reduceby", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_keyval);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_43reduceby(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_42reduceby[] = "reduceby(key, binop, seq, init=u'__no__default__') -> dict\n\n    Perform a simultaneous groupby and reduction\n\n    The computation:\n\n    >>> result = reduceby(key, binop, seq, init)      # doctest: +SKIP\n\n    is equivalent to the following:\n\n    >>> def reduction(group):                           # doctest: +SKIP\n    ...     return reduce(binop, group, init)           # doctest: +SKIP\n\n    >>> groups = groupby(key, seq)                    # doctest: +SKIP\n    >>> result = valmap(reduction, groups)              # doctest: +SKIP\n\n    But the former does not build the intermediate groups, allowing it to\n    operate in much less space.  This makes it suitable for larger datasets\n    that do not fit comfortably in memory\n\n    The ``init`` keyword argument is the default initialization of the\n    reduction.  This can be either a constant value like ``0`` or a callable\n    like ``lambda : 0`` as might be used in ``defaultdict``.\n\n    Simple Examples\n    ---------------\n\n    >>> from operator import add, mul\n    >>> iseven = lambda x: x % 2 == 0\n\n    >>> data = [1, 2, 3, 4, 5]\n\n    >>> reduceby(iseven, add, data)  # doctest: +SKIP\n    {False: 9, True: 6}\n\n    >>> reduceby(iseven, mul, data)  # doctest: +SKIP\n    {False: 15, True: 8}\n\n    Complex Example\n    ---------------\n\n    >>> projects = [{'name': 'build roads', 'state': 'CA', 'cost': 1000000},\n    ...             {'name': 'fight crime', 'state': 'IL', 'cost': 100000},\n    ...             {'name': 'help farmers', 'state': 'IL', 'cost': 2000000},\n    ...             {'name': 'help farmers', 'state': 'CA', 'cost': 200000}]\n\n    >>> reduceby('state',                        # doctest: +SKIP\n    ...          lambda acc, x: acc + x['cost'],\n    ...          projects, 0)\n    {'CA': 1200000, 'IL': 2100000}\n\n    Example Using ``init``\n    ----------------------\n\n    >>> def set_add(s, i):\n    ...     s.add(i)\n    ...     return s\n\n    >>> reduceby(iseven, set_add, [1, 2, ""3, 4, 1, 2, 3], set)  # doctest: +SKIP\n    {True:  set([2, 4]),\n     False: set([1, 3])}\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_43reduceby = {"reduceby", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_43reduceby, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_42reduceby};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_43reduceby(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_binop = 0;
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_v_init = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reduceby (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_binop,&__pyx_n_s_seq,&__pyx_n_s_init,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)__pyx_n_u_no__default);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 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_binop)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("reduceby", 0, 3, 4, 1); __PYX_ERR(0, 815, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("reduceby", 0, 3, 4, 2); __PYX_ERR(0, 815, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reduceby") < 0)) __PYX_ERR(0, 815, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_key = values[0];
    __pyx_v_binop = values[1];
    __pyx_v_seq = values[2];
    __pyx_v_init = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reduceby", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 815, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.reduceby", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_42reduceby(__pyx_self, __pyx_v_key, __pyx_v_binop, __pyx_v_seq, __pyx_v_init);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_42reduceby(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_key, PyObject *__pyx_v_binop, PyObject *__pyx_v_seq, PyObject *__pyx_v_init) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytoolz_9itertoolz_reduceby __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reduceby", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.init = __pyx_v_init;
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_reduceby(__pyx_v_key, __pyx_v_binop, __pyx_v_seq, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":930
 *     8
 *     """
 *     def __cinit__(self, object func, object x):             # <<<<<<<<<<<<<<
 *         self.func = func
 *         self.x = x
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_7iterate_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_7iterate_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_x = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,&__pyx_n_s_x,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_func)) != 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_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 930, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 930, __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_func = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 930, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.iterate.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_7iterate___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz_iterate *)__pyx_v_self), __pyx_v_func, __pyx_v_x);

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

static int __pyx_pf_7cytoolz_9itertoolz_7iterate___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_iterate *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_x) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":931
 *     """
 *     def __cinit__(self, object func, object x):
 *         self.func = func             # <<<<<<<<<<<<<<
 *         self.x = x
 *         self.val = self  # sentinel
 */
  __Pyx_INCREF(__pyx_v_func);
  __Pyx_GIVEREF(__pyx_v_func);
  __Pyx_GOTREF(__pyx_v_self->func);
  __Pyx_DECREF(__pyx_v_self->func);
  __pyx_v_self->func = __pyx_v_func;

  /* "cytoolz/itertoolz.pyx":932
 *     def __cinit__(self, object func, object x):
 *         self.func = func
 *         self.x = x             # <<<<<<<<<<<<<<
 *         self.val = self  # sentinel
 * 
 */
  __Pyx_INCREF(__pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  __Pyx_GOTREF(__pyx_v_self->x);
  __Pyx_DECREF(__pyx_v_self->x);
  __pyx_v_self->x = __pyx_v_x;

  /* "cytoolz/itertoolz.pyx":933
 *         self.func = func
 *         self.x = x
 *         self.val = self  # sentinel             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_self->val);
  __Pyx_DECREF(__pyx_v_self->val);
  __pyx_v_self->val = ((PyObject *)__pyx_v_self);

  /* "cytoolz/itertoolz.pyx":930
 *     8
 *     """
 *     def __cinit__(self, object func, object x):             # <<<<<<<<<<<<<<
 *         self.func = func
 *         self.x = x
 */

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

/* "cytoolz/itertoolz.pyx":935
 *         self.val = self  # sentinel
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_7iterate_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_7iterate_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_7iterate_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz_iterate *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_7iterate_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_iterate *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":936
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":935
 *         self.val = self  # sentinel
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":938
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.val is self:
 *             self.val = self.x
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_7iterate_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_7iterate_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_7iterate_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz_iterate *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_7iterate_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_iterate *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":939
 * 
 *     def __next__(self):
 *         if self.val is self:             # <<<<<<<<<<<<<<
 *             self.val = self.x
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->val == ((PyObject *)__pyx_v_self));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":940
 *     def __next__(self):
 *         if self.val is self:
 *             self.val = self.x             # <<<<<<<<<<<<<<
 *         else:
 *             self.x = self.func(self.x)
 */
    __pyx_t_3 = __pyx_v_self->x;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->val);
    __Pyx_DECREF(__pyx_v_self->val);
    __pyx_v_self->val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cytoolz/itertoolz.pyx":939
 * 
 *     def __next__(self):
 *         if self.val is self:             # <<<<<<<<<<<<<<
 *             self.val = self.x
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cytoolz/itertoolz.pyx":942
 *             self.val = self.x
 *         else:
 *             self.x = self.func(self.x)             # <<<<<<<<<<<<<<
 *         return self.x
 * 
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_self->func);
    __pyx_t_4 = __pyx_v_self->func; __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_self->x) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->x);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->x);
    __Pyx_DECREF(__pyx_v_self->x);
    __pyx_v_self->x = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "cytoolz/itertoolz.pyx":943
 *         else:
 *             self.x = self.func(self.x)
 *         return self.x             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->x);
  __pyx_r = __pyx_v_self->x;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":938
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.val is self:
 *             self.val = self.x
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytoolz.itertoolz.iterate.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_7iterate_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_7iterate_6__reduce_cython__[] = "iterate.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_7iterate_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_7iterate_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_7iterate_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_7iterate_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_7iterate_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_iterate *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_7iterate_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_iterate *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.iterate.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_7iterate_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_7iterate_8__setstate_cython__[] = "iterate.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_7iterate_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_7iterate_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_7iterate_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_7iterate_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_7iterate_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_iterate *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_7iterate_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_iterate *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.iterate.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":961
 *     [1.5, 2.5, 3.5]
 *     """
 *     def __cinit__(self, Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i
 *         self.iterseq = iter(seq)
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_14sliding_window_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_14sliding_window_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_seq,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_n)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 961, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 961, __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_n = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_n == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 961, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.sliding_window.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14sliding_window___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *)__pyx_v_self), __pyx_v_n, __pyx_v_seq);

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

static int __pyx_pf_7cytoolz_9itertoolz_14sliding_window___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *__pyx_v_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq) {
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_seq);

  /* "cytoolz/itertoolz.pyx":963
 *     def __cinit__(self, Py_ssize_t n, object seq):
 *         cdef Py_ssize_t i
 *         self.iterseq = iter(seq)             # <<<<<<<<<<<<<<
 *         self.prev = PyTuple_New(n)
 *         Py_INCREF(None)
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iterseq);
  __Pyx_DECREF(__pyx_v_self->iterseq);
  __pyx_v_self->iterseq = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":964
 *         cdef Py_ssize_t i
 *         self.iterseq = iter(seq)
 *         self.prev = PyTuple_New(n)             # <<<<<<<<<<<<<<
 *         Py_INCREF(None)
 *         PyTuple_SET_ITEM(self.prev, 0, None)
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->prev);
  __Pyx_DECREF(__pyx_v_self->prev);
  __pyx_v_self->prev = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":965
 *         self.iterseq = iter(seq)
 *         self.prev = PyTuple_New(n)
 *         Py_INCREF(None)             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(self.prev, 0, None)
 *         for i, seq in enumerate(islice(self.iterseq, n-1), 1):
 */
  Py_INCREF(Py_None);

  /* "cytoolz/itertoolz.pyx":966
 *         self.prev = PyTuple_New(n)
 *         Py_INCREF(None)
 *         PyTuple_SET_ITEM(self.prev, 0, None)             # <<<<<<<<<<<<<<
 *         for i, seq in enumerate(islice(self.iterseq, n-1), 1):
 *             Py_INCREF(seq)
 */
  __pyx_t_1 = __pyx_v_self->prev;
  __Pyx_INCREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":967
 *         Py_INCREF(None)
 *         PyTuple_SET_ITEM(self.prev, 0, None)
 *         for i, seq in enumerate(islice(self.iterseq, n-1), 1):             # <<<<<<<<<<<<<<
 *             Py_INCREF(seq)
 *             PyTuple_SET_ITEM(self.prev, i, seq)
 */
  __pyx_t_2 = 1;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_islice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyInt_FromSsize_t((__pyx_v_n - 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 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_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self->iterseq, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self->iterseq, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self->iterseq);
    __Pyx_GIVEREF(__pyx_v_self->iterseq);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->iterseq);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 967, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 967, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 967, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_9(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 967, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF_SET(__pyx_v_seq, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_v_i = __pyx_t_2;
    __pyx_t_2 = (__pyx_t_2 + 1);

    /* "cytoolz/itertoolz.pyx":968
 *         PyTuple_SET_ITEM(self.prev, 0, None)
 *         for i, seq in enumerate(islice(self.iterseq, n-1), 1):
 *             Py_INCREF(seq)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(self.prev, i, seq)
 *         self.n = n
 */
    Py_INCREF(__pyx_v_seq);

    /* "cytoolz/itertoolz.pyx":969
 *         for i, seq in enumerate(islice(self.iterseq, n-1), 1):
 *             Py_INCREF(seq)
 *             PyTuple_SET_ITEM(self.prev, i, seq)             # <<<<<<<<<<<<<<
 *         self.n = n
 * 
 */
    __pyx_t_1 = __pyx_v_self->prev;
    __Pyx_INCREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, __pyx_v_i, __pyx_v_seq);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":967
 *         Py_INCREF(None)
 *         PyTuple_SET_ITEM(self.prev, 0, None)
 *         for i, seq in enumerate(islice(self.iterseq, n-1), 1):             # <<<<<<<<<<<<<<
 *             Py_INCREF(seq)
 *             PyTuple_SET_ITEM(self.prev, i, seq)
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytoolz/itertoolz.pyx":970
 *             Py_INCREF(seq)
 *             PyTuple_SET_ITEM(self.prev, i, seq)
 *         self.n = n             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_v_self->n = __pyx_v_n;

  /* "cytoolz/itertoolz.pyx":961
 *     [1.5, 2.5, 3.5]
 *     """
 *     def __cinit__(self, Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i
 *         self.iterseq = iter(seq)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytoolz.itertoolz.sliding_window.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_seq);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":972
 *         self.n = n
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14sliding_window_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14sliding_window_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14sliding_window_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_14sliding_window_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":973
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":972
 *         self.n = n
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":975
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef tuple current
 *         cdef object item
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14sliding_window_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14sliding_window_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14sliding_window_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_14sliding_window_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *__pyx_v_self) {
  PyObject *__pyx_v_current = 0;
  PyObject *__pyx_v_item = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":980
 *         cdef Py_ssize_t i
 * 
 *         item = next(self.iterseq)             # <<<<<<<<<<<<<<
 *         current = PyTuple_New(self.n)
 *         Py_INCREF(item)
 */
  __pyx_t_1 = __pyx_v_self->iterseq;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_item = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":981
 * 
 *         item = next(self.iterseq)
 *         current = PyTuple_New(self.n)             # <<<<<<<<<<<<<<
 *         Py_INCREF(item)
 *         PyTuple_SET_ITEM(current, self.n-1, item)
 */
  __pyx_t_2 = PyTuple_New(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_current = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":982
 *         item = next(self.iterseq)
 *         current = PyTuple_New(self.n)
 *         Py_INCREF(item)             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(current, self.n-1, item)
 *         for i in range(1, self.n):
 */
  Py_INCREF(__pyx_v_item);

  /* "cytoolz/itertoolz.pyx":983
 *         current = PyTuple_New(self.n)
 *         Py_INCREF(item)
 *         PyTuple_SET_ITEM(current, self.n-1, item)             # <<<<<<<<<<<<<<
 *         for i in range(1, self.n):
 *             item = self.prev[i]
 */
  PyTuple_SET_ITEM(__pyx_v_current, (__pyx_v_self->n - 1), __pyx_v_item);

  /* "cytoolz/itertoolz.pyx":984
 *         Py_INCREF(item)
 *         PyTuple_SET_ITEM(current, self.n-1, item)
 *         for i in range(1, self.n):             # <<<<<<<<<<<<<<
 *             item = self.prev[i]
 *             Py_INCREF(item)
 */
  __pyx_t_3 = __pyx_v_self->n;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cytoolz/itertoolz.pyx":985
 *         PyTuple_SET_ITEM(current, self.n-1, item)
 *         for i in range(1, self.n):
 *             item = self.prev[i]             # <<<<<<<<<<<<<<
 *             Py_INCREF(item)
 *             PyTuple_SET_ITEM(current, i-1, item)
 */
    if (unlikely(__pyx_v_self->prev == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 985, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->prev, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":986
 *         for i in range(1, self.n):
 *             item = self.prev[i]
 *             Py_INCREF(item)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(current, i-1, item)
 *         self.prev = current
 */
    Py_INCREF(__pyx_v_item);

    /* "cytoolz/itertoolz.pyx":987
 *             item = self.prev[i]
 *             Py_INCREF(item)
 *             PyTuple_SET_ITEM(current, i-1, item)             # <<<<<<<<<<<<<<
 *         self.prev = current
 *         return current
 */
    PyTuple_SET_ITEM(__pyx_v_current, (__pyx_v_i - 1), __pyx_v_item);
  }

  /* "cytoolz/itertoolz.pyx":988
 *             Py_INCREF(item)
 *             PyTuple_SET_ITEM(current, i-1, item)
 *         self.prev = current             # <<<<<<<<<<<<<<
 *         return current
 * 
 */
  __Pyx_INCREF(__pyx_v_current);
  __Pyx_GIVEREF(__pyx_v_current);
  __Pyx_GOTREF(__pyx_v_self->prev);
  __Pyx_DECREF(__pyx_v_self->prev);
  __pyx_v_self->prev = __pyx_v_current;

  /* "cytoolz/itertoolz.pyx":989
 *             PyTuple_SET_ITEM(current, i-1, item)
 *         self.prev = current
 *         return current             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_current);
  __pyx_r = __pyx_v_current;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":975
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef tuple current
 *         cdef object item
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz.sliding_window.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_current);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14sliding_window_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_14sliding_window_6__reduce_cython__[] = "sliding_window.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_14sliding_window_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_14sliding_window_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_14sliding_window_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14sliding_window_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14sliding_window_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_14sliding_window_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.sliding_window.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14sliding_window_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_14sliding_window_8__setstate_cython__[] = "sliding_window.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_14sliding_window_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_14sliding_window_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_14sliding_window_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14sliding_window_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14sliding_window_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_14sliding_window_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.sliding_window.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":995
 * 
 * 
 * cpdef object partition(Py_ssize_t n, object seq, object pad='__no__pad__'):             # <<<<<<<<<<<<<<
 *     """
 *     Partition sequence into tuples of length n
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_45partition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_partition(Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_partition *__pyx_optional_args) {
  PyObject *__pyx_v_pad = ((PyObject *)__pyx_n_u_no__pad);
  PyObject *__pyx_v_args = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("partition", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_pad = __pyx_optional_args->pad;
    }
  }

  /* "cytoolz/itertoolz.pyx":1014
 *         partition_all
 *     """
 *     args = [iter(seq)] * n             # <<<<<<<<<<<<<<
 *     if pad == '__no__pad__':
 *         return zip(*args)
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_t_1);
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_args = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1015
 *     """
 *     args = [iter(seq)] * n
 *     if pad == '__no__pad__':             # <<<<<<<<<<<<<<
 *         return zip(*args)
 *     else:
 */
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_pad, __pyx_n_u_no__pad, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1015, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":1016
 *     args = [iter(seq)] * n
 *     if pad == '__no__pad__':
 *         return zip(*args)             # <<<<<<<<<<<<<<
 *     else:
 *         return zip_longest(*args, fillvalue=pad)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __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;

    /* "cytoolz/itertoolz.pyx":1015
 *     """
 *     args = [iter(seq)] * n
 *     if pad == '__no__pad__':             # <<<<<<<<<<<<<<
 *         return zip(*args)
 *     else:
 */
  }

  /* "cytoolz/itertoolz.pyx":1018
 *         return zip(*args)
 *     else:
 *         return zip_longest(*args, fillvalue=pad)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_zip_longest); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fillvalue, __pyx_v_pad) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1018, __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_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "cytoolz/itertoolz.pyx":995
 * 
 * 
 * cpdef object partition(Py_ssize_t n, object seq, object pad='__no__pad__'):             # <<<<<<<<<<<<<<
 *     """
 *     Partition sequence into tuples of length n
 */

  /* 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("cytoolz.itertoolz.partition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_45partition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_44partition[] = "partition(Py_ssize_t n, seq, pad=u'__no__pad__')\n\n    Partition sequence into tuples of length n\n\n    >>> list(partition(2, [1, 2, 3, 4]))\n    [(1, 2), (3, 4)]\n\n    If the length of ``seq`` is not evenly divisible by ``n``, the final tuple\n    is dropped if ``pad`` is not specified, or filled to length ``n`` by pad:\n\n    >>> list(partition(2, [1, 2, 3, 4, 5]))\n    [(1, 2), (3, 4)]\n\n    >>> list(partition(2, [1, 2, 3, 4, 5], pad=None))\n    [(1, 2), (3, 4), (5, None)]\n\n    See Also:\n        partition_all\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_45partition = {"partition", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_45partition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_44partition};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_45partition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_v_pad = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("partition (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_seq,&__pyx_n_s_pad,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_n_u_no__pad);
    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_n)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("partition", 0, 2, 3, 1); __PYX_ERR(0, 995, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pad);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "partition") < 0)) __PYX_ERR(0, 995, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_n == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L3_error)
    __pyx_v_seq = values[1];
    __pyx_v_pad = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("partition", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 995, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.partition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_44partition(__pyx_self, __pyx_v_n, __pyx_v_seq, __pyx_v_pad);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_44partition(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq, PyObject *__pyx_v_pad) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytoolz_9itertoolz_partition __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("partition", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.pad = __pyx_v_pad;
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_partition(__pyx_v_n, __pyx_v_seq, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":1037
 *         partition
 *     """
 *     def __cinit__(self, Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *         self.n = n
 *         self.iterseq = iter(seq)
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_13partition_all_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_13partition_all_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_seq,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_n)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 1037, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1037, __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_n = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_n == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L3_error)
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1037, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.partition_all.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13partition_all___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz_partition_all *)__pyx_v_self), __pyx_v_n, __pyx_v_seq);

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

static int __pyx_pf_7cytoolz_9itertoolz_13partition_all___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_partition_all *__pyx_v_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq) {
  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("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":1038
 *     """
 *     def __cinit__(self, Py_ssize_t n, object seq):
 *         self.n = n             # <<<<<<<<<<<<<<
 *         self.iterseq = iter(seq)
 * 
 */
  __pyx_v_self->n = __pyx_v_n;

  /* "cytoolz/itertoolz.pyx":1039
 *     def __cinit__(self, Py_ssize_t n, object seq):
 *         self.n = n
 *         self.iterseq = iter(seq)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iterseq);
  __Pyx_DECREF(__pyx_v_self->iterseq);
  __pyx_v_self->iterseq = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1037
 *         partition
 *     """
 *     def __cinit__(self, Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *         self.n = n
 *         self.iterseq = iter(seq)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.partition_all.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1041
 *         self.iterseq = iter(seq)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13partition_all_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13partition_all_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13partition_all_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz_partition_all *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13partition_all_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_partition_all *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":1042
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1041
 *         self.iterseq = iter(seq)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":1044
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef tuple result
 *         cdef object item
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13partition_all_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13partition_all_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13partition_all_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz_partition_all *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13partition_all_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_partition_all *__pyx_v_self) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_item = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1047
 *         cdef tuple result
 *         cdef object item
 *         cdef Py_ssize_t i = 0             # <<<<<<<<<<<<<<
 *         result = PyTuple_New(self.n)
 *         for item in self.iterseq:
 */
  __pyx_v_i = 0;

  /* "cytoolz/itertoolz.pyx":1048
 *         cdef object item
 *         cdef Py_ssize_t i = 0
 *         result = PyTuple_New(self.n)             # <<<<<<<<<<<<<<
 *         for item in self.iterseq:
 *             Py_INCREF(item)
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_self->n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1049
 *         cdef Py_ssize_t i = 0
 *         result = PyTuple_New(self.n)
 *         for item in self.iterseq:             # <<<<<<<<<<<<<<
 *             Py_INCREF(item)
 *             PyTuple_SET_ITEM(result, i, item)
 */
  if (likely(PyList_CheckExact(__pyx_v_self->iterseq)) || PyTuple_CheckExact(__pyx_v_self->iterseq)) {
    __pyx_t_1 = __pyx_v_self->iterseq; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->iterseq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1049, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1049, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1049, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1049, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1049, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":1050
 *         result = PyTuple_New(self.n)
 *         for item in self.iterseq:
 *             Py_INCREF(item)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(result, i, item)
 *             i += 1
 */
    Py_INCREF(__pyx_v_item);

    /* "cytoolz/itertoolz.pyx":1051
 *         for item in self.iterseq:
 *             Py_INCREF(item)
 *             PyTuple_SET_ITEM(result, i, item)             # <<<<<<<<<<<<<<
 *             i += 1
 *             if i == self.n:
 */
    PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_v_item);

    /* "cytoolz/itertoolz.pyx":1052
 *             Py_INCREF(item)
 *             PyTuple_SET_ITEM(result, i, item)
 *             i += 1             # <<<<<<<<<<<<<<
 *             if i == self.n:
 *                 return result
 */
    __pyx_v_i = (__pyx_v_i + 1);

    /* "cytoolz/itertoolz.pyx":1053
 *             PyTuple_SET_ITEM(result, i, item)
 *             i += 1
 *             if i == self.n:             # <<<<<<<<<<<<<<
 *                 return result
 *         # iterable exhausted before filling the tuple
 */
    __pyx_t_5 = ((__pyx_v_i == __pyx_v_self->n) != 0);
    if (__pyx_t_5) {

      /* "cytoolz/itertoolz.pyx":1054
 *             i += 1
 *             if i == self.n:
 *                 return result             # <<<<<<<<<<<<<<
 *         # iterable exhausted before filling the tuple
 *         if i == 0:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1053
 *             PyTuple_SET_ITEM(result, i, item)
 *             i += 1
 *             if i == self.n:             # <<<<<<<<<<<<<<
 *                 return result
 *         # iterable exhausted before filling the tuple
 */
    }

    /* "cytoolz/itertoolz.pyx":1049
 *         cdef Py_ssize_t i = 0
 *         result = PyTuple_New(self.n)
 *         for item in self.iterseq:             # <<<<<<<<<<<<<<
 *             Py_INCREF(item)
 *             PyTuple_SET_ITEM(result, i, item)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1056
 *                 return result
 *         # iterable exhausted before filling the tuple
 *         if i == 0:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         for j in range(i, self.n):
 */
  __pyx_t_5 = ((__pyx_v_i == 0) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "cytoolz/itertoolz.pyx":1057
 *         # iterable exhausted before filling the tuple
 *         if i == 0:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         for j in range(i, self.n):
 *             Py_INCREF(None)
 */
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 1057, __pyx_L1_error)

    /* "cytoolz/itertoolz.pyx":1056
 *                 return result
 *         # iterable exhausted before filling the tuple
 *         if i == 0:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         for j in range(i, self.n):
 */
  }

  /* "cytoolz/itertoolz.pyx":1058
 *         if i == 0:
 *             raise StopIteration
 *         for j in range(i, self.n):             # <<<<<<<<<<<<<<
 *             Py_INCREF(None)
 *             PyTuple_SET_ITEM(result, j, None)
 */
  __pyx_t_2 = __pyx_v_self->n;
  __pyx_t_6 = __pyx_t_2;
  for (__pyx_t_7 = __pyx_v_i; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_j = __pyx_t_7;

    /* "cytoolz/itertoolz.pyx":1059
 *             raise StopIteration
 *         for j in range(i, self.n):
 *             Py_INCREF(None)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(result, j, None)
 *         return PyTuple_GetSlice(result, 0, i)
 */
    Py_INCREF(Py_None);

    /* "cytoolz/itertoolz.pyx":1060
 *         for j in range(i, self.n):
 *             Py_INCREF(None)
 *             PyTuple_SET_ITEM(result, j, None)             # <<<<<<<<<<<<<<
 *         return PyTuple_GetSlice(result, 0, i)
 * 
 */
    PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_j, Py_None);
  }

  /* "cytoolz/itertoolz.pyx":1061
 *             Py_INCREF(None)
 *             PyTuple_SET_ITEM(result, j, None)
 *         return PyTuple_GetSlice(result, 0, i)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_GetSlice(__pyx_v_result, 0, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1044
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef tuple result
 *         cdef object item
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytoolz.itertoolz.partition_all.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13partition_all_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_13partition_all_6__reduce_cython__[] = "partition_all.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_13partition_all_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13partition_all_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_13partition_all_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13partition_all_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13partition_all_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_partition_all *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13partition_all_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_partition_all *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.partition_all.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13partition_all_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_13partition_all_8__setstate_cython__[] = "partition_all.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_13partition_all_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13partition_all_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_13partition_all_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13partition_all_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13partition_all_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_partition_all *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13partition_all_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_partition_all *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.partition_all.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1064
 * 
 * 
 * cpdef object count(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Count the number of items in seq
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_47count(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_count(PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("count", 0);

  /* "cytoolz/itertoolz.pyx":1075
 *         len
 *     """
 *     if iter(seq) is not seq and hasattr(seq, '__len__'):             # <<<<<<<<<<<<<<
 *         return len(seq)
 *     cdef Py_ssize_t i = 0
 */
  __pyx_t_2 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__pyx_t_2 != __pyx_v_seq);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(__pyx_v_seq, __pyx_n_u_len); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1075, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":1076
 *     """
 *     if iter(seq) is not seq and hasattr(seq, '__len__'):
 *         return len(seq)             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = 0
 *     for _ in seq:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1076, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":1075
 *         len
 *     """
 *     if iter(seq) is not seq and hasattr(seq, '__len__'):             # <<<<<<<<<<<<<<
 *         return len(seq)
 *     cdef Py_ssize_t i = 0
 */
  }

  /* "cytoolz/itertoolz.pyx":1077
 *     if iter(seq) is not seq and hasattr(seq, '__len__'):
 *         return len(seq)
 *     cdef Py_ssize_t i = 0             # <<<<<<<<<<<<<<
 *     for _ in seq:
 *         i += 1
 */
  __pyx_v_i = 0;

  /* "cytoolz/itertoolz.pyx":1078
 *         return len(seq)
 *     cdef Py_ssize_t i = 0
 *     for _ in seq:             # <<<<<<<<<<<<<<
 *         i += 1
 *     return i
 */
  if (likely(PyList_CheckExact(__pyx_v_seq)) || PyTuple_CheckExact(__pyx_v_seq)) {
    __pyx_t_2 = __pyx_v_seq; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1078, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1078, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1078, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1078, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1078, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_2);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1078, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cytoolz/itertoolz.pyx":1079
 *     cdef Py_ssize_t i = 0
 *     for _ in seq:
 *         i += 1             # <<<<<<<<<<<<<<
 *     return i
 * 
 */
    __pyx_v_i = (__pyx_v_i + 1);

    /* "cytoolz/itertoolz.pyx":1078
 *         return len(seq)
 *     cdef Py_ssize_t i = 0
 *     for _ in seq:             # <<<<<<<<<<<<<<
 *         i += 1
 *     return i
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1080
 *     for _ in seq:
 *         i += 1
 *     return i             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1064
 * 
 * 
 * cpdef object count(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Count the number of items in seq
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytoolz.itertoolz.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_47count(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_46count[] = "count(seq)\n\n    Count the number of items in seq\n\n    Like the builtin ``len`` but works on lazy sequences.\n\n    Not to be confused with ``itertools.count``\n\n    See also:\n        len\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_47count = {"count", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_47count, METH_O, __pyx_doc_7cytoolz_9itertoolz_46count};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_47count(PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("count (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_46count(__pyx_self, ((PyObject *)__pyx_v_seq));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_46count(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  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("count", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_count(__pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":1084
 * 
 * cdef class _pluck_index:
 *     def __cinit__(self, object ind, object seqs):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_12_pluck_index_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_12_pluck_index_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ind = 0;
  PyObject *__pyx_v_seqs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ind,&__pyx_n_s_seqs,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_ind)) != 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_seqs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 1084, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1084, __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_ind = values[0];
    __pyx_v_seqs = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1084, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_index.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_pluck_index___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *)__pyx_v_self), __pyx_v_ind, __pyx_v_seqs);

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

static int __pyx_pf_7cytoolz_9itertoolz_12_pluck_index___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *__pyx_v_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs) {
  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("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":1085
 * cdef class _pluck_index:
 *     def __cinit__(self, object ind, object seqs):
 *         self.ind = ind             # <<<<<<<<<<<<<<
 *         self.iterseqs = iter(seqs)
 * 
 */
  __Pyx_INCREF(__pyx_v_ind);
  __Pyx_GIVEREF(__pyx_v_ind);
  __Pyx_GOTREF(__pyx_v_self->ind);
  __Pyx_DECREF(__pyx_v_self->ind);
  __pyx_v_self->ind = __pyx_v_ind;

  /* "cytoolz/itertoolz.pyx":1086
 *     def __cinit__(self, object ind, object seqs):
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seqs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iterseqs);
  __Pyx_DECREF(__pyx_v_self->iterseqs);
  __pyx_v_self->iterseqs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1084
 * 
 * cdef class _pluck_index:
 *     def __cinit__(self, object ind, object seqs):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_index.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1088
 *         self.iterseqs = iter(seqs)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_pluck_index_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_pluck_index_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":1089
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1088
 *         self.iterseqs = iter(seqs)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":1091
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         val = next(self.iterseqs)
 *         return val[self.ind]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_pluck_index_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_pluck_index_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *__pyx_v_self) {
  PyObject *__pyx_v_val = NULL;
  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("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1092
 * 
 *     def __next__(self):
 *         val = next(self.iterseqs)             # <<<<<<<<<<<<<<
 *         return val[self.ind]
 * 
 */
  __pyx_t_1 = __pyx_v_self->iterseqs;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_val = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1093
 *     def __next__(self):
 *         val = next(self.iterseqs)
 *         return val[self.ind]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_val, __pyx_v_self->ind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1091
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         val = next(self.iterseqs)
 *         return val[self.ind]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_index.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_12_pluck_index_6__reduce_cython__[] = "_pluck_index.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_12_pluck_index_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_12_pluck_index_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_pluck_index_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_pluck_index_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_index.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_12_pluck_index_8__setstate_cython__[] = "_pluck_index.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_12_pluck_index_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_12_pluck_index_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_pluck_index_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_pluck_index_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_index.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1097
 * 
 * cdef class _pluck_index_default:
 *     def __cinit__(self, object ind, object seqs, object default):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ind = 0;
  PyObject *__pyx_v_seqs = 0;
  PyObject *__pyx_v_default = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ind,&__pyx_n_s_seqs,&__pyx_n_s_default,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_ind)) != 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_seqs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(0, 1097, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(0, 1097, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1097, __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_ind = values[0];
    __pyx_v_seqs = values[1];
    __pyx_v_default = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1097, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_index_default.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *)__pyx_v_self), __pyx_v_ind, __pyx_v_seqs, __pyx_v_default);

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

static int __pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *__pyx_v_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs, PyObject *__pyx_v_default) {
  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("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":1098
 * cdef class _pluck_index_default:
 *     def __cinit__(self, object ind, object seqs, object default):
 *         self.ind = ind             # <<<<<<<<<<<<<<
 *         self.iterseqs = iter(seqs)
 *         self.default = default
 */
  __Pyx_INCREF(__pyx_v_ind);
  __Pyx_GIVEREF(__pyx_v_ind);
  __Pyx_GOTREF(__pyx_v_self->ind);
  __Pyx_DECREF(__pyx_v_self->ind);
  __pyx_v_self->ind = __pyx_v_ind;

  /* "cytoolz/itertoolz.pyx":1099
 *     def __cinit__(self, object ind, object seqs, object default):
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)             # <<<<<<<<<<<<<<
 *         self.default = default
 * 
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seqs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iterseqs);
  __Pyx_DECREF(__pyx_v_self->iterseqs);
  __pyx_v_self->iterseqs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1100
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 *         self.default = default             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_INCREF(__pyx_v_default);
  __Pyx_GIVEREF(__pyx_v_default);
  __Pyx_GOTREF(__pyx_v_self->__pyx_default);
  __Pyx_DECREF(__pyx_v_self->__pyx_default);
  __pyx_v_self->__pyx_default = __pyx_v_default;

  /* "cytoolz/itertoolz.pyx":1097
 * 
 * cdef class _pluck_index_default:
 *     def __cinit__(self, object ind, object seqs, object default):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_index_default.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1102
 *         self.default = default
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":1103
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1102
 *         self.default = default
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":1105
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef PyObject *obj
 *         cdef object val
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *__pyx_v_self) {
  PyObject *__pyx_v_obj;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1108
 *         cdef PyObject *obj
 *         cdef object val
 *         val = next(self.iterseqs)             # <<<<<<<<<<<<<<
 *         obj = PtrObject_GetItem(val, self.ind)
 *         if obj is NULL:
 */
  __pyx_t_1 = __pyx_v_self->iterseqs;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_val = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1109
 *         cdef object val
 *         val = next(self.iterseqs)
 *         obj = PtrObject_GetItem(val, self.ind)             # <<<<<<<<<<<<<<
 *         if obj is NULL:
 *             val = <object>PyErr_Occurred()
 */
  __pyx_t_2 = __pyx_v_self->ind;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_obj = PyObject_GetItem(__pyx_v_val, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1110
 *         val = next(self.iterseqs)
 *         obj = PtrObject_GetItem(val, self.ind)
 *         if obj is NULL:             # <<<<<<<<<<<<<<
 *             val = <object>PyErr_Occurred()
 *             PyErr_Clear()
 */
  __pyx_t_3 = ((__pyx_v_obj == NULL) != 0);
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":1111
 *         obj = PtrObject_GetItem(val, self.ind)
 *         if obj is NULL:
 *             val = <object>PyErr_Occurred()             # <<<<<<<<<<<<<<
 *             PyErr_Clear()
 *             if not PyErr_GivenExceptionMatches(val, _get_exceptions):
 */
    __pyx_t_4 = PyErr_Occurred();
    __pyx_t_2 = ((PyObject *)__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":1112
 *         if obj is NULL:
 *             val = <object>PyErr_Occurred()
 *             PyErr_Clear()             # <<<<<<<<<<<<<<
 *             if not PyErr_GivenExceptionMatches(val, _get_exceptions):
 *                 raise val
 */
    PyErr_Clear();

    /* "cytoolz/itertoolz.pyx":1113
 *             val = <object>PyErr_Occurred()
 *             PyErr_Clear()
 *             if not PyErr_GivenExceptionMatches(val, _get_exceptions):             # <<<<<<<<<<<<<<
 *                 raise val
 *             return self.default
 */
    __pyx_t_2 = __pyx_v_7cytoolz_9itertoolz__get_exceptions;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = ((!(PyErr_GivenExceptionMatches(__pyx_v_val, __pyx_t_2) != 0)) != 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__pyx_t_3)) {

      /* "cytoolz/itertoolz.pyx":1114
 *             PyErr_Clear()
 *             if not PyErr_GivenExceptionMatches(val, _get_exceptions):
 *                 raise val             # <<<<<<<<<<<<<<
 *             return self.default
 *         val = <object>obj
 */
      __Pyx_Raise(__pyx_v_val, 0, 0, 0);
      __PYX_ERR(0, 1114, __pyx_L1_error)

      /* "cytoolz/itertoolz.pyx":1113
 *             val = <object>PyErr_Occurred()
 *             PyErr_Clear()
 *             if not PyErr_GivenExceptionMatches(val, _get_exceptions):             # <<<<<<<<<<<<<<
 *                 raise val
 *             return self.default
 */
    }

    /* "cytoolz/itertoolz.pyx":1115
 *             if not PyErr_GivenExceptionMatches(val, _get_exceptions):
 *                 raise val
 *             return self.default             # <<<<<<<<<<<<<<
 *         val = <object>obj
 *         Py_XDECREF(obj)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx_default);
    __pyx_r = __pyx_v_self->__pyx_default;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":1110
 *         val = next(self.iterseqs)
 *         obj = PtrObject_GetItem(val, self.ind)
 *         if obj is NULL:             # <<<<<<<<<<<<<<
 *             val = <object>PyErr_Occurred()
 *             PyErr_Clear()
 */
  }

  /* "cytoolz/itertoolz.pyx":1116
 *                 raise val
 *             return self.default
 *         val = <object>obj             # <<<<<<<<<<<<<<
 *         Py_XDECREF(obj)
 *         return val
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_obj);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1117
 *             return self.default
 *         val = <object>obj
 *         Py_XDECREF(obj)             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  Py_XDECREF(__pyx_v_obj);

  /* "cytoolz/itertoolz.pyx":1118
 *         val = <object>obj
 *         Py_XDECREF(obj)
 *         return val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_val);
  __pyx_r = __pyx_v_val;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1105
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef PyObject *obj
 *         cdef object val
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_index_default.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_20_pluck_index_default_6__reduce_cython__[] = "_pluck_index_default.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_20_pluck_index_default_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_20_pluck_index_default_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_index_default.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_20_pluck_index_default_8__setstate_cython__[] = "_pluck_index_default.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_20_pluck_index_default_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_20_pluck_index_default_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_pluck_index_default_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_index_default.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1122
 * 
 * cdef class _pluck_list:
 *     def __cinit__(self, list ind not None, object seqs):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_11_pluck_list_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_11_pluck_list_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ind = 0;
  PyObject *__pyx_v_seqs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ind,&__pyx_n_s_seqs,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_ind)) != 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_seqs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 1122, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1122, __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_ind = ((PyObject*)values[0]);
    __pyx_v_seqs = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1122, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_list.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ind), (&PyList_Type), 0, "ind", 1))) __PYX_ERR(0, 1122, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_pluck_list___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *)__pyx_v_self), __pyx_v_ind, __pyx_v_seqs);

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

static int __pyx_pf_7cytoolz_9itertoolz_11_pluck_list___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *__pyx_v_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":1123
 * cdef class _pluck_list:
 *     def __cinit__(self, list ind not None, object seqs):
 *         self.ind = ind             # <<<<<<<<<<<<<<
 *         self.iterseqs = iter(seqs)
 *         self.n = len(ind)
 */
  __Pyx_INCREF(__pyx_v_ind);
  __Pyx_GIVEREF(__pyx_v_ind);
  __Pyx_GOTREF(__pyx_v_self->ind);
  __Pyx_DECREF(__pyx_v_self->ind);
  __pyx_v_self->ind = __pyx_v_ind;

  /* "cytoolz/itertoolz.pyx":1124
 *     def __cinit__(self, list ind not None, object seqs):
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)             # <<<<<<<<<<<<<<
 *         self.n = len(ind)
 * 
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seqs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iterseqs);
  __Pyx_DECREF(__pyx_v_self->iterseqs);
  __pyx_v_self->iterseqs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1125
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 *         self.n = len(ind)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_2 = PyList_GET_SIZE(__pyx_v_ind); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1125, __pyx_L1_error)
  __pyx_v_self->n = __pyx_t_2;

  /* "cytoolz/itertoolz.pyx":1122
 * 
 * cdef class _pluck_list:
 *     def __cinit__(self, list ind not None, object seqs):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_list.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1127
 *         self.n = len(ind)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_pluck_list_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_pluck_list_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":1128
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1127
 *         self.n = len(ind)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":1130
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i
 *         cdef tuple result
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_pluck_list_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_pluck_list_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *__pyx_v_self) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1134
 *         cdef tuple result
 *         cdef object val, seq
 *         seq = next(self.iterseqs)             # <<<<<<<<<<<<<<
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):
 */
  __pyx_t_1 = __pyx_v_self->iterseqs;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_seq = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1135
 *         cdef object val, seq
 *         seq = next(self.iterseqs)
 *         result = PyTuple_New(self.n)             # <<<<<<<<<<<<<<
 *         for i, val in enumerate(self.ind):
 *             val = seq[val]
 */
  __pyx_t_2 = PyTuple_New(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1136
 *         seq = next(self.iterseqs)
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):             # <<<<<<<<<<<<<<
 *             val = seq[val]
 *             Py_INCREF(val)
 */
  __pyx_t_3 = 0;
  __pyx_t_2 = __pyx_v_self->ind; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1136, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_v_i = __pyx_t_3;
    __pyx_t_3 = (__pyx_t_3 + 1);

    /* "cytoolz/itertoolz.pyx":1137
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):
 *             val = seq[val]             # <<<<<<<<<<<<<<
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(result, i, val)
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_seq, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":1138
 *         for i, val in enumerate(self.ind):
 *             val = seq[val]
 *             Py_INCREF(val)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(result, i, val)
 *         return result
 */
    Py_INCREF(__pyx_v_val);

    /* "cytoolz/itertoolz.pyx":1139
 *             val = seq[val]
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(result, i, val)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_v_val);

    /* "cytoolz/itertoolz.pyx":1136
 *         seq = next(self.iterseqs)
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):             # <<<<<<<<<<<<<<
 *             val = seq[val]
 *             Py_INCREF(val)
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1140
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(result, i, val)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1130
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i
 *         cdef tuple result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_list.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_seq);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_11_pluck_list_6__reduce_cython__[] = "_pluck_list.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_11_pluck_list_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_11_pluck_list_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_pluck_list_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_pluck_list_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_list.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_11_pluck_list_8__setstate_cython__[] = "_pluck_list.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_11_pluck_list_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_11_pluck_list_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_pluck_list_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_pluck_list_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_list.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1144
 * 
 * cdef class _pluck_list_default:
 *     def __cinit__(self, list ind not None, object seqs, object default):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ind = 0;
  PyObject *__pyx_v_seqs = 0;
  PyObject *__pyx_v_default = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ind,&__pyx_n_s_seqs,&__pyx_n_s_default,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_ind)) != 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_seqs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(0, 1144, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(0, 1144, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1144, __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_ind = ((PyObject*)values[0]);
    __pyx_v_seqs = values[1];
    __pyx_v_default = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1144, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_list_default.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ind), (&PyList_Type), 0, "ind", 1))) __PYX_ERR(0, 1144, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *)__pyx_v_self), __pyx_v_ind, __pyx_v_seqs, __pyx_v_default);

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

static int __pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *__pyx_v_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs, PyObject *__pyx_v_default) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":1145
 * cdef class _pluck_list_default:
 *     def __cinit__(self, list ind not None, object seqs, object default):
 *         self.ind = ind             # <<<<<<<<<<<<<<
 *         self.iterseqs = iter(seqs)
 *         self.default = default
 */
  __Pyx_INCREF(__pyx_v_ind);
  __Pyx_GIVEREF(__pyx_v_ind);
  __Pyx_GOTREF(__pyx_v_self->ind);
  __Pyx_DECREF(__pyx_v_self->ind);
  __pyx_v_self->ind = __pyx_v_ind;

  /* "cytoolz/itertoolz.pyx":1146
 *     def __cinit__(self, list ind not None, object seqs, object default):
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)             # <<<<<<<<<<<<<<
 *         self.default = default
 *         self.n = len(ind)
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seqs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iterseqs);
  __Pyx_DECREF(__pyx_v_self->iterseqs);
  __pyx_v_self->iterseqs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1147
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 *         self.default = default             # <<<<<<<<<<<<<<
 *         self.n = len(ind)
 * 
 */
  __Pyx_INCREF(__pyx_v_default);
  __Pyx_GIVEREF(__pyx_v_default);
  __Pyx_GOTREF(__pyx_v_self->__pyx_default);
  __Pyx_DECREF(__pyx_v_self->__pyx_default);
  __pyx_v_self->__pyx_default = __pyx_v_default;

  /* "cytoolz/itertoolz.pyx":1148
 *         self.iterseqs = iter(seqs)
 *         self.default = default
 *         self.n = len(ind)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_2 = PyList_GET_SIZE(__pyx_v_ind); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1148, __pyx_L1_error)
  __pyx_v_self->n = __pyx_t_2;

  /* "cytoolz/itertoolz.pyx":1144
 * 
 * cdef class _pluck_list_default:
 *     def __cinit__(self, list ind not None, object seqs, object default):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 *         self.iterseqs = iter(seqs)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_list_default.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1150
 *         self.n = len(ind)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":1151
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1150
 *         self.n = len(ind)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":1153
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i
 *         cdef object val, seq
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *__pyx_v_self) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_obj;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1157
 *         cdef object val, seq
 *         cdef tuple result
 *         seq = next(self.iterseqs)             # <<<<<<<<<<<<<<
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):
 */
  __pyx_t_1 = __pyx_v_self->iterseqs;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_seq = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1158
 *         cdef tuple result
 *         seq = next(self.iterseqs)
 *         result = PyTuple_New(self.n)             # <<<<<<<<<<<<<<
 *         for i, val in enumerate(self.ind):
 *             obj = PtrObject_GetItem(seq, val)
 */
  __pyx_t_2 = PyTuple_New(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1159
 *         seq = next(self.iterseqs)
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):             # <<<<<<<<<<<<<<
 *             obj = PtrObject_GetItem(seq, val)
 *             if obj is NULL:
 */
  __pyx_t_3 = 0;
  __pyx_t_2 = __pyx_v_self->ind; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1159, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_v_i = __pyx_t_3;
    __pyx_t_3 = (__pyx_t_3 + 1);

    /* "cytoolz/itertoolz.pyx":1160
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):
 *             obj = PtrObject_GetItem(seq, val)             # <<<<<<<<<<<<<<
 *             if obj is NULL:
 *                 val = <object>PyErr_Occurred()
 */
    __pyx_v_obj = PyObject_GetItem(__pyx_v_seq, __pyx_v_val);

    /* "cytoolz/itertoolz.pyx":1161
 *         for i, val in enumerate(self.ind):
 *             obj = PtrObject_GetItem(seq, val)
 *             if obj is NULL:             # <<<<<<<<<<<<<<
 *                 val = <object>PyErr_Occurred()
 *                 PyErr_Clear()
 */
    __pyx_t_5 = ((__pyx_v_obj == NULL) != 0);
    if (__pyx_t_5) {

      /* "cytoolz/itertoolz.pyx":1162
 *             obj = PtrObject_GetItem(seq, val)
 *             if obj is NULL:
 *                 val = <object>PyErr_Occurred()             # <<<<<<<<<<<<<<
 *                 PyErr_Clear()
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):
 */
      __pyx_t_6 = PyErr_Occurred();
      __pyx_t_1 = ((PyObject *)__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":1163
 *             if obj is NULL:
 *                 val = <object>PyErr_Occurred()
 *                 PyErr_Clear()             # <<<<<<<<<<<<<<
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):
 *                     raise val
 */
      PyErr_Clear();

      /* "cytoolz/itertoolz.pyx":1164
 *                 val = <object>PyErr_Occurred()
 *                 PyErr_Clear()
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):             # <<<<<<<<<<<<<<
 *                     raise val
 *                 Py_INCREF(self.default)
 */
      __pyx_t_1 = __pyx_v_7cytoolz_9itertoolz__get_list_exc;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = ((!(PyErr_GivenExceptionMatches(__pyx_v_val, __pyx_t_1) != 0)) != 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__pyx_t_5)) {

        /* "cytoolz/itertoolz.pyx":1165
 *                 PyErr_Clear()
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):
 *                     raise val             # <<<<<<<<<<<<<<
 *                 Py_INCREF(self.default)
 *                 PyTuple_SET_ITEM(result, i, self.default)
 */
        __Pyx_Raise(__pyx_v_val, 0, 0, 0);
        __PYX_ERR(0, 1165, __pyx_L1_error)

        /* "cytoolz/itertoolz.pyx":1164
 *                 val = <object>PyErr_Occurred()
 *                 PyErr_Clear()
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):             # <<<<<<<<<<<<<<
 *                     raise val
 *                 Py_INCREF(self.default)
 */
      }

      /* "cytoolz/itertoolz.pyx":1166
 *                 if not PyErr_GivenExceptionMatches(val, _get_list_exc):
 *                     raise val
 *                 Py_INCREF(self.default)             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(result, i, self.default)
 *             else:
 */
      __pyx_t_1 = __pyx_v_self->__pyx_default;
      __Pyx_INCREF(__pyx_t_1);
      Py_INCREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":1167
 *                     raise val
 *                 Py_INCREF(self.default)
 *                 PyTuple_SET_ITEM(result, i, self.default)             # <<<<<<<<<<<<<<
 *             else:
 *                 val = <object>obj
 */
      __pyx_t_1 = __pyx_v_self->__pyx_default;
      __Pyx_INCREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":1161
 *         for i, val in enumerate(self.ind):
 *             obj = PtrObject_GetItem(seq, val)
 *             if obj is NULL:             # <<<<<<<<<<<<<<
 *                 val = <object>PyErr_Occurred()
 *                 PyErr_Clear()
 */
      goto __pyx_L5;
    }

    /* "cytoolz/itertoolz.pyx":1169
 *                 PyTuple_SET_ITEM(result, i, self.default)
 *             else:
 *                 val = <object>obj             # <<<<<<<<<<<<<<
 *                 PyTuple_SET_ITEM(result, i, val)
 *         return result
 */
    /*else*/ {
      __pyx_t_1 = ((PyObject *)__pyx_v_obj);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":1170
 *             else:
 *                 val = <object>obj
 *                 PyTuple_SET_ITEM(result, i, val)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_v_val);
    }
    __pyx_L5:;

    /* "cytoolz/itertoolz.pyx":1159
 *         seq = next(self.iterseqs)
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):             # <<<<<<<<<<<<<<
 *             obj = PtrObject_GetItem(seq, val)
 *             if obj is NULL:
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1171
 *                 val = <object>obj
 *                 PyTuple_SET_ITEM(result, i, val)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1153
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i
 *         cdef object val, seq
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_list_default.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_seq);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_19_pluck_list_default_6__reduce_cython__[] = "_pluck_list_default.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_19_pluck_list_default_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_19_pluck_list_default_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_list_default.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_19_pluck_list_default_8__setstate_cython__[] = "_pluck_list_default.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_19_pluck_list_default_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_19_pluck_list_default_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_pluck_list_default_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._pluck_list_default.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1174
 * 
 * 
 * cpdef object pluck(object ind, object seqs, object default='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     plucks an element or several elements from each item in a sequence.
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_49pluck(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_pluck(PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_pluck *__pyx_optional_args) {
  PyObject *__pyx_v_default = ((PyObject *)__pyx_n_u_no__default);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pluck", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default = __pyx_optional_args->__pyx_default;
    }
  }

  /* "cytoolz/itertoolz.pyx":1198
 *         map
 *     """
 *     if isinstance(ind, list):             # <<<<<<<<<<<<<<
 *         if default != no_default:
 *             return _pluck_list_default(ind, seqs, default)
 */
  __pyx_t_1 = PyList_Check(__pyx_v_ind); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1199
 *     """
 *     if isinstance(ind, list):
 *         if default != no_default:             # <<<<<<<<<<<<<<
 *             return _pluck_list_default(ind, seqs, default)
 *         if PyList_GET_SIZE(ind) < 10:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_no_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_default, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1199, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":1200
 *     if isinstance(ind, list):
 *         if default != no_default:
 *             return _pluck_list_default(ind, seqs, default)             # <<<<<<<<<<<<<<
 *         if PyList_GET_SIZE(ind) < 10:
 *             return _pluck_list(ind, seqs)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ind);
      __Pyx_INCREF(__pyx_v_seqs);
      __Pyx_GIVEREF(__pyx_v_seqs);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_seqs);
      __Pyx_INCREF(__pyx_v_default);
      __Pyx_GIVEREF(__pyx_v_default);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_default);
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__pluck_list_default), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1199
 *     """
 *     if isinstance(ind, list):
 *         if default != no_default:             # <<<<<<<<<<<<<<
 *             return _pluck_list_default(ind, seqs, default)
 *         if PyList_GET_SIZE(ind) < 10:
 */
    }

    /* "cytoolz/itertoolz.pyx":1201
 *         if default != no_default:
 *             return _pluck_list_default(ind, seqs, default)
 *         if PyList_GET_SIZE(ind) < 10:             # <<<<<<<<<<<<<<
 *             return _pluck_list(ind, seqs)
 *         return map(itemgetter(*ind), seqs)
 */
    __pyx_t_2 = ((PyList_GET_SIZE(__pyx_v_ind) < 10) != 0);
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":1202
 *             return _pluck_list_default(ind, seqs, default)
 *         if PyList_GET_SIZE(ind) < 10:
 *             return _pluck_list(ind, seqs)             # <<<<<<<<<<<<<<
 *         return map(itemgetter(*ind), seqs)
 *     if default == no_default:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_ind);
      __Pyx_GIVEREF(__pyx_v_ind);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_ind);
      __Pyx_INCREF(__pyx_v_seqs);
      __Pyx_GIVEREF(__pyx_v_seqs);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_seqs);
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__pluck_list), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1201
 *         if default != no_default:
 *             return _pluck_list_default(ind, seqs, default)
 *         if PyList_GET_SIZE(ind) < 10:             # <<<<<<<<<<<<<<
 *             return _pluck_list(ind, seqs)
 *         return map(itemgetter(*ind), seqs)
 */
    }

    /* "cytoolz/itertoolz.pyx":1203
 *         if PyList_GET_SIZE(ind) < 10:
 *             return _pluck_list(ind, seqs)
 *         return map(itemgetter(*ind), seqs)             # <<<<<<<<<<<<<<
 *     if default == no_default:
 *         return _pluck_index(ind, seqs)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_ind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
    __Pyx_INCREF(__pyx_v_seqs);
    __Pyx_GIVEREF(__pyx_v_seqs);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_seqs);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":1198
 *         map
 *     """
 *     if isinstance(ind, list):             # <<<<<<<<<<<<<<
 *         if default != no_default:
 *             return _pluck_list_default(ind, seqs, default)
 */
  }

  /* "cytoolz/itertoolz.pyx":1204
 *             return _pluck_list(ind, seqs)
 *         return map(itemgetter(*ind), seqs)
 *     if default == no_default:             # <<<<<<<<<<<<<<
 *         return _pluck_index(ind, seqs)
 *     return _pluck_index_default(ind, seqs, default)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_no_default); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_default, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1205
 *         return map(itemgetter(*ind), seqs)
 *     if default == no_default:
 *         return _pluck_index(ind, seqs)             # <<<<<<<<<<<<<<
 *     return _pluck_index_default(ind, seqs, default)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_ind);
    __Pyx_GIVEREF(__pyx_v_ind);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_ind);
    __Pyx_INCREF(__pyx_v_seqs);
    __Pyx_GIVEREF(__pyx_v_seqs);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_seqs);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__pluck_index), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":1204
 *             return _pluck_list(ind, seqs)
 *         return map(itemgetter(*ind), seqs)
 *     if default == no_default:             # <<<<<<<<<<<<<<
 *         return _pluck_index(ind, seqs)
 *     return _pluck_index_default(ind, seqs, default)
 */
  }

  /* "cytoolz/itertoolz.pyx":1206
 *     if default == no_default:
 *         return _pluck_index(ind, seqs)
 *     return _pluck_index_default(ind, seqs, default)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_ind);
  __Pyx_GIVEREF(__pyx_v_ind);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ind);
  __Pyx_INCREF(__pyx_v_seqs);
  __Pyx_GIVEREF(__pyx_v_seqs);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_seqs);
  __Pyx_INCREF(__pyx_v_default);
  __Pyx_GIVEREF(__pyx_v_default);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_default);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__pluck_index_default), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1174
 * 
 * 
 * cpdef object pluck(object ind, object seqs, object default='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     plucks an element or several elements from each item in a sequence.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytoolz.itertoolz.pluck", __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_7cytoolz_9itertoolz_49pluck(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_48pluck[] = "pluck(ind, seqs, default=u'__no__default__')\n\n    plucks an element or several elements from each item in a sequence.\n\n    ``pluck`` maps ``itertoolz.get`` over a sequence and returns one or more\n    elements of each item in the sequence.\n\n    This is equivalent to running `map(curried.get(ind), seqs)`\n\n    ``ind`` can be either a single string/index or a list of strings/indices.\n    ``seqs`` should be sequence containing sequences or dicts.\n\n    e.g.\n\n    >>> data = [{'id': 1, 'name': 'Cheese'}, {'id': 2, 'name': 'Pies'}]\n    >>> list(pluck('name', data))\n    ['Cheese', 'Pies']\n    >>> list(pluck([0, 1], [[1, 2, 3], [4, 5, 7]]))\n    [(1, 2), (4, 5)]\n\n    See Also:\n        get\n        map\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_49pluck = {"pluck", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_49pluck, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_48pluck};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_49pluck(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ind = 0;
  PyObject *__pyx_v_seqs = 0;
  PyObject *__pyx_v_default = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pluck (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ind,&__pyx_n_s_seqs,&__pyx_n_s_default,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_n_u_no__default);
    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_ind)) != 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_seqs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pluck", 0, 2, 3, 1); __PYX_ERR(0, 1174, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pluck") < 0)) __PYX_ERR(0, 1174, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ind = values[0];
    __pyx_v_seqs = values[1];
    __pyx_v_default = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pluck", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1174, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.pluck", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_48pluck(__pyx_self, __pyx_v_ind, __pyx_v_seqs, __pyx_v_default);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_48pluck(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ind, PyObject *__pyx_v_seqs, PyObject *__pyx_v_default) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytoolz_9itertoolz_pluck __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pluck", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.__pyx_default = __pyx_v_default;
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_pluck(__pyx_v_ind, __pyx_v_seqs, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":1210
 * 
 * cdef class _getter_index:
 *     def __cinit__(self, object ind):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 * 
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_13_getter_index_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_13_getter_index_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ind = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ind,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ind)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1210, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ind = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1210, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_index.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13_getter_index___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_index *)__pyx_v_self), __pyx_v_ind);

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

static int __pyx_pf_7cytoolz_9itertoolz_13_getter_index___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__getter_index *__pyx_v_self, PyObject *__pyx_v_ind) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":1211
 * cdef class _getter_index:
 *     def __cinit__(self, object ind):
 *         self.ind = ind             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, object seq):
 */
  __Pyx_INCREF(__pyx_v_ind);
  __Pyx_GIVEREF(__pyx_v_ind);
  __Pyx_GOTREF(__pyx_v_self->ind);
  __Pyx_DECREF(__pyx_v_self->ind);
  __pyx_v_self->ind = __pyx_v_ind;

  /* "cytoolz/itertoolz.pyx":1210
 * 
 * cdef class _getter_index:
 *     def __cinit__(self, object ind):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 * 
 */

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

/* "cytoolz/itertoolz.pyx":1213
 *         self.ind = ind
 * 
 *     def __call__(self, object seq):             # <<<<<<<<<<<<<<
 *         return seq[self.ind]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_getter_index_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_getter_index_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seq,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_seq)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1213, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_seq = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1213, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_index.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13_getter_index_2__call__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_index *)__pyx_v_self), __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_getter_index_2__call__(struct __pyx_obj_7cytoolz_9itertoolz__getter_index *__pyx_v_self, PyObject *__pyx_v_seq) {
  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("__call__", 0);

  /* "cytoolz/itertoolz.pyx":1214
 * 
 *     def __call__(self, object seq):
 *         return seq[self.ind]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_seq, __pyx_v_self->ind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1213
 *         self.ind = ind
 * 
 *     def __call__(self, object seq):             # <<<<<<<<<<<<<<
 *         return seq[self.ind]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_index.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_getter_index_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_13_getter_index_4__reduce_cython__[] = "_getter_index.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_13_getter_index_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13_getter_index_5__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_13_getter_index_4__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_getter_index_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13_getter_index_4__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_index *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_getter_index_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__getter_index *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_index.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_getter_index_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_13_getter_index_6__setstate_cython__[] = "_getter_index.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_13_getter_index_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13_getter_index_7__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_13_getter_index_6__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13_getter_index_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13_getter_index_6__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_index *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13_getter_index_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__getter_index *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_index.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1218
 * 
 * cdef class _getter_list:
 *     def __cinit__(self, list ind not None):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 *         self.n = len(ind)
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_12_getter_list_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_12_getter_list_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ind = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ind,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ind)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1218, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ind = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1218, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_list.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ind), (&PyList_Type), 0, "ind", 1))) __PYX_ERR(0, 1218, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_getter_list___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_list *)__pyx_v_self), __pyx_v_ind);

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

static int __pyx_pf_7cytoolz_9itertoolz_12_getter_list___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__getter_list *__pyx_v_self, PyObject *__pyx_v_ind) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":1219
 * cdef class _getter_list:
 *     def __cinit__(self, list ind not None):
 *         self.ind = ind             # <<<<<<<<<<<<<<
 *         self.n = len(ind)
 * 
 */
  __Pyx_INCREF(__pyx_v_ind);
  __Pyx_GIVEREF(__pyx_v_ind);
  __Pyx_GOTREF(__pyx_v_self->ind);
  __Pyx_DECREF(__pyx_v_self->ind);
  __pyx_v_self->ind = __pyx_v_ind;

  /* "cytoolz/itertoolz.pyx":1220
 *     def __cinit__(self, list ind not None):
 *         self.ind = ind
 *         self.n = len(ind)             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, object seq):
 */
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_ind); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1220, __pyx_L1_error)
  __pyx_v_self->n = __pyx_t_1;

  /* "cytoolz/itertoolz.pyx":1218
 * 
 * cdef class _getter_list:
 *     def __cinit__(self, list ind not None):             # <<<<<<<<<<<<<<
 *         self.ind = ind
 *         self.n = len(ind)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_list.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1222
 *         self.n = len(ind)
 * 
 *     def __call__(self, object seq):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i
 *         cdef tuple result
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_list_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_list_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seq,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_seq)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1222, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_seq = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1222, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_list.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_getter_list_2__call__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_list *)__pyx_v_self), __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_list_2__call__(struct __pyx_obj_7cytoolz_9itertoolz__getter_list *__pyx_v_self, PyObject *__pyx_v_seq) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "cytoolz/itertoolz.pyx":1226
 *         cdef tuple result
 *         cdef object val
 *         result = PyTuple_New(self.n)             # <<<<<<<<<<<<<<
 *         for i, val in enumerate(self.ind):
 *             val = seq[val]
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_self->n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1227
 *         cdef object val
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):             # <<<<<<<<<<<<<<
 *             val = seq[val]
 *             Py_INCREF(val)
 */
  __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_v_self->ind; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1227, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_v_i = __pyx_t_2;
    __pyx_t_2 = (__pyx_t_2 + 1);

    /* "cytoolz/itertoolz.pyx":1228
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):
 *             val = seq[val]             # <<<<<<<<<<<<<<
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(result, i, val)
 */
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_seq, __pyx_v_val); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":1229
 *         for i, val in enumerate(self.ind):
 *             val = seq[val]
 *             Py_INCREF(val)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(result, i, val)
 *         return result
 */
    Py_INCREF(__pyx_v_val);

    /* "cytoolz/itertoolz.pyx":1230
 *             val = seq[val]
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(result, i, val)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    PyTuple_SET_ITEM(__pyx_v_result, __pyx_v_i, __pyx_v_val);

    /* "cytoolz/itertoolz.pyx":1227
 *         cdef object val
 *         result = PyTuple_New(self.n)
 *         for i, val in enumerate(self.ind):             # <<<<<<<<<<<<<<
 *             val = seq[val]
 *             Py_INCREF(val)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1231
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(result, i, val)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1222
 *         self.n = len(ind)
 * 
 *     def __call__(self, object seq):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i
 *         cdef tuple result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_list.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_list_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_12_getter_list_4__reduce_cython__[] = "_getter_list.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_12_getter_list_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_getter_list_5__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_12_getter_list_4__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_list_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_getter_list_4__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_list *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_list_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__getter_list *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_list.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_list_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_12_getter_list_6__setstate_cython__[] = "_getter_list.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_12_getter_list_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_getter_list_7__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_12_getter_list_6__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_list_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_getter_list_6__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_list *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_list_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__getter_list *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_list.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1235
 * 
 * cdef class _getter_null:
 *     def __call__(self, object seq):             # <<<<<<<<<<<<<<
 *         return ()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_null_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_null_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seq,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_seq)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1235, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_seq = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1235, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_null.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_getter_null___call__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_null *)__pyx_v_self), __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_null___call__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__getter_null *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_seq) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "cytoolz/itertoolz.pyx":1236
 * cdef class _getter_null:
 *     def __call__(self, object seq):
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_r = __pyx_empty_tuple;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1235
 * 
 * cdef class _getter_null:
 *     def __call__(self, object seq):             # <<<<<<<<<<<<<<
 *         return ()
 * 
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_null_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_12_getter_null_2__reduce_cython__[] = "_getter_null.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_12_getter_null_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_getter_null_3__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_12_getter_null_2__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_null_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_getter_null_2__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_null *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_null_2__reduce_cython__(struct __pyx_obj_7cytoolz_9itertoolz__getter_null *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  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 = ()             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_v_state = __pyx_empty_tuple;

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

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

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

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

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

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

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

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

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

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

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytoolz.itertoolz._getter_null.__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__getter_null, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__getter_null__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_null_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_12_getter_null_4__setstate_cython__[] = "_getter_null.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_12_getter_null_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_getter_null_5__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_12_getter_null_4__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_12_getter_null_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_12_getter_null_4__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__getter_null *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_12_getter_null_4__setstate_cython__(struct __pyx_obj_7cytoolz_9itertoolz__getter_null *__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__getter_null, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__getter_null__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz___pyx_unpickle__getter_null__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__getter_null, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__getter_null__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("cytoolz.itertoolz._getter_null.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1240
 * 
 * # TODO: benchmark getters (and compare against itemgetter)
 * cpdef object getter(object index):             # <<<<<<<<<<<<<<
 *     if isinstance(index, list):
 *         if PyList_GET_SIZE(index) == 0:
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_51getter(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_getter(PyObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getter", 0);

  /* "cytoolz/itertoolz.pyx":1241
 * # TODO: benchmark getters (and compare against itemgetter)
 * cpdef object getter(object index):
 *     if isinstance(index, list):             # <<<<<<<<<<<<<<
 *         if PyList_GET_SIZE(index) == 0:
 *             return _getter_null()
 */
  __pyx_t_1 = PyList_Check(__pyx_v_index); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1242
 * cpdef object getter(object index):
 *     if isinstance(index, list):
 *         if PyList_GET_SIZE(index) == 0:             # <<<<<<<<<<<<<<
 *             return _getter_null()
 *         elif PyList_GET_SIZE(index) < 10:
 */
    __pyx_t_2 = ((PyList_GET_SIZE(__pyx_v_index) == 0) != 0);
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":1243
 *     if isinstance(index, list):
 *         if PyList_GET_SIZE(index) == 0:
 *             return _getter_null()             # <<<<<<<<<<<<<<
 *         elif PyList_GET_SIZE(index) < 10:
 *             return _getter_list(index)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__getter_null)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1242
 * cpdef object getter(object index):
 *     if isinstance(index, list):
 *         if PyList_GET_SIZE(index) == 0:             # <<<<<<<<<<<<<<
 *             return _getter_null()
 *         elif PyList_GET_SIZE(index) < 10:
 */
    }

    /* "cytoolz/itertoolz.pyx":1244
 *         if PyList_GET_SIZE(index) == 0:
 *             return _getter_null()
 *         elif PyList_GET_SIZE(index) < 10:             # <<<<<<<<<<<<<<
 *             return _getter_list(index)
 *         return itemgetter(*index)
 */
    __pyx_t_2 = ((PyList_GET_SIZE(__pyx_v_index) < 10) != 0);
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":1245
 *             return _getter_null()
 *         elif PyList_GET_SIZE(index) < 10:
 *             return _getter_list(index)             # <<<<<<<<<<<<<<
 *         return itemgetter(*index)
 *     return _getter_index(index)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__getter_list), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1244
 *         if PyList_GET_SIZE(index) == 0:
 *             return _getter_null()
 *         elif PyList_GET_SIZE(index) < 10:             # <<<<<<<<<<<<<<
 *             return _getter_list(index)
 *         return itemgetter(*index)
 */
    }

    /* "cytoolz/itertoolz.pyx":1246
 *         elif PyList_GET_SIZE(index) < 10:
 *             return _getter_list(index)
 *         return itemgetter(*index)             # <<<<<<<<<<<<<<
 *     return _getter_index(index)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_itemgetter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1246, __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_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":1241
 * # TODO: benchmark getters (and compare against itemgetter)
 * cpdef object getter(object index):
 *     if isinstance(index, list):             # <<<<<<<<<<<<<<
 *         if PyList_GET_SIZE(index) == 0:
 *             return _getter_null()
 */
  }

  /* "cytoolz/itertoolz.pyx":1247
 *             return _getter_list(index)
 *         return itemgetter(*index)
 *     return _getter_index(index)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__getter_index), __pyx_v_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1240
 * 
 * # TODO: benchmark getters (and compare against itemgetter)
 * cpdef object getter(object index):             # <<<<<<<<<<<<<<
 *     if isinstance(index, list):
 *         if PyList_GET_SIZE(index) == 0:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytoolz.itertoolz.getter", __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_7cytoolz_9itertoolz_51getter(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_50getter[] = "getter(index)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_51getter = {"getter", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_51getter, METH_O, __pyx_doc_7cytoolz_9itertoolz_50getter};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_51getter(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getter (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_50getter(__pyx_self, ((PyObject *)__pyx_v_index));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_50getter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index) {
  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("getter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_getter(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":1250
 * 
 * 
 * cpdef object join(object leftkey, object leftseq,             # <<<<<<<<<<<<<<
 *                   object rightkey, object rightseq,
 *                   object left_default='__no__default__',
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_53join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_join(PyObject *__pyx_v_leftkey, PyObject *__pyx_v_leftseq, PyObject *__pyx_v_rightkey, PyObject *__pyx_v_rightseq, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_join *__pyx_optional_args) {
  PyObject *__pyx_v_left_default = ((PyObject *)__pyx_n_u_no__default);
  PyObject *__pyx_v_right_default = ((PyObject *)__pyx_n_u_no__default);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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("join", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_left_default = __pyx_optional_args->left_default;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_right_default = __pyx_optional_args->right_default;
      }
    }
  }

  /* "cytoolz/itertoolz.pyx":1312
 *     >>> result = join(1, friends, 0, cities)  # doctest: +SKIP
 *     """
 *     if left_default == no_default and right_default == no_default:             # <<<<<<<<<<<<<<
 *         if callable(rightkey):
 *             return _inner_join_key(leftkey, leftseq, rightkey, rightseq,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_left_default, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __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, 1312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_no_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_right_default, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":1313
 *     """
 *     if left_default == no_default and right_default == no_default:
 *         if callable(rightkey):             # <<<<<<<<<<<<<<
 *             return _inner_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                    left_default, right_default)
 */
    __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_rightkey); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1313, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_1 != 0);
    if (__pyx_t_4) {

      /* "cytoolz/itertoolz.pyx":1314
 *     if left_default == no_default and right_default == no_default:
 *         if callable(rightkey):
 *             return _inner_join_key(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):
 */
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1315
 *         if callable(rightkey):
 *             return _inner_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                    left_default, right_default)             # <<<<<<<<<<<<<<
 *         elif isinstance(rightkey, list):
 *             return _inner_join_indices(leftkey, leftseq, rightkey, rightseq,
 */
      __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1314
 *     if left_default == no_default and right_default == no_default:
 *         if callable(rightkey):
 *             return _inner_join_key(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__inner_join_key), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1314, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1313
 *     """
 *     if left_default == no_default and right_default == no_default:
 *         if callable(rightkey):             # <<<<<<<<<<<<<<
 *             return _inner_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                    left_default, right_default)
 */
    }

    /* "cytoolz/itertoolz.pyx":1316
 *             return _inner_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):             # <<<<<<<<<<<<<<
 *             return _inner_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                        left_default, right_default)
 */
    __pyx_t_4 = PyList_Check(__pyx_v_rightkey); 
    __pyx_t_1 = (__pyx_t_4 != 0);
    if (__pyx_t_1) {

      /* "cytoolz/itertoolz.pyx":1317
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):
 *             return _inner_join_indices(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                        left_default, right_default)
 *         else:
 */
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1318
 *         elif isinstance(rightkey, list):
 *             return _inner_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                        left_default, right_default)             # <<<<<<<<<<<<<<
 *         else:
 *             return _inner_join_index(leftkey, leftseq, rightkey, rightseq,
 */
      __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1317
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):
 *             return _inner_join_indices(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                        left_default, right_default)
 *         else:
 */
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__inner_join_indices), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1316
 *             return _inner_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):             # <<<<<<<<<<<<<<
 *             return _inner_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                        left_default, right_default)
 */
    }

    /* "cytoolz/itertoolz.pyx":1320
 *                                        left_default, right_default)
 *         else:
 *             return _inner_join_index(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                      left_default, right_default)
 *     elif left_default != no_default and right_default == no_default:
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1321
 *         else:
 *             return _inner_join_index(leftkey, leftseq, rightkey, rightseq,
 *                                      left_default, right_default)             # <<<<<<<<<<<<<<
 *     elif left_default != no_default and right_default == no_default:
 *         if callable(rightkey):
 */
      __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1320
 *                                        left_default, right_default)
 *         else:
 *             return _inner_join_index(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                      left_default, right_default)
 *     elif left_default != no_default and right_default == no_default:
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__inner_join_index), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }

    /* "cytoolz/itertoolz.pyx":1312
 *     >>> result = join(1, friends, 0, cities)  # doctest: +SKIP
 *     """
 *     if left_default == no_default and right_default == no_default:             # <<<<<<<<<<<<<<
 *         if callable(rightkey):
 *             return _inner_join_key(leftkey, leftseq, rightkey, rightseq,
 */
  }

  /* "cytoolz/itertoolz.pyx":1322
 *             return _inner_join_index(leftkey, leftseq, rightkey, rightseq,
 *                                      left_default, right_default)
 *     elif left_default != no_default and right_default == no_default:             # <<<<<<<<<<<<<<
 *         if callable(rightkey):
 *             return _right_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_no_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_left_default, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L7_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_right_default, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __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, 1322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":1323
 *                                      left_default, right_default)
 *     elif left_default != no_default and right_default == no_default:
 *         if callable(rightkey):             # <<<<<<<<<<<<<<
 *             return _right_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                          left_default, right_default)
 */
    __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_rightkey); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1323, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_1 != 0);
    if (__pyx_t_4) {

      /* "cytoolz/itertoolz.pyx":1324
 *     elif left_default != no_default and right_default == no_default:
 *         if callable(rightkey):
 *             return _right_outer_join_key(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                          left_default, right_default)
 *         elif isinstance(rightkey, list):
 */
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1325
 *         if callable(rightkey):
 *             return _right_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                          left_default, right_default)             # <<<<<<<<<<<<<<
 *         elif isinstance(rightkey, list):
 *             return _right_outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 */
      __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1324
 *     elif left_default != no_default and right_default == no_default:
 *         if callable(rightkey):
 *             return _right_outer_join_key(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                          left_default, right_default)
 *         elif isinstance(rightkey, list):
 */
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__right_outer_join_key), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1323
 *                                      left_default, right_default)
 *     elif left_default != no_default and right_default == no_default:
 *         if callable(rightkey):             # <<<<<<<<<<<<<<
 *             return _right_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                          left_default, right_default)
 */
    }

    /* "cytoolz/itertoolz.pyx":1326
 *             return _right_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                          left_default, right_default)
 *         elif isinstance(rightkey, list):             # <<<<<<<<<<<<<<
 *             return _right_outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                              left_default, right_default)
 */
    __pyx_t_4 = PyList_Check(__pyx_v_rightkey); 
    __pyx_t_1 = (__pyx_t_4 != 0);
    if (__pyx_t_1) {

      /* "cytoolz/itertoolz.pyx":1327
 *                                          left_default, right_default)
 *         elif isinstance(rightkey, list):
 *             return _right_outer_join_indices(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                              left_default, right_default)
 *         else:
 */
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1328
 *         elif isinstance(rightkey, list):
 *             return _right_outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                              left_default, right_default)             # <<<<<<<<<<<<<<
 *         else:
 *             return _right_outer_join_index(leftkey, leftseq, rightkey, rightseq,
 */
      __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1327
 *                                          left_default, right_default)
 *         elif isinstance(rightkey, list):
 *             return _right_outer_join_indices(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                              left_default, right_default)
 *         else:
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__right_outer_join_indices), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1326
 *             return _right_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                          left_default, right_default)
 *         elif isinstance(rightkey, list):             # <<<<<<<<<<<<<<
 *             return _right_outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                              left_default, right_default)
 */
    }

    /* "cytoolz/itertoolz.pyx":1330
 *                                              left_default, right_default)
 *         else:
 *             return _right_outer_join_index(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                            left_default, right_default)
 *     elif left_default == no_default and right_default != no_default:
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1331
 *         else:
 *             return _right_outer_join_index(leftkey, leftseq, rightkey, rightseq,
 *                                            left_default, right_default)             # <<<<<<<<<<<<<<
 *     elif left_default == no_default and right_default != no_default:
 *         if callable(rightkey):
 */
      __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1330, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1330
 *                                              left_default, right_default)
 *         else:
 *             return _right_outer_join_index(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                            left_default, right_default)
 *     elif left_default == no_default and right_default != no_default:
 */
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__right_outer_join_index), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }

    /* "cytoolz/itertoolz.pyx":1322
 *             return _inner_join_index(leftkey, leftseq, rightkey, rightseq,
 *                                      left_default, right_default)
 *     elif left_default != no_default and right_default == no_default:             # <<<<<<<<<<<<<<
 *         if callable(rightkey):
 *             return _right_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 */
  }

  /* "cytoolz/itertoolz.pyx":1332
 *             return _right_outer_join_index(leftkey, leftseq, rightkey, rightseq,
 *                                            left_default, right_default)
 *     elif left_default == no_default and right_default != no_default:             # <<<<<<<<<<<<<<
 *         if callable(rightkey):
 *             return _left_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_left_default, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __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, 1332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L10_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_no_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_right_default, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":1333
 *                                            left_default, right_default)
 *     elif left_default == no_default and right_default != no_default:
 *         if callable(rightkey):             # <<<<<<<<<<<<<<
 *             return _left_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                         left_default, right_default)
 */
    __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_rightkey); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1333, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_1 != 0);
    if (__pyx_t_4) {

      /* "cytoolz/itertoolz.pyx":1334
 *     elif left_default == no_default and right_default != no_default:
 *         if callable(rightkey):
 *             return _left_outer_join_key(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                         left_default, right_default)
 *         elif isinstance(rightkey, list):
 */
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1335
 *         if callable(rightkey):
 *             return _left_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                         left_default, right_default)             # <<<<<<<<<<<<<<
 *         elif isinstance(rightkey, list):
 *             return _left_outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 */
      __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1334
 *     elif left_default == no_default and right_default != no_default:
 *         if callable(rightkey):
 *             return _left_outer_join_key(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                         left_default, right_default)
 *         elif isinstance(rightkey, list):
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__left_outer_join_key), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1333
 *                                            left_default, right_default)
 *     elif left_default == no_default and right_default != no_default:
 *         if callable(rightkey):             # <<<<<<<<<<<<<<
 *             return _left_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                         left_default, right_default)
 */
    }

    /* "cytoolz/itertoolz.pyx":1336
 *             return _left_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                         left_default, right_default)
 *         elif isinstance(rightkey, list):             # <<<<<<<<<<<<<<
 *             return _left_outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                             left_default, right_default)
 */
    __pyx_t_4 = PyList_Check(__pyx_v_rightkey); 
    __pyx_t_1 = (__pyx_t_4 != 0);
    if (__pyx_t_1) {

      /* "cytoolz/itertoolz.pyx":1337
 *                                         left_default, right_default)
 *         elif isinstance(rightkey, list):
 *             return _left_outer_join_indices(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                             left_default, right_default)
 *         else:
 */
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1338
 *         elif isinstance(rightkey, list):
 *             return _left_outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                             left_default, right_default)             # <<<<<<<<<<<<<<
 *         else:
 *             return _left_outer_join_index(leftkey, leftseq, rightkey, rightseq,
 */
      __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1337
 *                                         left_default, right_default)
 *         elif isinstance(rightkey, list):
 *             return _left_outer_join_indices(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                             left_default, right_default)
 *         else:
 */
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__left_outer_join_indices), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1336
 *             return _left_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                         left_default, right_default)
 *         elif isinstance(rightkey, list):             # <<<<<<<<<<<<<<
 *             return _left_outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                             left_default, right_default)
 */
    }

    /* "cytoolz/itertoolz.pyx":1340
 *                                             left_default, right_default)
 *         else:
 *             return _left_outer_join_index(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                           left_default, right_default)
 *     else:
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1341
 *         else:
 *             return _left_outer_join_index(leftkey, leftseq, rightkey, rightseq,
 *                                           left_default, right_default)             # <<<<<<<<<<<<<<
 *     else:
 *         if callable(rightkey):
 */
      __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1340
 *                                             left_default, right_default)
 *         else:
 *             return _left_outer_join_index(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                           left_default, right_default)
 *     else:
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__left_outer_join_index), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }

    /* "cytoolz/itertoolz.pyx":1332
 *             return _right_outer_join_index(leftkey, leftseq, rightkey, rightseq,
 *                                            left_default, right_default)
 *     elif left_default == no_default and right_default != no_default:             # <<<<<<<<<<<<<<
 *         if callable(rightkey):
 *             return _left_outer_join_key(leftkey, leftseq, rightkey, rightseq,
 */
  }

  /* "cytoolz/itertoolz.pyx":1343
 *                                           left_default, right_default)
 *     else:
 *         if callable(rightkey):             # <<<<<<<<<<<<<<
 *             return _outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                    left_default, right_default)
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_rightkey); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1343, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_1 != 0);
    if (__pyx_t_4) {

      /* "cytoolz/itertoolz.pyx":1344
 *     else:
 *         if callable(rightkey):
 *             return _outer_join_key(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):
 */
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1345
 *         if callable(rightkey):
 *             return _outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                    left_default, right_default)             # <<<<<<<<<<<<<<
 *         elif isinstance(rightkey, list):
 *             return _outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 */
      __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1344
 *     else:
 *         if callable(rightkey):
 *             return _outer_join_key(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):
 */
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__outer_join_key), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1343
 *                                           left_default, right_default)
 *     else:
 *         if callable(rightkey):             # <<<<<<<<<<<<<<
 *             return _outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                    left_default, right_default)
 */
    }

    /* "cytoolz/itertoolz.pyx":1346
 *             return _outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):             # <<<<<<<<<<<<<<
 *             return _outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                        left_default, right_default)
 */
    __pyx_t_4 = PyList_Check(__pyx_v_rightkey); 
    __pyx_t_1 = (__pyx_t_4 != 0);
    if (__pyx_t_1) {

      /* "cytoolz/itertoolz.pyx":1347
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):
 *             return _outer_join_indices(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                        left_default, right_default)
 *         else:
 */
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1348
 *         elif isinstance(rightkey, list):
 *             return _outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                        left_default, right_default)             # <<<<<<<<<<<<<<
 *         else:
 *             return _outer_join_index(leftkey, leftseq, rightkey, rightseq,
 */
      __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1347, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1347
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):
 *             return _outer_join_indices(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                        left_default, right_default)
 *         else:
 */
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__outer_join_indices), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1347, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1346
 *             return _outer_join_key(leftkey, leftseq, rightkey, rightseq,
 *                                    left_default, right_default)
 *         elif isinstance(rightkey, list):             # <<<<<<<<<<<<<<
 *             return _outer_join_indices(leftkey, leftseq, rightkey, rightseq,
 *                                        left_default, right_default)
 */
    }

    /* "cytoolz/itertoolz.pyx":1350
 *                                        left_default, right_default)
 *         else:
 *             return _outer_join_index(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                      left_default, right_default)
 * 
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);

      /* "cytoolz/itertoolz.pyx":1351
 *         else:
 *             return _outer_join_index(leftkey, leftseq, rightkey, rightseq,
 *                                      left_default, right_default)             # <<<<<<<<<<<<<<
 * 
 * cdef class _join:
 */
      __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1350, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_leftkey);
      __Pyx_GIVEREF(__pyx_v_leftkey);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_leftkey);
      __Pyx_INCREF(__pyx_v_leftseq);
      __Pyx_GIVEREF(__pyx_v_leftseq);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_leftseq);
      __Pyx_INCREF(__pyx_v_rightkey);
      __Pyx_GIVEREF(__pyx_v_rightkey);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_rightkey);
      __Pyx_INCREF(__pyx_v_rightseq);
      __Pyx_GIVEREF(__pyx_v_rightseq);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_rightseq);
      __Pyx_INCREF(__pyx_v_left_default);
      __Pyx_GIVEREF(__pyx_v_left_default);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_left_default);
      __Pyx_INCREF(__pyx_v_right_default);
      __Pyx_GIVEREF(__pyx_v_right_default);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_right_default);

      /* "cytoolz/itertoolz.pyx":1350
 *                                        left_default, right_default)
 *         else:
 *             return _outer_join_index(leftkey, leftseq, rightkey, rightseq,             # <<<<<<<<<<<<<<
 *                                      left_default, right_default)
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__outer_join_index), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }
  }

  /* "cytoolz/itertoolz.pyx":1250
 * 
 * 
 * cpdef object join(object leftkey, object leftseq,             # <<<<<<<<<<<<<<
 *                   object rightkey, object rightseq,
 *                   object left_default='__no__default__',
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz.join", __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_7cytoolz_9itertoolz_53join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_52join[] = "join(leftkey, leftseq, rightkey, rightseq, left_default=u'__no__default__', right_default=u'__no__default__')\n\n    Join two sequences on common attributes\n\n    This is a semi-streaming operation.  The LEFT sequence is fully evaluated\n    and placed into memory.  The RIGHT sequence is evaluated lazily and so can\n    be arbitrarily large.\n    (Note: If right_default is defined, then unique keys of rightseq\n        will also be stored in memory.)\n\n    >>> friends = [('Alice', 'Edith'),\n    ...            ('Alice', 'Zhao'),\n    ...            ('Edith', 'Alice'),\n    ...            ('Zhao', 'Alice'),\n    ...            ('Zhao', 'Edith')]\n\n    >>> cities = [('Alice', 'NYC'),\n    ...           ('Alice', 'Chicago'),\n    ...           ('Dan', 'Syndey'),\n    ...           ('Edith', 'Paris'),\n    ...           ('Edith', 'Berlin'),\n    ...           ('Zhao', 'Shanghai')]\n\n    >>> # Vacation opportunities\n    >>> # In what cities do people have friends?\n    >>> result = join(second, friends,\n    ...               first, cities)\n    >>> for ((a, b), (c, d)) in sorted(unique(result)):\n    ...     print((a, d))\n    ('Alice', 'Berlin')\n    ('Alice', 'Paris')\n    ('Alice', 'Shanghai')\n    ('Edith', 'Chicago')\n    ('Edith', 'NYC')\n    ('Zhao', 'Chicago')\n    ('Zhao', 'NYC')\n    ('Zhao', 'Berlin')\n    ('Zhao', 'Paris')\n\n    Specify outer joins with keyword arguments ``left_default`` and/or\n    ``right_default``.  Here is a full outer join in which unmatched elements\n    are paired with None.\n\n    >>> identity = lambda x: x\n    >>> list(join(identity, [1, 2, 3],\n    ...           identity, [2, 3, 4],\n    ...           left_default=None, right_default=None))\n    [(2, 2), (3, 3), (None, 4), (1, None)]\n\n    Usually the key arguments are callables to be applied to the sequences.  If\n    the keys are not obviously callable then it is assumed that indexing was\n    intended, e.g. the following is a legal change.\n    The join is implemented as"" a hash join and the keys of leftseq must be\n    hashable. Additionally, if right_default is defined, then keys of rightseq\n    must also be hashable.\n\n    >>> # result = join(second, friends, first, cities)\n    >>> result = join(1, friends, 0, cities)  # doctest: +SKIP\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_53join = {"join", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_53join, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_52join};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_53join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_leftkey = 0;
  PyObject *__pyx_v_leftseq = 0;
  PyObject *__pyx_v_rightkey = 0;
  PyObject *__pyx_v_rightseq = 0;
  PyObject *__pyx_v_left_default = 0;
  PyObject *__pyx_v_right_default = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("join (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_leftkey,&__pyx_n_s_leftseq,&__pyx_n_s_rightkey,&__pyx_n_s_rightseq,&__pyx_n_s_left_default,&__pyx_n_s_right_default,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[4] = ((PyObject *)__pyx_n_u_no__default);
    values[5] = ((PyObject *)__pyx_n_u_no__default);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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_leftkey)) != 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_leftseq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("join", 0, 4, 6, 1); __PYX_ERR(0, 1250, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rightkey)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("join", 0, 4, 6, 2); __PYX_ERR(0, 1250, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rightseq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("join", 0, 4, 6, 3); __PYX_ERR(0, 1250, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_left_default);
          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_right_default);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "join") < 0)) __PYX_ERR(0, 1250, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_leftkey = values[0];
    __pyx_v_leftseq = values[1];
    __pyx_v_rightkey = values[2];
    __pyx_v_rightseq = values[3];
    __pyx_v_left_default = values[4];
    __pyx_v_right_default = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("join", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1250, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_52join(__pyx_self, __pyx_v_leftkey, __pyx_v_leftseq, __pyx_v_rightkey, __pyx_v_rightseq, __pyx_v_left_default, __pyx_v_right_default);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_52join(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_leftkey, PyObject *__pyx_v_leftseq, PyObject *__pyx_v_rightkey, PyObject *__pyx_v_rightseq, PyObject *__pyx_v_left_default, PyObject *__pyx_v_right_default) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytoolz_9itertoolz_join __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("join", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.left_default = __pyx_v_left_default;
  __pyx_t_2.right_default = __pyx_v_right_default;
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_join(__pyx_v_leftkey, __pyx_v_leftseq, __pyx_v_rightkey, __pyx_v_rightseq, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":1354
 * 
 * cdef class _join:
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   object leftkey, object leftseq,
 *                   object rightkey, object rightseq,
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_5_join_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_5_join_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_leftkey = 0;
  PyObject *__pyx_v_leftseq = 0;
  PyObject *__pyx_v_rightkey = 0;
  PyObject *__pyx_v_rightseq = 0;
  PyObject *__pyx_v_left_default = 0;
  PyObject *__pyx_v_right_default = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_leftkey,&__pyx_n_s_leftseq,&__pyx_n_s_rightkey,&__pyx_n_s_rightseq,&__pyx_n_s_left_default,&__pyx_n_s_right_default,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[4] = __pyx_k__37;
    values[5] = __pyx_k__38;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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_leftkey)) != 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_leftseq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 6, 1); __PYX_ERR(0, 1354, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rightkey)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 6, 2); __PYX_ERR(0, 1354, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rightseq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 6, 3); __PYX_ERR(0, 1354, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_left_default);
          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_right_default);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1354, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        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_leftkey = values[0];
    __pyx_v_leftseq = values[1];
    __pyx_v_rightkey = values[2];
    __pyx_v_rightseq = values[3];
    __pyx_v_left_default = values[4];
    __pyx_v_right_default = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1354, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._join.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_5_join___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__join *)__pyx_v_self), __pyx_v_leftkey, __pyx_v_leftseq, __pyx_v_rightkey, __pyx_v_rightseq, __pyx_v_left_default, __pyx_v_right_default);

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

static int __pyx_pf_7cytoolz_9itertoolz_5_join___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__join *__pyx_v_self, PyObject *__pyx_v_leftkey, PyObject *__pyx_v_leftseq, PyObject *__pyx_v_rightkey, PyObject *__pyx_v_rightseq, PyObject *__pyx_v_left_default, PyObject *__pyx_v_right_default) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":1359
 *                   object left_default=no_default,
 *                   object right_default=no_default):
 *         self.left_default = left_default             # <<<<<<<<<<<<<<
 *         self.right_default = right_default
 * 
 */
  __Pyx_INCREF(__pyx_v_left_default);
  __Pyx_GIVEREF(__pyx_v_left_default);
  __Pyx_GOTREF(__pyx_v_self->left_default);
  __Pyx_DECREF(__pyx_v_self->left_default);
  __pyx_v_self->left_default = __pyx_v_left_default;

  /* "cytoolz/itertoolz.pyx":1360
 *                   object right_default=no_default):
 *         self.left_default = left_default
 *         self.right_default = right_default             # <<<<<<<<<<<<<<
 * 
 *         self._rightkey = rightkey
 */
  __Pyx_INCREF(__pyx_v_right_default);
  __Pyx_GIVEREF(__pyx_v_right_default);
  __Pyx_GOTREF(__pyx_v_self->right_default);
  __Pyx_DECREF(__pyx_v_self->right_default);
  __pyx_v_self->right_default = __pyx_v_right_default;

  /* "cytoolz/itertoolz.pyx":1362
 *         self.right_default = right_default
 * 
 *         self._rightkey = rightkey             # <<<<<<<<<<<<<<
 *         self.rightseq = iter(rightseq)
 *         if isinstance(rightkey, list):
 */
  __Pyx_INCREF(__pyx_v_rightkey);
  __Pyx_GIVEREF(__pyx_v_rightkey);
  __Pyx_GOTREF(__pyx_v_self->_rightkey);
  __Pyx_DECREF(__pyx_v_self->_rightkey);
  __pyx_v_self->_rightkey = __pyx_v_rightkey;

  /* "cytoolz/itertoolz.pyx":1363
 * 
 *         self._rightkey = rightkey
 *         self.rightseq = iter(rightseq)             # <<<<<<<<<<<<<<
 *         if isinstance(rightkey, list):
 *             self.N = len(rightkey)
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_rightseq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->rightseq);
  __Pyx_DECREF(__pyx_v_self->rightseq);
  __pyx_v_self->rightseq = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1364
 *         self._rightkey = rightkey
 *         self.rightseq = iter(rightseq)
 *         if isinstance(rightkey, list):             # <<<<<<<<<<<<<<
 *             self.N = len(rightkey)
 * 
 */
  __pyx_t_2 = PyList_Check(__pyx_v_rightkey); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":1365
 *         self.rightseq = iter(rightseq)
 *         if isinstance(rightkey, list):
 *             self.N = len(rightkey)             # <<<<<<<<<<<<<<
 * 
 *         self.d = groupby(leftkey, leftseq)
 */
    __pyx_t_4 = PyObject_Length(__pyx_v_rightkey); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1365, __pyx_L1_error)
    __pyx_v_self->N = __pyx_t_4;

    /* "cytoolz/itertoolz.pyx":1364
 *         self._rightkey = rightkey
 *         self.rightseq = iter(rightseq)
 *         if isinstance(rightkey, list):             # <<<<<<<<<<<<<<
 *             self.N = len(rightkey)
 * 
 */
  }

  /* "cytoolz/itertoolz.pyx":1367
 *             self.N = len(rightkey)
 * 
 *         self.d = groupby(leftkey, leftseq)             # <<<<<<<<<<<<<<
 *         self.seen_keys = set()
 *         self.matches = []
 */
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_groupby(__pyx_v_leftkey, __pyx_v_leftseq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->d);
  __Pyx_DECREF(__pyx_v_self->d);
  __pyx_v_self->d = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1368
 * 
 *         self.d = groupby(leftkey, leftseq)
 *         self.seen_keys = set()             # <<<<<<<<<<<<<<
 *         self.matches = []
 *         self.right = None
 */
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->seen_keys);
  __Pyx_DECREF(__pyx_v_self->seen_keys);
  __pyx_v_self->seen_keys = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1369
 *         self.d = groupby(leftkey, leftseq)
 *         self.seen_keys = set()
 *         self.matches = []             # <<<<<<<<<<<<<<
 *         self.right = None
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->matches);
  __Pyx_DECREF(__pyx_v_self->matches);
  __pyx_v_self->matches = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1370
 *         self.seen_keys = set()
 *         self.matches = []
 *         self.right = None             # <<<<<<<<<<<<<<
 * 
 *         self.is_rightseq_exhausted = False
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->right);
  __Pyx_DECREF(__pyx_v_self->right);
  __pyx_v_self->right = Py_None;

  /* "cytoolz/itertoolz.pyx":1372
 *         self.right = None
 * 
 *         self.is_rightseq_exhausted = False             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_v_self->is_rightseq_exhausted = 0;

  /* "cytoolz/itertoolz.pyx":1354
 * 
 * cdef class _join:
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   object leftkey, object leftseq,
 *                   object rightkey, object rightseq,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._join.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1374
 *         self.is_rightseq_exhausted = False
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_5_join_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__join *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_5_join_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__join *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":1375
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cdef object rightkey(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1374
 *         self.is_rightseq_exhausted = False
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":1377
 *         return self
 * 
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_5_join_rightkey(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__join *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rightkey", 0);

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_5_join_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_5_join_4__reduce_cython__[] = "_join.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_5_join_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_5_join_5__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_5_join_4__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_5_join_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_5_join_4__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__join *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_5_join_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__join *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._join.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_5_join_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_5_join_6__setstate_cython__[] = "_join.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_5_join_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_5_join_7__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_5_join_6__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_5_join_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_5_join_6__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__join *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_5_join_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__join *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._join.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1382
 * 
 * cdef class _right_outer_join(_join):
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef PyObject *obj
 *         if self.i == PyList_GET_SIZE(self.matches):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_1__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_1__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_right_outer_join___next__(((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_right_outer_join___next__(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *__pyx_v_self) {
  PyObject *__pyx_v_obj;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_match = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1384
 *     def __next__(self):
 *         cdef PyObject *obj
 *         if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *             self.right = next(self.rightseq)
 *             key = self.rightkey()
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base.matches;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((__pyx_v_self->__pyx_base.i == PyList_GET_SIZE(__pyx_t_1)) != 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1385
 *         cdef PyObject *obj
 *         if self.i == PyList_GET_SIZE(self.matches):
 *             self.right = next(self.rightseq)             # <<<<<<<<<<<<<<
 *             key = self.rightkey()
 *             obj = PyDict_GetItem(self.d, key)
 */
    __pyx_t_1 = __pyx_v_self->__pyx_base.rightseq;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->__pyx_base.right);
    __Pyx_DECREF(__pyx_v_self->__pyx_base.right);
    __pyx_v_self->__pyx_base.right = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cytoolz/itertoolz.pyx":1386
 *         if self.i == PyList_GET_SIZE(self.matches):
 *             self.right = next(self.rightseq)
 *             key = self.rightkey()             # <<<<<<<<<<<<<<
 *             obj = PyDict_GetItem(self.d, key)
 *             if obj is NULL:
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_7cytoolz_9itertoolz__right_outer_join *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.rightkey(((struct __pyx_obj_7cytoolz_9itertoolz__join *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_key = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cytoolz/itertoolz.pyx":1387
 *             self.right = next(self.rightseq)
 *             key = self.rightkey()
 *             obj = PyDict_GetItem(self.d, key)             # <<<<<<<<<<<<<<
 *             if obj is NULL:
 *                 return (self.left_default, self.right)
 */
    __pyx_t_3 = __pyx_v_self->__pyx_base.d;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_obj = PyDict_GetItem(__pyx_t_3, __pyx_v_key);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cytoolz/itertoolz.pyx":1388
 *             key = self.rightkey()
 *             obj = PyDict_GetItem(self.d, key)
 *             if obj is NULL:             # <<<<<<<<<<<<<<
 *                 return (self.left_default, self.right)
 *             self.matches = <object>obj
 */
    __pyx_t_2 = ((__pyx_v_obj == NULL) != 0);
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":1389
 *             obj = PyDict_GetItem(self.d, key)
 *             if obj is NULL:
 *                 return (self.left_default, self.right)             # <<<<<<<<<<<<<<
 *             self.matches = <object>obj
 *             self.i = 0
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_self->__pyx_base.left_default);
      __Pyx_GIVEREF(__pyx_v_self->__pyx_base.left_default);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.left_default);
      __Pyx_INCREF(__pyx_v_self->__pyx_base.right);
      __Pyx_GIVEREF(__pyx_v_self->__pyx_base.right);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.right);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1388
 *             key = self.rightkey()
 *             obj = PyDict_GetItem(self.d, key)
 *             if obj is NULL:             # <<<<<<<<<<<<<<
 *                 return (self.left_default, self.right)
 *             self.matches = <object>obj
 */
    }

    /* "cytoolz/itertoolz.pyx":1390
 *             if obj is NULL:
 *                 return (self.left_default, self.right)
 *             self.matches = <object>obj             # <<<<<<<<<<<<<<
 *             self.i = 0
 *         match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 */
    if (!(likely(PyList_CheckExact(((PyObject *)__pyx_v_obj)))||((((PyObject *)__pyx_v_obj)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(((PyObject *)__pyx_v_obj))->tp_name), 0))) __PYX_ERR(0, 1390, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_v_obj);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->__pyx_base.matches);
    __Pyx_DECREF(__pyx_v_self->__pyx_base.matches);
    __pyx_v_self->__pyx_base.matches = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytoolz/itertoolz.pyx":1391
 *                 return (self.left_default, self.right)
 *             self.matches = <object>obj
 *             self.i = 0             # <<<<<<<<<<<<<<
 *         match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *         self.i += 1
 */
    __pyx_v_self->__pyx_base.i = 0;

    /* "cytoolz/itertoolz.pyx":1384
 *     def __next__(self):
 *         cdef PyObject *obj
 *         if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *             self.right = next(self.rightseq)
 *             key = self.rightkey()
 */
  }

  /* "cytoolz/itertoolz.pyx":1392
 *             self.matches = <object>obj
 *             self.i = 0
 *         match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking             # <<<<<<<<<<<<<<
 *         self.i += 1
 *         return (match, self.right)
 */
  __pyx_t_3 = __pyx_v_self->__pyx_base.matches;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_v_self->__pyx_base.i);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = ((PyObject *)__pyx_t_4);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_match = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytoolz/itertoolz.pyx":1393
 *             self.i = 0
 *         match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *         self.i += 1             # <<<<<<<<<<<<<<
 *         return (match, self.right)
 * 
 */
  __pyx_v_self->__pyx_base.i = (__pyx_v_self->__pyx_base.i + 1);

  /* "cytoolz/itertoolz.pyx":1394
 *         match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *         self.i += 1
 *         return (match, self.right)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_match);
  __Pyx_GIVEREF(__pyx_v_match);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_match);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.right);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.right);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.right);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1382
 * 
 * cdef class _right_outer_join(_join):
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef PyObject *obj
 *         if self.i == PyList_GET_SIZE(self.matches):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_17_right_outer_join_2__reduce_cython__[] = "_right_outer_join.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_17_right_outer_join_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_3__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_17_right_outer_join_2__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_right_outer_join_2__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_right_outer_join_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_17_right_outer_join_4__setstate_cython__[] = "_right_outer_join.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_17_right_outer_join_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_5__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_17_right_outer_join_4__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_right_outer_join_4__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_right_outer_join_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1398
 * 
 * cdef class _right_outer_join_key(_right_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self._rightkey(self.right)
 * 
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_21_right_outer_join_key_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key *__pyx_v_self) {
  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("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1399
 * cdef class _right_outer_join_key(_right_outer_join):
 *     cdef object rightkey(self):
 *         return self._rightkey(self.right)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base._rightkey);
  __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base._rightkey; __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_self->__pyx_base.__pyx_base.right) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx_base.__pyx_base.right);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1399, __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;

  /* "cytoolz/itertoolz.pyx":1398
 * 
 * cdef class _right_outer_join_key(_right_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self._rightkey(self.right)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join_key.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_21_right_outer_join_key_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_21_right_outer_join_key___reduce_cython__[] = "_right_outer_join_key.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_21_right_outer_join_key_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_21_right_outer_join_key_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_21_right_outer_join_key___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_21_right_outer_join_key_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_21_right_outer_join_key___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_21_right_outer_join_key___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join_key.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_21_right_outer_join_key_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_21_right_outer_join_key_2__setstate_cython__[] = "_right_outer_join_key.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_21_right_outer_join_key_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_21_right_outer_join_key_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_21_right_outer_join_key_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_21_right_outer_join_key_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_21_right_outer_join_key_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_21_right_outer_join_key_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join_key.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1403
 * 
 * cdef class _right_outer_join_index(_right_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self.right[self._rightkey]
 * 
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_23_right_outer_join_index_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index *__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("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1404
 * cdef class _right_outer_join_index(_right_outer_join):
 *     cdef object rightkey(self):
 *         return self.right[self._rightkey]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.__pyx_base.right, __pyx_v_self->__pyx_base.__pyx_base._rightkey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1403
 * 
 * cdef class _right_outer_join_index(_right_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self.right[self._rightkey]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join_index.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_23_right_outer_join_index_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_23_right_outer_join_index___reduce_cython__[] = "_right_outer_join_index.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_23_right_outer_join_index_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_23_right_outer_join_index_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_23_right_outer_join_index___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_23_right_outer_join_index_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_23_right_outer_join_index___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_23_right_outer_join_index___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join_index.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_23_right_outer_join_index_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_23_right_outer_join_index_2__setstate_cython__[] = "_right_outer_join_index.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_23_right_outer_join_index_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_23_right_outer_join_index_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_23_right_outer_join_index_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_23_right_outer_join_index_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_23_right_outer_join_index_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_23_right_outer_join_index_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join_index.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1408
 * 
 * cdef class _right_outer_join_indices(_right_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_25_right_outer_join_indices_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices *__pyx_v_self) {
  PyObject *__pyx_v_keyval = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1409
 * cdef class _right_outer_join_indices(_right_outer_join):
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)             # <<<<<<<<<<<<<<
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_self->__pyx_base.__pyx_base.N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_keyval = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1410
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):             # <<<<<<<<<<<<<<
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]
 */
  __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.N;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cytoolz/itertoolz.pyx":1411
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)             # <<<<<<<<<<<<<<
 *             val = self.right[val]
 *             Py_INCREF(val)
 */
    __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base._rightkey;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_v_i);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_t_5);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":1412
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]             # <<<<<<<<<<<<<<
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.__pyx_base.right, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":1413
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]
 *             Py_INCREF(val)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(keyval, i, val)
 *         return keyval
 */
    Py_INCREF(__pyx_v_val);

    /* "cytoolz/itertoolz.pyx":1414
 *             val = self.right[val]
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)             # <<<<<<<<<<<<<<
 *         return keyval
 * 
 */
    PyTuple_SET_ITEM(__pyx_v_keyval, __pyx_v_i, __pyx_v_val);
  }

  /* "cytoolz/itertoolz.pyx":1415
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)
 *         return keyval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_keyval);
  __pyx_r = __pyx_v_keyval;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1408
 * 
 * cdef class _right_outer_join_indices(_right_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join_indices.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_keyval);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_25_right_outer_join_indices_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_25_right_outer_join_indices___reduce_cython__[] = "_right_outer_join_indices.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_25_right_outer_join_indices_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_25_right_outer_join_indices_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_25_right_outer_join_indices___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_25_right_outer_join_indices_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_25_right_outer_join_indices___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_25_right_outer_join_indices___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join_indices.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_25_right_outer_join_indices_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_25_right_outer_join_indices_2__setstate_cython__[] = "_right_outer_join_indices.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_25_right_outer_join_indices_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_25_right_outer_join_indices_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_25_right_outer_join_indices_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_25_right_outer_join_indices_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_25_right_outer_join_indices_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_25_right_outer_join_indices_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._right_outer_join_indices.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1419
 * 
 * cdef class _outer_join(_join):
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_outer_join_1__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_outer_join_1__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_outer_join___next__(((struct __pyx_obj_7cytoolz_9itertoolz__outer_join *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_outer_join___next__(struct __pyx_obj_7cytoolz_9itertoolz__outer_join *__pyx_v_self) {
  PyObject *__pyx_v_obj;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_match = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1421
 *     def __next__(self):
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:             # <<<<<<<<<<<<<<
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 try:
 */
  __pyx_t_1 = ((!(__pyx_v_self->__pyx_base.is_rightseq_exhausted != 0)) != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":1422
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:
 *             if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *                 try:
 *                     self.right = next(self.rightseq)
 */
    __pyx_t_2 = __pyx_v_self->__pyx_base.matches;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = ((__pyx_v_self->__pyx_base.i == PyList_GET_SIZE(__pyx_t_2)) != 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "cytoolz/itertoolz.pyx":1423
 *         if not self.is_rightseq_exhausted:
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 try:             # <<<<<<<<<<<<<<
 *                     self.right = next(self.rightseq)
 *                 except StopIteration:
 */
      {
        __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:*/ {

          /* "cytoolz/itertoolz.pyx":1424
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 try:
 *                     self.right = next(self.rightseq)             # <<<<<<<<<<<<<<
 *                 except StopIteration:
 *                     self.is_rightseq_exhausted = True
 */
          __pyx_t_2 = __pyx_v_self->__pyx_base.rightseq;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1424, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GIVEREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_v_self->__pyx_base.right);
          __Pyx_DECREF(__pyx_v_self->__pyx_base.right);
          __pyx_v_self->__pyx_base.right = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "cytoolz/itertoolz.pyx":1423
 *         if not self.is_rightseq_exhausted:
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 try:             # <<<<<<<<<<<<<<
 *                     self.right = next(self.rightseq)
 *                 except StopIteration:
 */
        }
        __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_L10_try_end;
        __pyx_L5_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "cytoolz/itertoolz.pyx":1425
 *                 try:
 *                     self.right = next(self.rightseq)
 *                 except StopIteration:             # <<<<<<<<<<<<<<
 *                     self.is_rightseq_exhausted = True
 *                     self.keys = iter(self.d)
 */
        __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
        if (__pyx_t_7) {
          __Pyx_AddTraceback("cytoolz.itertoolz._outer_join.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_8) < 0) __PYX_ERR(0, 1425, __pyx_L7_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_8);

          /* "cytoolz/itertoolz.pyx":1426
 *                     self.right = next(self.rightseq)
 *                 except StopIteration:
 *                     self.is_rightseq_exhausted = True             # <<<<<<<<<<<<<<
 *                     self.keys = iter(self.d)
 *                     return next(self)
 */
          __pyx_v_self->__pyx_base.is_rightseq_exhausted = 1;

          /* "cytoolz/itertoolz.pyx":1427
 *                 except StopIteration:
 *                     self.is_rightseq_exhausted = True
 *                     self.keys = iter(self.d)             # <<<<<<<<<<<<<<
 *                     return next(self)
 *                 key = self.rightkey()
 */
          __pyx_t_9 = __pyx_v_self->__pyx_base.d;
          __Pyx_INCREF(__pyx_t_9);
          __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1427, __pyx_L7_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GIVEREF(__pyx_t_10);
          __Pyx_GOTREF(__pyx_v_self->__pyx_base.keys);
          __Pyx_DECREF(__pyx_v_self->__pyx_base.keys);
          __pyx_v_self->__pyx_base.keys = __pyx_t_10;
          __pyx_t_10 = 0;

          /* "cytoolz/itertoolz.pyx":1428
 *                     self.is_rightseq_exhausted = True
 *                     self.keys = iter(self.d)
 *                     return next(self)             # <<<<<<<<<<<<<<
 *                 key = self.rightkey()
 *                 PySet_Add(self.seen_keys, key)
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_10 = __Pyx_PyIter_Next(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1428, __pyx_L7_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_r = __pyx_t_10;
          __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L8_except_return;
        }
        goto __pyx_L7_except_error;
        __pyx_L7_except_error:;

        /* "cytoolz/itertoolz.pyx":1423
 *         if not self.is_rightseq_exhausted:
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 try:             # <<<<<<<<<<<<<<
 *                     self.right = next(self.rightseq)
 *                 except StopIteration:
 */
        __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_L8_except_return:;
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
        goto __pyx_L0;
        __pyx_L10_try_end:;
      }

      /* "cytoolz/itertoolz.pyx":1429
 *                     self.keys = iter(self.d)
 *                     return next(self)
 *                 key = self.rightkey()             # <<<<<<<<<<<<<<
 *                 PySet_Add(self.seen_keys, key)
 *                 obj = PyDict_GetItem(self.d, key)
 */
      __pyx_t_8 = ((struct __pyx_vtabstruct_7cytoolz_9itertoolz__outer_join *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.rightkey(((struct __pyx_obj_7cytoolz_9itertoolz__join *)__pyx_v_self)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_key = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "cytoolz/itertoolz.pyx":1430
 *                     return next(self)
 *                 key = self.rightkey()
 *                 PySet_Add(self.seen_keys, key)             # <<<<<<<<<<<<<<
 *                 obj = PyDict_GetItem(self.d, key)
 *                 if obj is NULL:
 */
      __pyx_t_8 = __pyx_v_self->__pyx_base.seen_keys;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_7 = PySet_Add(__pyx_t_8, __pyx_v_key); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1430, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytoolz/itertoolz.pyx":1431
 *                 key = self.rightkey()
 *                 PySet_Add(self.seen_keys, key)
 *                 obj = PyDict_GetItem(self.d, key)             # <<<<<<<<<<<<<<
 *                 if obj is NULL:
 *                     return (self.left_default, self.right)
 */
      __pyx_t_8 = __pyx_v_self->__pyx_base.d;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_obj = PyDict_GetItem(__pyx_t_8, __pyx_v_key);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytoolz/itertoolz.pyx":1432
 *                 PySet_Add(self.seen_keys, key)
 *                 obj = PyDict_GetItem(self.d, key)
 *                 if obj is NULL:             # <<<<<<<<<<<<<<
 *                     return (self.left_default, self.right)
 *                 self.matches = <object>obj
 */
      __pyx_t_1 = ((__pyx_v_obj == NULL) != 0);
      if (__pyx_t_1) {

        /* "cytoolz/itertoolz.pyx":1433
 *                 obj = PyDict_GetItem(self.d, key)
 *                 if obj is NULL:
 *                     return (self.left_default, self.right)             # <<<<<<<<<<<<<<
 *                 self.matches = <object>obj
 *                 self.i = 0
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_self->__pyx_base.left_default);
        __Pyx_GIVEREF(__pyx_v_self->__pyx_base.left_default);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self->__pyx_base.left_default);
        __Pyx_INCREF(__pyx_v_self->__pyx_base.right);
        __Pyx_GIVEREF(__pyx_v_self->__pyx_base.right);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_self->__pyx_base.right);
        __pyx_r = __pyx_t_8;
        __pyx_t_8 = 0;
        goto __pyx_L0;

        /* "cytoolz/itertoolz.pyx":1432
 *                 PySet_Add(self.seen_keys, key)
 *                 obj = PyDict_GetItem(self.d, key)
 *                 if obj is NULL:             # <<<<<<<<<<<<<<
 *                     return (self.left_default, self.right)
 *                 self.matches = <object>obj
 */
      }

      /* "cytoolz/itertoolz.pyx":1434
 *                 if obj is NULL:
 *                     return (self.left_default, self.right)
 *                 self.matches = <object>obj             # <<<<<<<<<<<<<<
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 */
      if (!(likely(PyList_CheckExact(((PyObject *)__pyx_v_obj)))||((((PyObject *)__pyx_v_obj)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(((PyObject *)__pyx_v_obj))->tp_name), 0))) __PYX_ERR(0, 1434, __pyx_L1_error)
      __pyx_t_8 = ((PyObject *)__pyx_v_obj);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_v_self->__pyx_base.matches);
      __Pyx_DECREF(__pyx_v_self->__pyx_base.matches);
      __pyx_v_self->__pyx_base.matches = ((PyObject*)__pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytoolz/itertoolz.pyx":1435
 *                     return (self.left_default, self.right)
 *                 self.matches = <object>obj
 *                 self.i = 0             # <<<<<<<<<<<<<<
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1
 */
      __pyx_v_self->__pyx_base.i = 0;

      /* "cytoolz/itertoolz.pyx":1422
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:
 *             if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *                 try:
 *                     self.right = next(self.rightseq)
 */
    }

    /* "cytoolz/itertoolz.pyx":1436
 *                 self.matches = <object>obj
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking             # <<<<<<<<<<<<<<
 *             self.i += 1
 *             return (match, self.right)
 */
    __pyx_t_8 = __pyx_v_self->__pyx_base.matches;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_11 = PyList_GET_ITEM(__pyx_t_8, __pyx_v_self->__pyx_base.i);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = ((PyObject *)__pyx_t_11);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_v_match = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "cytoolz/itertoolz.pyx":1437
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1             # <<<<<<<<<<<<<<
 *             return (match, self.right)
 * 
 */
    __pyx_v_self->__pyx_base.i = (__pyx_v_self->__pyx_base.i + 1);

    /* "cytoolz/itertoolz.pyx":1438
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1
 *             return (match, self.right)             # <<<<<<<<<<<<<<
 * 
 *         else:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_match);
    __Pyx_GIVEREF(__pyx_v_match);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_match);
    __Pyx_INCREF(__pyx_v_self->__pyx_base.right);
    __Pyx_GIVEREF(__pyx_v_self->__pyx_base.right);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_self->__pyx_base.right);
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":1421
 *     def __next__(self):
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:             # <<<<<<<<<<<<<<
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 try:
 */
  }

  /* "cytoolz/itertoolz.pyx":1441
 * 
 *         else:
 *             if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *                 key = next(self.keys)
 *                 while key in self.seen_keys:
 */
  /*else*/ {
    __pyx_t_8 = __pyx_v_self->__pyx_base.matches;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_1 = ((__pyx_v_self->__pyx_base.i == PyList_GET_SIZE(__pyx_t_8)) != 0);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_1) {

      /* "cytoolz/itertoolz.pyx":1442
 *         else:
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 key = next(self.keys)             # <<<<<<<<<<<<<<
 *                 while key in self.seen_keys:
 *                     key = next(self.keys)
 */
      __pyx_t_8 = __pyx_v_self->__pyx_base.keys;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_key = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "cytoolz/itertoolz.pyx":1443
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 key = next(self.keys)
 *                 while key in self.seen_keys:             # <<<<<<<<<<<<<<
 *                     key = next(self.keys)
 *                 obj = PyDict_GetItem(self.d, key)
 */
      while (1) {
        if (unlikely(__pyx_v_self->__pyx_base.seen_keys == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
          __PYX_ERR(0, 1443, __pyx_L1_error)
        }
        __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_v_key, __pyx_v_self->__pyx_base.seen_keys, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1443, __pyx_L1_error)
        __pyx_t_12 = (__pyx_t_1 != 0);
        if (!__pyx_t_12) break;

        /* "cytoolz/itertoolz.pyx":1444
 *                 key = next(self.keys)
 *                 while key in self.seen_keys:
 *                     key = next(self.keys)             # <<<<<<<<<<<<<<
 *                 obj = PyDict_GetItem(self.d, key)
 *                 self.matches = <object>obj
 */
        __pyx_t_2 = __pyx_v_self->__pyx_base.keys;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1444, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_8);
        __pyx_t_8 = 0;
      }

      /* "cytoolz/itertoolz.pyx":1445
 *                 while key in self.seen_keys:
 *                     key = next(self.keys)
 *                 obj = PyDict_GetItem(self.d, key)             # <<<<<<<<<<<<<<
 *                 self.matches = <object>obj
 *                 self.i = 0
 */
      __pyx_t_8 = __pyx_v_self->__pyx_base.d;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_obj = PyDict_GetItem(__pyx_t_8, __pyx_v_key);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytoolz/itertoolz.pyx":1446
 *                     key = next(self.keys)
 *                 obj = PyDict_GetItem(self.d, key)
 *                 self.matches = <object>obj             # <<<<<<<<<<<<<<
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 */
      if (!(likely(PyList_CheckExact(((PyObject *)__pyx_v_obj)))||((((PyObject *)__pyx_v_obj)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(((PyObject *)__pyx_v_obj))->tp_name), 0))) __PYX_ERR(0, 1446, __pyx_L1_error)
      __pyx_t_8 = ((PyObject *)__pyx_v_obj);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_v_self->__pyx_base.matches);
      __Pyx_DECREF(__pyx_v_self->__pyx_base.matches);
      __pyx_v_self->__pyx_base.matches = ((PyObject*)__pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytoolz/itertoolz.pyx":1447
 *                 obj = PyDict_GetItem(self.d, key)
 *                 self.matches = <object>obj
 *                 self.i = 0             # <<<<<<<<<<<<<<
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1
 */
      __pyx_v_self->__pyx_base.i = 0;

      /* "cytoolz/itertoolz.pyx":1441
 * 
 *         else:
 *             if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *                 key = next(self.keys)
 *                 while key in self.seen_keys:
 */
    }

    /* "cytoolz/itertoolz.pyx":1448
 *                 self.matches = <object>obj
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking             # <<<<<<<<<<<<<<
 *             self.i += 1
 *             return (match, self.right_default)
 */
    __pyx_t_8 = __pyx_v_self->__pyx_base.matches;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_11 = PyList_GET_ITEM(__pyx_t_8, __pyx_v_self->__pyx_base.i);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = ((PyObject *)__pyx_t_11);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_v_match = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "cytoolz/itertoolz.pyx":1449
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1             # <<<<<<<<<<<<<<
 *             return (match, self.right_default)
 * 
 */
    __pyx_v_self->__pyx_base.i = (__pyx_v_self->__pyx_base.i + 1);

    /* "cytoolz/itertoolz.pyx":1450
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1
 *             return (match, self.right_default)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_match);
    __Pyx_GIVEREF(__pyx_v_match);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_match);
    __Pyx_INCREF(__pyx_v_self->__pyx_base.right_default);
    __Pyx_GIVEREF(__pyx_v_self->__pyx_base.right_default);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_self->__pyx_base.right_default);
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;
  }

  /* "cytoolz/itertoolz.pyx":1419
 * 
 * cdef class _outer_join(_join):
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_outer_join_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_11_outer_join_2__reduce_cython__[] = "_outer_join.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_11_outer_join_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_outer_join_3__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_11_outer_join_2__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_outer_join_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_outer_join_2__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__outer_join *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_outer_join_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_outer_join_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_11_outer_join_4__setstate_cython__[] = "_outer_join.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_11_outer_join_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_outer_join_5__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_11_outer_join_4__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_outer_join_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_outer_join_4__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__outer_join *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_outer_join_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1454
 * 
 * cdef class _outer_join_key(_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self._rightkey(self.right)
 * 
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_15_outer_join_key_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key *__pyx_v_self) {
  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("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1455
 * cdef class _outer_join_key(_outer_join):
 *     cdef object rightkey(self):
 *         return self._rightkey(self.right)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base._rightkey);
  __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base._rightkey; __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_self->__pyx_base.__pyx_base.right) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx_base.__pyx_base.right);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1454
 * 
 * cdef class _outer_join_key(_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self._rightkey(self.right)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join_key.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_15_outer_join_key_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_15_outer_join_key___reduce_cython__[] = "_outer_join_key.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_15_outer_join_key_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_15_outer_join_key_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_15_outer_join_key___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_15_outer_join_key_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_15_outer_join_key___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_15_outer_join_key___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join_key.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_15_outer_join_key_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_15_outer_join_key_2__setstate_cython__[] = "_outer_join_key.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_15_outer_join_key_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_15_outer_join_key_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_15_outer_join_key_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_15_outer_join_key_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_15_outer_join_key_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_15_outer_join_key_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join_key.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1459
 * 
 * cdef class _outer_join_index(_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self.right[self._rightkey]
 * 
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_17_outer_join_index_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index *__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("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1460
 * cdef class _outer_join_index(_outer_join):
 *     cdef object rightkey(self):
 *         return self.right[self._rightkey]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.__pyx_base.right, __pyx_v_self->__pyx_base.__pyx_base._rightkey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1459
 * 
 * cdef class _outer_join_index(_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self.right[self._rightkey]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join_index.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_outer_join_index_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_17_outer_join_index___reduce_cython__[] = "_outer_join_index.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_17_outer_join_index_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_outer_join_index_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_17_outer_join_index___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_outer_join_index_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_outer_join_index___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_outer_join_index___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join_index.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_outer_join_index_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_17_outer_join_index_2__setstate_cython__[] = "_outer_join_index.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_17_outer_join_index_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_outer_join_index_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_17_outer_join_index_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_outer_join_index_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_outer_join_index_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_outer_join_index_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join_index.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1464
 * 
 * cdef class _outer_join_indices(_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_19_outer_join_indices_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices *__pyx_v_self) {
  PyObject *__pyx_v_keyval = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1465
 * cdef class _outer_join_indices(_outer_join):
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)             # <<<<<<<<<<<<<<
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_self->__pyx_base.__pyx_base.N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_keyval = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1466
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):             # <<<<<<<<<<<<<<
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]
 */
  __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.N;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cytoolz/itertoolz.pyx":1467
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)             # <<<<<<<<<<<<<<
 *             val = self.right[val]
 *             Py_INCREF(val)
 */
    __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base._rightkey;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_v_i);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_t_5);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":1468
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]             # <<<<<<<<<<<<<<
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.__pyx_base.right, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":1469
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]
 *             Py_INCREF(val)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(keyval, i, val)
 *         return keyval
 */
    Py_INCREF(__pyx_v_val);

    /* "cytoolz/itertoolz.pyx":1470
 *             val = self.right[val]
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)             # <<<<<<<<<<<<<<
 *         return keyval
 * 
 */
    PyTuple_SET_ITEM(__pyx_v_keyval, __pyx_v_i, __pyx_v_val);
  }

  /* "cytoolz/itertoolz.pyx":1471
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)
 *         return keyval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_keyval);
  __pyx_r = __pyx_v_keyval;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1464
 * 
 * cdef class _outer_join_indices(_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join_indices.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_keyval);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_outer_join_indices_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_19_outer_join_indices___reduce_cython__[] = "_outer_join_indices.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_19_outer_join_indices_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_outer_join_indices_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_19_outer_join_indices___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_outer_join_indices_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_19_outer_join_indices___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_outer_join_indices___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join_indices.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_outer_join_indices_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_19_outer_join_indices_2__setstate_cython__[] = "_outer_join_indices.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_19_outer_join_indices_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_outer_join_indices_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_19_outer_join_indices_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_outer_join_indices_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_19_outer_join_indices_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_outer_join_indices_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._outer_join_indices.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1475
 * 
 * cdef class _left_outer_join(_join):
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_1__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_1__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_16_left_outer_join___next__(((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_left_outer_join___next__(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *__pyx_v_self) {
  PyObject *__pyx_v_obj;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_match = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1477
 *     def __next__(self):
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:             # <<<<<<<<<<<<<<
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 obj = NULL
 */
  __pyx_t_1 = ((!(__pyx_v_self->__pyx_base.is_rightseq_exhausted != 0)) != 0);
  if (__pyx_t_1) {

    /* "cytoolz/itertoolz.pyx":1478
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:
 *             if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *                 obj = NULL
 *                 while obj is NULL:
 */
    __pyx_t_2 = __pyx_v_self->__pyx_base.matches;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = ((__pyx_v_self->__pyx_base.i == PyList_GET_SIZE(__pyx_t_2)) != 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "cytoolz/itertoolz.pyx":1479
 *         if not self.is_rightseq_exhausted:
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 obj = NULL             # <<<<<<<<<<<<<<
 *                 while obj is NULL:
 *                     try:
 */
      __pyx_v_obj = NULL;

      /* "cytoolz/itertoolz.pyx":1480
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 obj = NULL
 *                 while obj is NULL:             # <<<<<<<<<<<<<<
 *                     try:
 *                         self.right = next(self.rightseq)
 */
      while (1) {
        __pyx_t_1 = ((__pyx_v_obj == NULL) != 0);
        if (!__pyx_t_1) break;

        /* "cytoolz/itertoolz.pyx":1481
 *                 obj = NULL
 *                 while obj is NULL:
 *                     try:             # <<<<<<<<<<<<<<
 *                         self.right = next(self.rightseq)
 *                     except StopIteration:
 */
        {
          __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:*/ {

            /* "cytoolz/itertoolz.pyx":1482
 *                 while obj is NULL:
 *                     try:
 *                         self.right = next(self.rightseq)             # <<<<<<<<<<<<<<
 *                     except StopIteration:
 *                         self.is_rightseq_exhausted = True
 */
            __pyx_t_2 = __pyx_v_self->__pyx_base.rightseq;
            __Pyx_INCREF(__pyx_t_2);
            __pyx_t_6 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1482, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GIVEREF(__pyx_t_6);
            __Pyx_GOTREF(__pyx_v_self->__pyx_base.right);
            __Pyx_DECREF(__pyx_v_self->__pyx_base.right);
            __pyx_v_self->__pyx_base.right = __pyx_t_6;
            __pyx_t_6 = 0;

            /* "cytoolz/itertoolz.pyx":1481
 *                 obj = NULL
 *                 while obj is NULL:
 *                     try:             # <<<<<<<<<<<<<<
 *                         self.right = next(self.rightseq)
 *                     except StopIteration:
 */
          }
          __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_L14_try_end;
          __pyx_L7_error:;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "cytoolz/itertoolz.pyx":1483
 *                     try:
 *                         self.right = next(self.rightseq)
 *                     except StopIteration:             # <<<<<<<<<<<<<<
 *                         self.is_rightseq_exhausted = True
 *                         self.keys = iter(self.d)
 */
          __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
          if (__pyx_t_7) {
            __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_8) < 0) __PYX_ERR(0, 1483, __pyx_L9_except_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GOTREF(__pyx_t_8);

            /* "cytoolz/itertoolz.pyx":1484
 *                         self.right = next(self.rightseq)
 *                     except StopIteration:
 *                         self.is_rightseq_exhausted = True             # <<<<<<<<<<<<<<
 *                         self.keys = iter(self.d)
 *                         return next(self)
 */
            __pyx_v_self->__pyx_base.is_rightseq_exhausted = 1;

            /* "cytoolz/itertoolz.pyx":1485
 *                     except StopIteration:
 *                         self.is_rightseq_exhausted = True
 *                         self.keys = iter(self.d)             # <<<<<<<<<<<<<<
 *                         return next(self)
 *                     key = self.rightkey()
 */
            __pyx_t_9 = __pyx_v_self->__pyx_base.d;
            __Pyx_INCREF(__pyx_t_9);
            __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1485, __pyx_L9_except_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GIVEREF(__pyx_t_10);
            __Pyx_GOTREF(__pyx_v_self->__pyx_base.keys);
            __Pyx_DECREF(__pyx_v_self->__pyx_base.keys);
            __pyx_v_self->__pyx_base.keys = __pyx_t_10;
            __pyx_t_10 = 0;

            /* "cytoolz/itertoolz.pyx":1486
 *                         self.is_rightseq_exhausted = True
 *                         self.keys = iter(self.d)
 *                         return next(self)             # <<<<<<<<<<<<<<
 *                     key = self.rightkey()
 *                     PySet_Add(self.seen_keys, key)
 */
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_10 = __Pyx_PyIter_Next(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1486, __pyx_L9_except_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_r = __pyx_t_10;
            __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            goto __pyx_L10_except_return;
          }
          goto __pyx_L9_except_error;
          __pyx_L9_except_error:;

          /* "cytoolz/itertoolz.pyx":1481
 *                 obj = NULL
 *                 while obj is NULL:
 *                     try:             # <<<<<<<<<<<<<<
 *                         self.right = next(self.rightseq)
 *                     except StopIteration:
 */
          __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_L10_except_return:;
          __Pyx_XGIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_4);
          __Pyx_XGIVEREF(__pyx_t_5);
          __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
          goto __pyx_L0;
          __pyx_L14_try_end:;
        }

        /* "cytoolz/itertoolz.pyx":1487
 *                         self.keys = iter(self.d)
 *                         return next(self)
 *                     key = self.rightkey()             # <<<<<<<<<<<<<<
 *                     PySet_Add(self.seen_keys, key)
 *                     obj = PyDict_GetItem(self.d, key)
 */
        __pyx_t_8 = ((struct __pyx_vtabstruct_7cytoolz_9itertoolz__left_outer_join *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.rightkey(((struct __pyx_obj_7cytoolz_9itertoolz__join *)__pyx_v_self)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1487, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "cytoolz/itertoolz.pyx":1488
 *                         return next(self)
 *                     key = self.rightkey()
 *                     PySet_Add(self.seen_keys, key)             # <<<<<<<<<<<<<<
 *                     obj = PyDict_GetItem(self.d, key)
 *                 self.matches = <object>obj
 */
        __pyx_t_8 = __pyx_v_self->__pyx_base.seen_keys;
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_7 = PySet_Add(__pyx_t_8, __pyx_v_key); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1488, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytoolz/itertoolz.pyx":1489
 *                     key = self.rightkey()
 *                     PySet_Add(self.seen_keys, key)
 *                     obj = PyDict_GetItem(self.d, key)             # <<<<<<<<<<<<<<
 *                 self.matches = <object>obj
 *                 self.i = 0
 */
        __pyx_t_8 = __pyx_v_self->__pyx_base.d;
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_obj = PyDict_GetItem(__pyx_t_8, __pyx_v_key);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }

      /* "cytoolz/itertoolz.pyx":1490
 *                     PySet_Add(self.seen_keys, key)
 *                     obj = PyDict_GetItem(self.d, key)
 *                 self.matches = <object>obj             # <<<<<<<<<<<<<<
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 */
      if (!(likely(PyList_CheckExact(((PyObject *)__pyx_v_obj)))||((((PyObject *)__pyx_v_obj)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(((PyObject *)__pyx_v_obj))->tp_name), 0))) __PYX_ERR(0, 1490, __pyx_L1_error)
      __pyx_t_8 = ((PyObject *)__pyx_v_obj);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_v_self->__pyx_base.matches);
      __Pyx_DECREF(__pyx_v_self->__pyx_base.matches);
      __pyx_v_self->__pyx_base.matches = ((PyObject*)__pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytoolz/itertoolz.pyx":1491
 *                     obj = PyDict_GetItem(self.d, key)
 *                 self.matches = <object>obj
 *                 self.i = 0             # <<<<<<<<<<<<<<
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1
 */
      __pyx_v_self->__pyx_base.i = 0;

      /* "cytoolz/itertoolz.pyx":1478
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:
 *             if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *                 obj = NULL
 *                 while obj is NULL:
 */
    }

    /* "cytoolz/itertoolz.pyx":1492
 *                 self.matches = <object>obj
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking             # <<<<<<<<<<<<<<
 *             self.i += 1
 *             return (match, self.right)
 */
    __pyx_t_8 = __pyx_v_self->__pyx_base.matches;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_11 = PyList_GET_ITEM(__pyx_t_8, __pyx_v_self->__pyx_base.i);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = ((PyObject *)__pyx_t_11);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_v_match = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "cytoolz/itertoolz.pyx":1493
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1             # <<<<<<<<<<<<<<
 *             return (match, self.right)
 * 
 */
    __pyx_v_self->__pyx_base.i = (__pyx_v_self->__pyx_base.i + 1);

    /* "cytoolz/itertoolz.pyx":1494
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1
 *             return (match, self.right)             # <<<<<<<<<<<<<<
 * 
 *         else:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_match);
    __Pyx_GIVEREF(__pyx_v_match);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_match);
    __Pyx_INCREF(__pyx_v_self->__pyx_base.right);
    __Pyx_GIVEREF(__pyx_v_self->__pyx_base.right);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_self->__pyx_base.right);
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":1477
 *     def __next__(self):
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:             # <<<<<<<<<<<<<<
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 obj = NULL
 */
  }

  /* "cytoolz/itertoolz.pyx":1497
 * 
 *         else:
 *             if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *                 key = next(self.keys)
 *                 while key in self.seen_keys:
 */
  /*else*/ {
    __pyx_t_8 = __pyx_v_self->__pyx_base.matches;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_1 = ((__pyx_v_self->__pyx_base.i == PyList_GET_SIZE(__pyx_t_8)) != 0);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_1) {

      /* "cytoolz/itertoolz.pyx":1498
 *         else:
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 key = next(self.keys)             # <<<<<<<<<<<<<<
 *                 while key in self.seen_keys:
 *                     key = next(self.keys)
 */
      __pyx_t_8 = __pyx_v_self->__pyx_base.keys;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_key = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "cytoolz/itertoolz.pyx":1499
 *             if self.i == PyList_GET_SIZE(self.matches):
 *                 key = next(self.keys)
 *                 while key in self.seen_keys:             # <<<<<<<<<<<<<<
 *                     key = next(self.keys)
 *                 obj = PyDict_GetItem(self.d, key)
 */
      while (1) {
        if (unlikely(__pyx_v_self->__pyx_base.seen_keys == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
          __PYX_ERR(0, 1499, __pyx_L1_error)
        }
        __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_v_key, __pyx_v_self->__pyx_base.seen_keys, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1499, __pyx_L1_error)
        __pyx_t_12 = (__pyx_t_1 != 0);
        if (!__pyx_t_12) break;

        /* "cytoolz/itertoolz.pyx":1500
 *                 key = next(self.keys)
 *                 while key in self.seen_keys:
 *                     key = next(self.keys)             # <<<<<<<<<<<<<<
 *                 obj = PyDict_GetItem(self.d, key)
 *                 self.matches = <object>obj
 */
        __pyx_t_2 = __pyx_v_self->__pyx_base.keys;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1500, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_8);
        __pyx_t_8 = 0;
      }

      /* "cytoolz/itertoolz.pyx":1501
 *                 while key in self.seen_keys:
 *                     key = next(self.keys)
 *                 obj = PyDict_GetItem(self.d, key)             # <<<<<<<<<<<<<<
 *                 self.matches = <object>obj
 *                 self.i = 0
 */
      __pyx_t_8 = __pyx_v_self->__pyx_base.d;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_obj = PyDict_GetItem(__pyx_t_8, __pyx_v_key);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytoolz/itertoolz.pyx":1502
 *                     key = next(self.keys)
 *                 obj = PyDict_GetItem(self.d, key)
 *                 self.matches = <object>obj             # <<<<<<<<<<<<<<
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 */
      if (!(likely(PyList_CheckExact(((PyObject *)__pyx_v_obj)))||((((PyObject *)__pyx_v_obj)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(((PyObject *)__pyx_v_obj))->tp_name), 0))) __PYX_ERR(0, 1502, __pyx_L1_error)
      __pyx_t_8 = ((PyObject *)__pyx_v_obj);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_v_self->__pyx_base.matches);
      __Pyx_DECREF(__pyx_v_self->__pyx_base.matches);
      __pyx_v_self->__pyx_base.matches = ((PyObject*)__pyx_t_8);
      __pyx_t_8 = 0;

      /* "cytoolz/itertoolz.pyx":1503
 *                 obj = PyDict_GetItem(self.d, key)
 *                 self.matches = <object>obj
 *                 self.i = 0             # <<<<<<<<<<<<<<
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1
 */
      __pyx_v_self->__pyx_base.i = 0;

      /* "cytoolz/itertoolz.pyx":1497
 * 
 *         else:
 *             if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *                 key = next(self.keys)
 *                 while key in self.seen_keys:
 */
    }

    /* "cytoolz/itertoolz.pyx":1504
 *                 self.matches = <object>obj
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking             # <<<<<<<<<<<<<<
 *             self.i += 1
 *             return (match, self.right_default)
 */
    __pyx_t_8 = __pyx_v_self->__pyx_base.matches;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_11 = PyList_GET_ITEM(__pyx_t_8, __pyx_v_self->__pyx_base.i);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = ((PyObject *)__pyx_t_11);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_v_match = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "cytoolz/itertoolz.pyx":1505
 *                 self.i = 0
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1             # <<<<<<<<<<<<<<
 *             return (match, self.right_default)
 * 
 */
    __pyx_v_self->__pyx_base.i = (__pyx_v_self->__pyx_base.i + 1);

    /* "cytoolz/itertoolz.pyx":1506
 *             match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *             self.i += 1
 *             return (match, self.right_default)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_match);
    __Pyx_GIVEREF(__pyx_v_match);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_match);
    __Pyx_INCREF(__pyx_v_self->__pyx_base.right_default);
    __Pyx_GIVEREF(__pyx_v_self->__pyx_base.right_default);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_self->__pyx_base.right_default);
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;
  }

  /* "cytoolz/itertoolz.pyx":1475
 * 
 * cdef class _left_outer_join(_join):
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef PyObject *obj
 *         if not self.is_rightseq_exhausted:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_16_left_outer_join_2__reduce_cython__[] = "_left_outer_join.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_16_left_outer_join_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_3__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_16_left_outer_join_2__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_16_left_outer_join_2__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_left_outer_join_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_16_left_outer_join_4__setstate_cython__[] = "_left_outer_join.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_16_left_outer_join_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_5__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_16_left_outer_join_4__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_16_left_outer_join_4__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_16_left_outer_join_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1510
 * 
 * cdef class _left_outer_join_key(_left_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self._rightkey(self.right)
 * 
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_20_left_outer_join_key_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key *__pyx_v_self) {
  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("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1511
 * cdef class _left_outer_join_key(_left_outer_join):
 *     cdef object rightkey(self):
 *         return self._rightkey(self.right)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base._rightkey);
  __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base._rightkey; __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_self->__pyx_base.__pyx_base.right) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx_base.__pyx_base.right);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1510
 * 
 * cdef class _left_outer_join_key(_left_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self._rightkey(self.right)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join_key.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_left_outer_join_key_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_20_left_outer_join_key___reduce_cython__[] = "_left_outer_join_key.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_20_left_outer_join_key_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_20_left_outer_join_key_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_20_left_outer_join_key___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_left_outer_join_key_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_20_left_outer_join_key___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_left_outer_join_key___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join_key.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_left_outer_join_key_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_20_left_outer_join_key_2__setstate_cython__[] = "_left_outer_join_key.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_20_left_outer_join_key_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_20_left_outer_join_key_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_20_left_outer_join_key_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_20_left_outer_join_key_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_20_left_outer_join_key_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_20_left_outer_join_key_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join_key.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1515
 * 
 * cdef class _left_outer_join_index(_left_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self.right[self._rightkey]
 * 
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_22_left_outer_join_index_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index *__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("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1516
 * cdef class _left_outer_join_index(_left_outer_join):
 *     cdef object rightkey(self):
 *         return self.right[self._rightkey]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.__pyx_base.right, __pyx_v_self->__pyx_base.__pyx_base._rightkey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1515
 * 
 * cdef class _left_outer_join_index(_left_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self.right[self._rightkey]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join_index.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_22_left_outer_join_index_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_22_left_outer_join_index___reduce_cython__[] = "_left_outer_join_index.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_22_left_outer_join_index_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_22_left_outer_join_index_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_22_left_outer_join_index___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_22_left_outer_join_index_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_22_left_outer_join_index___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_22_left_outer_join_index___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join_index.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_22_left_outer_join_index_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_22_left_outer_join_index_2__setstate_cython__[] = "_left_outer_join_index.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_22_left_outer_join_index_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_22_left_outer_join_index_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_22_left_outer_join_index_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_22_left_outer_join_index_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_22_left_outer_join_index_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_22_left_outer_join_index_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join_index.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1520
 * 
 * cdef class _left_outer_join_indices(_left_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_24_left_outer_join_indices_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices *__pyx_v_self) {
  PyObject *__pyx_v_keyval = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1521
 * cdef class _left_outer_join_indices(_left_outer_join):
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)             # <<<<<<<<<<<<<<
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_self->__pyx_base.__pyx_base.N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_keyval = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1522
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):             # <<<<<<<<<<<<<<
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]
 */
  __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.N;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cytoolz/itertoolz.pyx":1523
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)             # <<<<<<<<<<<<<<
 *             val = self.right[val]
 *             Py_INCREF(val)
 */
    __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base._rightkey;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_v_i);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_t_5);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":1524
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]             # <<<<<<<<<<<<<<
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.__pyx_base.right, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":1525
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]
 *             Py_INCREF(val)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(keyval, i, val)
 *         return keyval
 */
    Py_INCREF(__pyx_v_val);

    /* "cytoolz/itertoolz.pyx":1526
 *             val = self.right[val]
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)             # <<<<<<<<<<<<<<
 *         return keyval
 * 
 */
    PyTuple_SET_ITEM(__pyx_v_keyval, __pyx_v_i, __pyx_v_val);
  }

  /* "cytoolz/itertoolz.pyx":1527
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)
 *         return keyval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_keyval);
  __pyx_r = __pyx_v_keyval;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1520
 * 
 * cdef class _left_outer_join_indices(_left_outer_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join_indices.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_keyval);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_24_left_outer_join_indices_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_24_left_outer_join_indices___reduce_cython__[] = "_left_outer_join_indices.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_24_left_outer_join_indices_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_24_left_outer_join_indices_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_24_left_outer_join_indices___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_24_left_outer_join_indices_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_24_left_outer_join_indices___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_24_left_outer_join_indices___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join_indices.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_24_left_outer_join_indices_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_24_left_outer_join_indices_2__setstate_cython__[] = "_left_outer_join_indices.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_24_left_outer_join_indices_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_24_left_outer_join_indices_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_24_left_outer_join_indices_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_24_left_outer_join_indices_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_24_left_outer_join_indices_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_24_left_outer_join_indices_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._left_outer_join_indices.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1531
 * 
 * cdef class _inner_join(_join):
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef PyObject *obj = NULL
 *         if self.i == PyList_GET_SIZE(self.matches):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_inner_join_1__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_inner_join_1__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_inner_join___next__(((struct __pyx_obj_7cytoolz_9itertoolz__inner_join *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_inner_join___next__(struct __pyx_obj_7cytoolz_9itertoolz__inner_join *__pyx_v_self) {
  PyObject *__pyx_v_obj;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_match = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1532
 * cdef class _inner_join(_join):
 *     def __next__(self):
 *         cdef PyObject *obj = NULL             # <<<<<<<<<<<<<<
 *         if self.i == PyList_GET_SIZE(self.matches):
 *             while obj is NULL:
 */
  __pyx_v_obj = NULL;

  /* "cytoolz/itertoolz.pyx":1533
 *     def __next__(self):
 *         cdef PyObject *obj = NULL
 *         if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *             while obj is NULL:
 *                 self.right = next(self.rightseq)
 */
  __pyx_t_1 = __pyx_v_self->__pyx_base.matches;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((__pyx_v_self->__pyx_base.i == PyList_GET_SIZE(__pyx_t_1)) != 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1534
 *         cdef PyObject *obj = NULL
 *         if self.i == PyList_GET_SIZE(self.matches):
 *             while obj is NULL:             # <<<<<<<<<<<<<<
 *                 self.right = next(self.rightseq)
 *                 key = self.rightkey()
 */
    while (1) {
      __pyx_t_2 = ((__pyx_v_obj == NULL) != 0);
      if (!__pyx_t_2) break;

      /* "cytoolz/itertoolz.pyx":1535
 *         if self.i == PyList_GET_SIZE(self.matches):
 *             while obj is NULL:
 *                 self.right = next(self.rightseq)             # <<<<<<<<<<<<<<
 *                 key = self.rightkey()
 *                 obj = PyDict_GetItem(self.d, key)
 */
      __pyx_t_1 = __pyx_v_self->__pyx_base.rightseq;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1535, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_v_self->__pyx_base.right);
      __Pyx_DECREF(__pyx_v_self->__pyx_base.right);
      __pyx_v_self->__pyx_base.right = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "cytoolz/itertoolz.pyx":1536
 *             while obj is NULL:
 *                 self.right = next(self.rightseq)
 *                 key = self.rightkey()             # <<<<<<<<<<<<<<
 *                 obj = PyDict_GetItem(self.d, key)
 *             self.matches = <object>obj
 */
      __pyx_t_3 = ((struct __pyx_vtabstruct_7cytoolz_9itertoolz__inner_join *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.rightkey(((struct __pyx_obj_7cytoolz_9itertoolz__join *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cytoolz/itertoolz.pyx":1537
 *                 self.right = next(self.rightseq)
 *                 key = self.rightkey()
 *                 obj = PyDict_GetItem(self.d, key)             # <<<<<<<<<<<<<<
 *             self.matches = <object>obj
 *             self.i = 0
 */
      __pyx_t_3 = __pyx_v_self->__pyx_base.d;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_obj = PyDict_GetItem(__pyx_t_3, __pyx_v_key);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }

    /* "cytoolz/itertoolz.pyx":1538
 *                 key = self.rightkey()
 *                 obj = PyDict_GetItem(self.d, key)
 *             self.matches = <object>obj             # <<<<<<<<<<<<<<
 *             self.i = 0
 *         match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 */
    if (!(likely(PyList_CheckExact(((PyObject *)__pyx_v_obj)))||((((PyObject *)__pyx_v_obj)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(((PyObject *)__pyx_v_obj))->tp_name), 0))) __PYX_ERR(0, 1538, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_v_obj);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->__pyx_base.matches);
    __Pyx_DECREF(__pyx_v_self->__pyx_base.matches);
    __pyx_v_self->__pyx_base.matches = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytoolz/itertoolz.pyx":1539
 *                 obj = PyDict_GetItem(self.d, key)
 *             self.matches = <object>obj
 *             self.i = 0             # <<<<<<<<<<<<<<
 *         match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *         self.i += 1
 */
    __pyx_v_self->__pyx_base.i = 0;

    /* "cytoolz/itertoolz.pyx":1533
 *     def __next__(self):
 *         cdef PyObject *obj = NULL
 *         if self.i == PyList_GET_SIZE(self.matches):             # <<<<<<<<<<<<<<
 *             while obj is NULL:
 *                 self.right = next(self.rightseq)
 */
  }

  /* "cytoolz/itertoolz.pyx":1540
 *             self.matches = <object>obj
 *             self.i = 0
 *         match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking             # <<<<<<<<<<<<<<
 *         self.i += 1
 *         return (match, self.right)
 */
  __pyx_t_3 = __pyx_v_self->__pyx_base.matches;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_v_self->__pyx_base.i);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = ((PyObject *)__pyx_t_4);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_match = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytoolz/itertoolz.pyx":1541
 *             self.i = 0
 *         match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *         self.i += 1             # <<<<<<<<<<<<<<
 *         return (match, self.right)
 * 
 */
  __pyx_v_self->__pyx_base.i = (__pyx_v_self->__pyx_base.i + 1);

  /* "cytoolz/itertoolz.pyx":1542
 *         match = <object>PyList_GET_ITEM(self.matches, self.i)  # skip error checking
 *         self.i += 1
 *         return (match, self.right)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_match);
  __Pyx_GIVEREF(__pyx_v_match);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_match);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.right);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.right);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.right);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1531
 * 
 * cdef class _inner_join(_join):
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef PyObject *obj = NULL
 *         if self.i == PyList_GET_SIZE(self.matches):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_inner_join_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_11_inner_join_2__reduce_cython__[] = "_inner_join.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_11_inner_join_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_inner_join_3__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_11_inner_join_2__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_inner_join_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_inner_join_2__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__inner_join *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_inner_join_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_inner_join_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_11_inner_join_4__setstate_cython__[] = "_inner_join.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_11_inner_join_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_inner_join_5__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_11_inner_join_4__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_11_inner_join_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_11_inner_join_4__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__inner_join *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_11_inner_join_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1546
 * 
 * cdef class _inner_join_key(_inner_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self._rightkey(self.right)
 * 
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_15_inner_join_key_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key *__pyx_v_self) {
  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("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1547
 * cdef class _inner_join_key(_inner_join):
 *     cdef object rightkey(self):
 *         return self._rightkey(self.right)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base._rightkey);
  __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base._rightkey; __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_self->__pyx_base.__pyx_base.right) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__pyx_base.__pyx_base.right);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __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;

  /* "cytoolz/itertoolz.pyx":1546
 * 
 * cdef class _inner_join_key(_inner_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self._rightkey(self.right)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join_key.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_15_inner_join_key_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_15_inner_join_key___reduce_cython__[] = "_inner_join_key.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_15_inner_join_key_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_15_inner_join_key_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_15_inner_join_key___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_15_inner_join_key_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_15_inner_join_key___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_15_inner_join_key___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join_key.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_15_inner_join_key_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_15_inner_join_key_2__setstate_cython__[] = "_inner_join_key.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_15_inner_join_key_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_15_inner_join_key_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_15_inner_join_key_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_15_inner_join_key_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_15_inner_join_key_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_15_inner_join_key_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join_key.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1551
 * 
 * cdef class _inner_join_index(_inner_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self.right[self._rightkey]
 * 
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_17_inner_join_index_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index *__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("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1552
 * cdef class _inner_join_index(_inner_join):
 *     cdef object rightkey(self):
 *         return self.right[self._rightkey]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.__pyx_base.right, __pyx_v_self->__pyx_base.__pyx_base._rightkey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1551
 * 
 * cdef class _inner_join_index(_inner_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         return self.right[self._rightkey]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join_index.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_inner_join_index_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_17_inner_join_index___reduce_cython__[] = "_inner_join_index.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_17_inner_join_index_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_inner_join_index_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_17_inner_join_index___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_inner_join_index_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_inner_join_index___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_inner_join_index___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join_index.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_inner_join_index_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_17_inner_join_index_2__setstate_cython__[] = "_inner_join_index.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_17_inner_join_index_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_inner_join_index_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_17_inner_join_index_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_17_inner_join_index_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_17_inner_join_index_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_17_inner_join_index_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join_index.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1556
 * 
 * cdef class _inner_join_indices(_inner_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_19_inner_join_indices_rightkey(struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices *__pyx_v_self) {
  PyObject *__pyx_v_keyval = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rightkey", 0);

  /* "cytoolz/itertoolz.pyx":1557
 * cdef class _inner_join_indices(_inner_join):
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)             # <<<<<<<<<<<<<<
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_self->__pyx_base.__pyx_base.N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_keyval = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1558
 *     cdef object rightkey(self):
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):             # <<<<<<<<<<<<<<
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]
 */
  __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base.N;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cytoolz/itertoolz.pyx":1559
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)             # <<<<<<<<<<<<<<
 *             val = self.right[val]
 *             Py_INCREF(val)
 */
    __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base._rightkey;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_v_i);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_t_5);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":1560
 *         for i in range(self.N):
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]             # <<<<<<<<<<<<<<
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.__pyx_base.right, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":1561
 *             val = <object>PyList_GET_ITEM(self._rightkey, i)
 *             val = self.right[val]
 *             Py_INCREF(val)             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(keyval, i, val)
 *         return keyval
 */
    Py_INCREF(__pyx_v_val);

    /* "cytoolz/itertoolz.pyx":1562
 *             val = self.right[val]
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)             # <<<<<<<<<<<<<<
 *         return keyval
 * 
 */
    PyTuple_SET_ITEM(__pyx_v_keyval, __pyx_v_i, __pyx_v_val);
  }

  /* "cytoolz/itertoolz.pyx":1563
 *             Py_INCREF(val)
 *             PyTuple_SET_ITEM(keyval, i, val)
 *         return keyval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_keyval);
  __pyx_r = __pyx_v_keyval;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1556
 * 
 * cdef class _inner_join_indices(_inner_join):
 *     cdef object rightkey(self):             # <<<<<<<<<<<<<<
 *         keyval = PyTuple_New(self.N)
 *         for i in range(self.N):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join_indices.rightkey", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_keyval);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_inner_join_indices_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_19_inner_join_indices___reduce_cython__[] = "_inner_join_indices.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_19_inner_join_indices_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_inner_join_indices_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_19_inner_join_indices___reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_inner_join_indices_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_19_inner_join_indices___reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_inner_join_indices___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join_indices.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_inner_join_indices_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_19_inner_join_indices_2__setstate_cython__[] = "_inner_join_indices.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_19_inner_join_indices_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_inner_join_indices_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_19_inner_join_indices_2__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_19_inner_join_indices_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_19_inner_join_indices_2__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_19_inner_join_indices_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._inner_join_indices.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1567
 * 
 * cdef class _diff_key:
 *     def __cinit__(self, object seqs, object key, object default=no_default):             # <<<<<<<<<<<<<<
 *         self.N = len(seqs)
 *         if self.N < 2:
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_9_diff_key_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_9_diff_key_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seqs = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_default = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seqs,&__pyx_n_s_key,&__pyx_n_s_default,0};
    PyObject* values[3] = {0,0,0};
    values[2] = __pyx_k__73;
    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_seqs)) != 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_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 1567, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1567, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_seqs = values[0];
    __pyx_v_key = values[1];
    __pyx_v_default = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1567, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._diff_key.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_9_diff_key___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__diff_key *)__pyx_v_self), __pyx_v_seqs, __pyx_v_key, __pyx_v_default);

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

static int __pyx_pf_7cytoolz_9itertoolz_9_diff_key___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__diff_key *__pyx_v_self, PyObject *__pyx_v_seqs, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":1568
 * cdef class _diff_key:
 *     def __cinit__(self, object seqs, object key, object default=no_default):
 *         self.N = len(seqs)             # <<<<<<<<<<<<<<
 *         if self.N < 2:
 *             raise TypeError('Too few sequences given (min 2 required)')
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_seqs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1568, __pyx_L1_error)
  __pyx_v_self->N = __pyx_t_1;

  /* "cytoolz/itertoolz.pyx":1569
 *     def __cinit__(self, object seqs, object key, object default=no_default):
 *         self.N = len(seqs)
 *         if self.N < 2:             # <<<<<<<<<<<<<<
 *             raise TypeError('Too few sequences given (min 2 required)')
 *         if default == no_default:
 */
  __pyx_t_2 = ((__pyx_v_self->N < 2) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cytoolz/itertoolz.pyx":1570
 *         self.N = len(seqs)
 *         if self.N < 2:
 *             raise TypeError('Too few sequences given (min 2 required)')             # <<<<<<<<<<<<<<
 *         if default == no_default:
 *             self.iters = zip(*seqs)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1570, __pyx_L1_error)

    /* "cytoolz/itertoolz.pyx":1569
 *     def __cinit__(self, object seqs, object key, object default=no_default):
 *         self.N = len(seqs)
 *         if self.N < 2:             # <<<<<<<<<<<<<<
 *             raise TypeError('Too few sequences given (min 2 required)')
 *         if default == no_default:
 */
  }

  /* "cytoolz/itertoolz.pyx":1571
 *         if self.N < 2:
 *             raise TypeError('Too few sequences given (min 2 required)')
 *         if default == no_default:             # <<<<<<<<<<<<<<
 *             self.iters = zip(*seqs)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_no_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_default, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1572
 *             raise TypeError('Too few sequences given (min 2 required)')
 *         if default == no_default:
 *             self.iters = zip(*seqs)             # <<<<<<<<<<<<<<
 *         else:
 *             self.iters = zip_longest(*seqs, fillvalue=default)
 */
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_seqs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->iters);
    __Pyx_DECREF(__pyx_v_self->iters);
    __pyx_v_self->iters = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cytoolz/itertoolz.pyx":1571
 *         if self.N < 2:
 *             raise TypeError('Too few sequences given (min 2 required)')
 *         if default == no_default:             # <<<<<<<<<<<<<<
 *             self.iters = zip(*seqs)
 *         else:
 */
    goto __pyx_L4;
  }

  /* "cytoolz/itertoolz.pyx":1574
 *             self.iters = zip(*seqs)
 *         else:
 *             self.iters = zip_longest(*seqs, fillvalue=default)             # <<<<<<<<<<<<<<
 *         self.key = key
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_zip_longest); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_seqs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fillvalue, __pyx_v_default) < 0) __PYX_ERR(0, 1574, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1574, __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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_self->iters);
    __Pyx_DECREF(__pyx_v_self->iters);
    __pyx_v_self->iters = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L4:;

  /* "cytoolz/itertoolz.pyx":1575
 *         else:
 *             self.iters = zip_longest(*seqs, fillvalue=default)
 *         self.key = key             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_INCREF(__pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __Pyx_GOTREF(__pyx_v_self->key);
  __Pyx_DECREF(__pyx_v_self->key);
  __pyx_v_self->key = __pyx_v_key;

  /* "cytoolz/itertoolz.pyx":1567
 * 
 * cdef class _diff_key:
 *     def __cinit__(self, object seqs, object key, object default=no_default):             # <<<<<<<<<<<<<<
 *         self.N = len(seqs)
 *         if self.N < 2:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytoolz.itertoolz._diff_key.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1577
 *         self.key = key
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9_diff_key_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9_diff_key_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_9_diff_key_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__diff_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_9_diff_key_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__diff_key *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":1578
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1577
 *         self.key = key
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":1580
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef object val, val2, items
 *         cdef Py_ssize_t i
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9_diff_key_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9_diff_key_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_9_diff_key_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz__diff_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_9_diff_key_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__diff_key *__pyx_v_self) {
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_val2 = 0;
  PyObject *__pyx_v_items = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1583
 *         cdef object val, val2, items
 *         cdef Py_ssize_t i
 *         while True:             # <<<<<<<<<<<<<<
 *             items = next(self.iters)
 *             val = self.key(<object>PyTuple_GET_ITEM(items, 0))
 */
  while (1) {

    /* "cytoolz/itertoolz.pyx":1584
 *         cdef Py_ssize_t i
 *         while True:
 *             items = next(self.iters)             # <<<<<<<<<<<<<<
 *             val = self.key(<object>PyTuple_GET_ITEM(items, 0))
 *             for i in range(1, self.N):
 */
    __pyx_t_1 = __pyx_v_self->iters;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_items, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":1585
 *         while True:
 *             items = next(self.iters)
 *             val = self.key(<object>PyTuple_GET_ITEM(items, 0))             # <<<<<<<<<<<<<<
 *             for i in range(1, self.N):
 *                 val2 = self.key(<object>PyTuple_GET_ITEM(items, i))
 */
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_items, 0);
    __Pyx_INCREF(__pyx_v_self->key);
    __pyx_t_1 = __pyx_v_self->key; __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, ((PyObject *)__pyx_t_3)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_3));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":1586
 *             items = next(self.iters)
 *             val = self.key(<object>PyTuple_GET_ITEM(items, 0))
 *             for i in range(1, self.N):             # <<<<<<<<<<<<<<
 *                 val2 = self.key(<object>PyTuple_GET_ITEM(items, i))
 *                 if PyObject_RichCompareBool(val, val2, Py_NE):
 */
    __pyx_t_5 = __pyx_v_self->N;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 1; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "cytoolz/itertoolz.pyx":1587
 *             val = self.key(<object>PyTuple_GET_ITEM(items, 0))
 *             for i in range(1, self.N):
 *                 val2 = self.key(<object>PyTuple_GET_ITEM(items, i))             # <<<<<<<<<<<<<<
 *                 if PyObject_RichCompareBool(val, val2, Py_NE):
 *                     return items
 */
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_items, __pyx_v_i);
      __Pyx_INCREF(__pyx_v_self->key);
      __pyx_t_1 = __pyx_v_self->key; __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, ((PyObject *)__pyx_t_3)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_3));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val2, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytoolz/itertoolz.pyx":1588
 *             for i in range(1, self.N):
 *                 val2 = self.key(<object>PyTuple_GET_ITEM(items, i))
 *                 if PyObject_RichCompareBool(val, val2, Py_NE):             # <<<<<<<<<<<<<<
 *                     return items
 * 
 */
      __pyx_t_8 = PyObject_RichCompareBool(__pyx_v_val, __pyx_v_val2, Py_NE); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1588, __pyx_L1_error)
      __pyx_t_9 = (__pyx_t_8 != 0);
      if (__pyx_t_9) {

        /* "cytoolz/itertoolz.pyx":1589
 *                 val2 = self.key(<object>PyTuple_GET_ITEM(items, i))
 *                 if PyObject_RichCompareBool(val, val2, Py_NE):
 *                     return items             # <<<<<<<<<<<<<<
 * 
 * cdef class _diff_identity:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_items);
        __pyx_r = __pyx_v_items;
        goto __pyx_L0;

        /* "cytoolz/itertoolz.pyx":1588
 *             for i in range(1, self.N):
 *                 val2 = self.key(<object>PyTuple_GET_ITEM(items, i))
 *                 if PyObject_RichCompareBool(val, val2, Py_NE):             # <<<<<<<<<<<<<<
 *                     return items
 * 
 */
      }
    }
  }

  /* "cytoolz/itertoolz.pyx":1580
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef object val, val2, items
 *         cdef Py_ssize_t i
 */

  /* 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_AddTraceback("cytoolz.itertoolz._diff_key.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_val2);
  __Pyx_XDECREF(__pyx_v_items);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9_diff_key_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_9_diff_key_6__reduce_cython__[] = "_diff_key.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_9_diff_key_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_9_diff_key_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_9_diff_key_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9_diff_key_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_9_diff_key_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__diff_key *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_9_diff_key_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__diff_key *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._diff_key.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9_diff_key_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_9_diff_key_8__setstate_cython__[] = "_diff_key.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_9_diff_key_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_9_diff_key_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_9_diff_key_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_9_diff_key_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_9_diff_key_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__diff_key *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_9_diff_key_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__diff_key *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._diff_key.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1592
 * 
 * cdef class _diff_identity:
 *     def __cinit__(self, object seqs, object default=no_default):             # <<<<<<<<<<<<<<
 *         self.N = len(seqs)
 *         if self.N < 2:
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_14_diff_identity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_14_diff_identity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seqs = 0;
  PyObject *__pyx_v_default = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seqs,&__pyx_n_s_default,0};
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k__77;
    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_seqs)) != 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_default);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1592, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_seqs = values[0];
    __pyx_v_default = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1592, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz._diff_identity.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14_diff_identity___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *)__pyx_v_self), __pyx_v_seqs, __pyx_v_default);

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

static int __pyx_pf_7cytoolz_9itertoolz_14_diff_identity___cinit__(struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *__pyx_v_self, PyObject *__pyx_v_seqs, PyObject *__pyx_v_default) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cytoolz/itertoolz.pyx":1593
 * cdef class _diff_identity:
 *     def __cinit__(self, object seqs, object default=no_default):
 *         self.N = len(seqs)             # <<<<<<<<<<<<<<
 *         if self.N < 2:
 *             raise TypeError('Too few sequences given (min 2 required)')
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_seqs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1593, __pyx_L1_error)
  __pyx_v_self->N = __pyx_t_1;

  /* "cytoolz/itertoolz.pyx":1594
 *     def __cinit__(self, object seqs, object default=no_default):
 *         self.N = len(seqs)
 *         if self.N < 2:             # <<<<<<<<<<<<<<
 *             raise TypeError('Too few sequences given (min 2 required)')
 *         if default == no_default:
 */
  __pyx_t_2 = ((__pyx_v_self->N < 2) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cytoolz/itertoolz.pyx":1595
 *         self.N = len(seqs)
 *         if self.N < 2:
 *             raise TypeError('Too few sequences given (min 2 required)')             # <<<<<<<<<<<<<<
 *         if default == no_default:
 *             self.iters = zip(*seqs)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1595, __pyx_L1_error)

    /* "cytoolz/itertoolz.pyx":1594
 *     def __cinit__(self, object seqs, object default=no_default):
 *         self.N = len(seqs)
 *         if self.N < 2:             # <<<<<<<<<<<<<<
 *             raise TypeError('Too few sequences given (min 2 required)')
 *         if default == no_default:
 */
  }

  /* "cytoolz/itertoolz.pyx":1596
 *         if self.N < 2:
 *             raise TypeError('Too few sequences given (min 2 required)')
 *         if default == no_default:             # <<<<<<<<<<<<<<
 *             self.iters = zip(*seqs)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_no_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_default, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1597
 *             raise TypeError('Too few sequences given (min 2 required)')
 *         if default == no_default:
 *             self.iters = zip(*seqs)             # <<<<<<<<<<<<<<
 *         else:
 *             self.iters = zip_longest(*seqs, fillvalue=default)
 */
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_seqs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->iters);
    __Pyx_DECREF(__pyx_v_self->iters);
    __pyx_v_self->iters = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cytoolz/itertoolz.pyx":1596
 *         if self.N < 2:
 *             raise TypeError('Too few sequences given (min 2 required)')
 *         if default == no_default:             # <<<<<<<<<<<<<<
 *             self.iters = zip(*seqs)
 *         else:
 */
    goto __pyx_L4;
  }

  /* "cytoolz/itertoolz.pyx":1599
 *             self.iters = zip(*seqs)
 *         else:
 *             self.iters = zip_longest(*seqs, fillvalue=default)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_zip_longest); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_seqs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fillvalue, __pyx_v_default) < 0) __PYX_ERR(0, 1599, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1599, __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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_self->iters);
    __Pyx_DECREF(__pyx_v_self->iters);
    __pyx_v_self->iters = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L4:;

  /* "cytoolz/itertoolz.pyx":1592
 * 
 * cdef class _diff_identity:
 *     def __cinit__(self, object seqs, object default=no_default):             # <<<<<<<<<<<<<<
 *         self.N = len(seqs)
 *         if self.N < 2:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytoolz.itertoolz._diff_identity.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1601
 *             self.iters = zip_longest(*seqs, fillvalue=default)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14_diff_identity_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_14_diff_identity_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":1602
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1601
 *             self.iters = zip_longest(*seqs, fillvalue=default)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":1604
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef object val, val2, items
 *         cdef Py_ssize_t i
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14_diff_identity_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_14_diff_identity_4__next__(struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *__pyx_v_self) {
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_val2 = 0;
  PyObject *__pyx_v_items = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1607
 *         cdef object val, val2, items
 *         cdef Py_ssize_t i
 *         while True:             # <<<<<<<<<<<<<<
 *             items = next(self.iters)
 *             val = <object>PyTuple_GET_ITEM(items, 0)
 */
  while (1) {

    /* "cytoolz/itertoolz.pyx":1608
 *         cdef Py_ssize_t i
 *         while True:
 *             items = next(self.iters)             # <<<<<<<<<<<<<<
 *             val = <object>PyTuple_GET_ITEM(items, 0)
 *             for i in range(1, self.N):
 */
    __pyx_t_1 = __pyx_v_self->iters;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_items, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":1609
 *         while True:
 *             items = next(self.iters)
 *             val = <object>PyTuple_GET_ITEM(items, 0)             # <<<<<<<<<<<<<<
 *             for i in range(1, self.N):
 *                 val2 = <object>PyTuple_GET_ITEM(items, i)
 */
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_items, 0);
    __pyx_t_2 = ((PyObject *)__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytoolz/itertoolz.pyx":1610
 *             items = next(self.iters)
 *             val = <object>PyTuple_GET_ITEM(items, 0)
 *             for i in range(1, self.N):             # <<<<<<<<<<<<<<
 *                 val2 = <object>PyTuple_GET_ITEM(items, i)
 *                 if PyObject_RichCompareBool(val, val2, Py_NE):
 */
    __pyx_t_4 = __pyx_v_self->N;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "cytoolz/itertoolz.pyx":1611
 *             val = <object>PyTuple_GET_ITEM(items, 0)
 *             for i in range(1, self.N):
 *                 val2 = <object>PyTuple_GET_ITEM(items, i)             # <<<<<<<<<<<<<<
 *                 if PyObject_RichCompareBool(val, val2, Py_NE):
 *                     return items
 */
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_items, __pyx_v_i);
      __pyx_t_2 = ((PyObject *)__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_val2, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cytoolz/itertoolz.pyx":1612
 *             for i in range(1, self.N):
 *                 val2 = <object>PyTuple_GET_ITEM(items, i)
 *                 if PyObject_RichCompareBool(val, val2, Py_NE):             # <<<<<<<<<<<<<<
 *                     return items
 * 
 */
      __pyx_t_7 = PyObject_RichCompareBool(__pyx_v_val, __pyx_v_val2, Py_NE); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1612, __pyx_L1_error)
      __pyx_t_8 = (__pyx_t_7 != 0);
      if (__pyx_t_8) {

        /* "cytoolz/itertoolz.pyx":1613
 *                 val2 = <object>PyTuple_GET_ITEM(items, i)
 *                 if PyObject_RichCompareBool(val, val2, Py_NE):
 *                     return items             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_items);
        __pyx_r = __pyx_v_items;
        goto __pyx_L0;

        /* "cytoolz/itertoolz.pyx":1612
 *             for i in range(1, self.N):
 *                 val2 = <object>PyTuple_GET_ITEM(items, i)
 *                 if PyObject_RichCompareBool(val, val2, Py_NE):             # <<<<<<<<<<<<<<
 *                     return items
 * 
 */
      }
    }
  }

  /* "cytoolz/itertoolz.pyx":1604
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef object val, val2, items
 *         cdef Py_ssize_t i
 */

  /* 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_AddTraceback("cytoolz.itertoolz._diff_identity.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_val2);
  __Pyx_XDECREF(__pyx_v_items);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_14_diff_identity_6__reduce_cython__[] = "_diff_identity.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_14_diff_identity_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_14_diff_identity_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14_diff_identity_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_14_diff_identity_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._diff_identity.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_14_diff_identity_8__setstate_cython__[] = "_diff_identity.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_14_diff_identity_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_14_diff_identity_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_14_diff_identity_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_14_diff_identity_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz._diff_identity.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1616
 * 
 * 
 * cdef object c_diff(object seqs, object default=no_default, object key=None):             # <<<<<<<<<<<<<<
 *     if key is None:
 *         return _diff_identity(seqs, default=default)
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz_c_diff(PyObject *__pyx_v_seqs, struct __pyx_opt_args_7cytoolz_9itertoolz_c_diff *__pyx_optional_args) {
  PyObject *__pyx_v_default = __pyx_k__80;
  PyObject *__pyx_v_key = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("c_diff", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default = __pyx_optional_args->__pyx_default;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_key = __pyx_optional_args->key;
      }
    }
  }

  /* "cytoolz/itertoolz.pyx":1617
 * 
 * cdef object c_diff(object seqs, object default=no_default, object key=None):
 *     if key is None:             # <<<<<<<<<<<<<<
 *         return _diff_identity(seqs, default=default)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_key == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1618
 * cdef object c_diff(object seqs, object default=no_default, object key=None):
 *     if key is None:
 *         return _diff_identity(seqs, default=default)             # <<<<<<<<<<<<<<
 *     else:
 *         return _diff_key(seqs, key, default=default)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_seqs);
    __Pyx_GIVEREF(__pyx_v_seqs);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_seqs);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 1618, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__diff_identity), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1618, __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_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":1617
 * 
 * cdef object c_diff(object seqs, object default=no_default, object key=None):
 *     if key is None:             # <<<<<<<<<<<<<<
 *         return _diff_identity(seqs, default=default)
 *     else:
 */
  }

  /* "cytoolz/itertoolz.pyx":1620
 *         return _diff_identity(seqs, default=default)
 *     else:
 *         return _diff_key(seqs, key, default=default)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_seqs);
    __Pyx_GIVEREF(__pyx_v_seqs);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_seqs);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_key);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 1620, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__diff_key), __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1620, __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;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "cytoolz/itertoolz.pyx":1616
 * 
 * 
 * cdef object c_diff(object seqs, object default=no_default, object key=None):             # <<<<<<<<<<<<<<
 *     if key is None:
 *         return _diff_identity(seqs, default=default)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytoolz.itertoolz.c_diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1623
 * 
 * 
 * def diff(*seqs, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Return those items that differ between sequences
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_55diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_54diff[] = "diff(*seqs, **kwargs)\n\n    Return those items that differ between sequences\n\n    >>> list(diff([1, 2, 3], [1, 2, 10, 100]))\n    [(3, 10)]\n\n    Shorter sequences may be padded with a ``default`` value:\n\n    >>> list(diff([1, 2, 3], [1, 2, 10, 100], default=None))\n    [(3, 10), (None, 100)]\n\n    A ``key`` function may also be applied to each item to use during\n    comparisons:\n\n    >>> list(diff(['apples', 'bananas'], ['Apples', 'Oranges'], key=str.lower))\n    [('bananas', 'Oranges')]\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_55diff = {"diff", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_55diff, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_54diff};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_55diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_seqs = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("diff (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "diff", 1))) return NULL;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_seqs = __pyx_args;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_54diff(__pyx_self, __pyx_v_seqs, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_54diff(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seqs, PyObject *__pyx_v_kwargs) {
  Py_ssize_t __pyx_v_N;
  PyObject *__pyx_v_default = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_7cytoolz_9itertoolz_c_diff __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("diff", 0);
  __Pyx_INCREF(__pyx_v_seqs);

  /* "cytoolz/itertoolz.pyx":1641
 *     [('bananas', 'Oranges')]
 *     """
 *     N = len(seqs)             # <<<<<<<<<<<<<<
 *     if N == 1 and isinstance(seqs[0], list):
 *         seqs = seqs[0]
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_seqs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1641, __pyx_L1_error)
  __pyx_v_N = __pyx_t_1;

  /* "cytoolz/itertoolz.pyx":1642
 *     """
 *     N = len(seqs)
 *     if N == 1 and isinstance(seqs[0], list):             # <<<<<<<<<<<<<<
 *         seqs = seqs[0]
 *     default = kwargs.get('default', no_default)
 */
  __pyx_t_3 = ((__pyx_v_N == 1) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_seqs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyList_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = (__pyx_t_3 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1643
 *     N = len(seqs)
 *     if N == 1 and isinstance(seqs[0], list):
 *         seqs = seqs[0]             # <<<<<<<<<<<<<<
 *     default = kwargs.get('default', no_default)
 *     key = kwargs.get('key')
 */
    __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_seqs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_seqs, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytoolz/itertoolz.pyx":1642
 *     """
 *     N = len(seqs)
 *     if N == 1 and isinstance(seqs[0], list):             # <<<<<<<<<<<<<<
 *         seqs = seqs[0]
 *     default = kwargs.get('default', no_default)
 */
  }

  /* "cytoolz/itertoolz.pyx":1644
 *     if N == 1 and isinstance(seqs[0], list):
 *         seqs = seqs[0]
 *     default = kwargs.get('default', no_default)             # <<<<<<<<<<<<<<
 *     key = kwargs.get('key')
 *     return c_diff(seqs, default=default, key=key)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_no_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_u_default, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_default = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cytoolz/itertoolz.pyx":1645
 *         seqs = seqs[0]
 *     default = kwargs.get('default', no_default)
 *     key = kwargs.get('key')             # <<<<<<<<<<<<<<
 *     return c_diff(seqs, default=default, key=key)
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_u_key, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_key = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cytoolz/itertoolz.pyx":1646
 *     default = kwargs.get('default', no_default)
 *     key = kwargs.get('key')
 *     return c_diff(seqs, default=default, key=key)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7.__pyx_n = 2;
  __pyx_t_7.__pyx_default = __pyx_v_default;
  __pyx_t_7.key = __pyx_v_key;
  __pyx_t_6 = __pyx_f_7cytoolz_9itertoolz_c_diff(__pyx_v_seqs, &__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1623
 * 
 * 
 * def diff(*seqs, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Return those items that differ between sequences
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytoolz.itertoolz.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_seqs);
  __Pyx_XDECREF(__pyx_v_default);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1649
 * 
 * 
 * cpdef object topk(Py_ssize_t k, object seq, object key=None):             # <<<<<<<<<<<<<<
 *     """
 *     Find the k largest elements of a sequence
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_57topk(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_topk(Py_ssize_t __pyx_v_k, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_topk *__pyx_optional_args) {
  PyObject *__pyx_v_key = ((PyObject *)Py_None);
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_top = 0;
  PyObject *__pyx_v_it = 0;
  PyObject *__pyx_v__heapreplace = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_pq = 0;
  PyObject *__pyx_8genexpr1__pyx_v_item = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  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("topk", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_key = __pyx_optional_args->key;
    }
  }
  __Pyx_INCREF(__pyx_v_key);

  /* "cytoolz/itertoolz.pyx":1667
 *     """
 *     cdef object item, val, top
 *     cdef object it = iter(seq)             # <<<<<<<<<<<<<<
 *     cdef object _heapreplace = heapreplace
 *     cdef Py_ssize_t i = k
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_it = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1668
 *     cdef object item, val, top
 *     cdef object it = iter(seq)
 *     cdef object _heapreplace = heapreplace             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = k
 *     cdef list pq = []
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_heapreplace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__heapreplace = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1669
 *     cdef object it = iter(seq)
 *     cdef object _heapreplace = heapreplace
 *     cdef Py_ssize_t i = k             # <<<<<<<<<<<<<<
 *     cdef list pq = []
 * 
 */
  __pyx_v_i = __pyx_v_k;

  /* "cytoolz/itertoolz.pyx":1670
 *     cdef object _heapreplace = heapreplace
 *     cdef Py_ssize_t i = k
 *     cdef list pq = []             # <<<<<<<<<<<<<<
 * 
 *     if key is not None and not callable(key):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pq = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1672
 *     cdef list pq = []
 * 
 *     if key is not None and not callable(key):             # <<<<<<<<<<<<<<
 *         key = getter(key)
 * 
 */
  __pyx_t_3 = (__pyx_v_key != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyCallable_Check(__pyx_v_key); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1672, __pyx_L1_error)
  __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1673
 * 
 *     if key is not None and not callable(key):
 *         key = getter(key)             # <<<<<<<<<<<<<<
 * 
 *     if k < 2:
 */
    __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_getter(__pyx_v_key, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytoolz/itertoolz.pyx":1672
 *     cdef list pq = []
 * 
 *     if key is not None and not callable(key):             # <<<<<<<<<<<<<<
 *         key = getter(key)
 * 
 */
  }

  /* "cytoolz/itertoolz.pyx":1675
 *         key = getter(key)
 * 
 *     if k < 2:             # <<<<<<<<<<<<<<
 *         if k < 1:
 *             return ()
 */
  __pyx_t_2 = ((__pyx_v_k < 2) != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1676
 * 
 *     if k < 2:
 *         if k < 1:             # <<<<<<<<<<<<<<
 *             return ()
 *         top = list(take(1, it))
 */
    __pyx_t_2 = ((__pyx_v_k < 1) != 0);
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":1677
 *     if k < 2:
 *         if k < 1:
 *             return ()             # <<<<<<<<<<<<<<
 *         top = list(take(1, it))
 *         if len(top) == 0:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_empty_tuple);
      __pyx_r = __pyx_empty_tuple;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1676
 * 
 *     if k < 2:
 *         if k < 1:             # <<<<<<<<<<<<<<
 *             return ()
 *         top = list(take(1, it))
 */
    }

    /* "cytoolz/itertoolz.pyx":1678
 *         if k < 1:
 *             return ()
 *         top = list(take(1, it))             # <<<<<<<<<<<<<<
 *         if len(top) == 0:
 *             return ()
 */
    __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_take(1, __pyx_v_it, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_top = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cytoolz/itertoolz.pyx":1679
 *             return ()
 *         top = list(take(1, it))
 *         if len(top) == 0:             # <<<<<<<<<<<<<<
 *             return ()
 *         it = concatv(top, it)
 */
    __pyx_t_6 = PyObject_Length(__pyx_v_top); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1679, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_t_6 == 0) != 0);
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":1680
 *         top = list(take(1, it))
 *         if len(top) == 0:
 *             return ()             # <<<<<<<<<<<<<<
 *         it = concatv(top, it)
 *         if key is None:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_empty_tuple);
      __pyx_r = __pyx_empty_tuple;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1679
 *             return ()
 *         top = list(take(1, it))
 *         if len(top) == 0:             # <<<<<<<<<<<<<<
 *             return ()
 *         it = concatv(top, it)
 */
    }

    /* "cytoolz/itertoolz.pyx":1681
 *         if len(top) == 0:
 *             return ()
 *         it = concatv(top, it)             # <<<<<<<<<<<<<<
 *         if key is None:
 *             return (max(it),)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_concatv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_top, __pyx_v_it};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_top, __pyx_v_it};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_top);
      __Pyx_GIVEREF(__pyx_v_top);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_top);
      __Pyx_INCREF(__pyx_v_it);
      __Pyx_GIVEREF(__pyx_v_it);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_it);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_it, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytoolz/itertoolz.pyx":1682
 *             return ()
 *         it = concatv(top, it)
 *         if key is None:             # <<<<<<<<<<<<<<
 *             return (max(it),)
 *         else:
 */
    __pyx_t_2 = (__pyx_v_key == Py_None);
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "cytoolz/itertoolz.pyx":1683
 *         it = concatv(top, it)
 *         if key is None:
 *             return (max(it),)             # <<<<<<<<<<<<<<
 *         else:
 *             return (max(it, key=key),)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_v_it); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytoolz/itertoolz.pyx":1682
 *             return ()
 *         it = concatv(top, it)
 *         if key is None:             # <<<<<<<<<<<<<<
 *             return (max(it),)
 *         else:
 */
    }

    /* "cytoolz/itertoolz.pyx":1685
 *             return (max(it),)
 *         else:
 *             return (max(it, key=key),)             # <<<<<<<<<<<<<<
 * 
 *     for item in it:
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_it);
      __Pyx_GIVEREF(__pyx_v_it);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_it);
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_key, __pyx_v_key) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }

    /* "cytoolz/itertoolz.pyx":1675
 *         key = getter(key)
 * 
 *     if k < 2:             # <<<<<<<<<<<<<<
 *         if k < 1:
 *             return ()
 */
  }

  /* "cytoolz/itertoolz.pyx":1687
 *             return (max(it, key=key),)
 * 
 *     for item in it:             # <<<<<<<<<<<<<<
 *         if key is None:
 *             PyList_Append(pq, (item, i))
 */
  if (likely(PyList_CheckExact(__pyx_v_it)) || PyTuple_CheckExact(__pyx_v_it)) {
    __pyx_t_5 = __pyx_v_it; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_it); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1687, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1687, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1687, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1687, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1687, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_10(__pyx_t_5);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1687, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "cytoolz/itertoolz.pyx":1688
 * 
 *     for item in it:
 *         if key is None:             # <<<<<<<<<<<<<<
 *             PyList_Append(pq, (item, i))
 *         else:
 */
    __pyx_t_3 = (__pyx_v_key == Py_None);
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":1689
 *     for item in it:
 *         if key is None:
 *             PyList_Append(pq, (item, i))             # <<<<<<<<<<<<<<
 *         else:
 *             PyList_Append(pq, (key(item), i, item))
 */
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1689, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1689, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_item);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_8 = PyList_Append(__pyx_v_pq, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1689, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytoolz/itertoolz.pyx":1688
 * 
 *     for item in it:
 *         if key is None:             # <<<<<<<<<<<<<<
 *             PyList_Append(pq, (item, i))
 *         else:
 */
      goto __pyx_L12;
    }

    /* "cytoolz/itertoolz.pyx":1691
 *             PyList_Append(pq, (item, i))
 *         else:
 *             PyList_Append(pq, (key(item), i, item))             # <<<<<<<<<<<<<<
 *         i -= 1
 *         if i == 0:
 */
    /*else*/ {
      __Pyx_INCREF(__pyx_v_key);
      __pyx_t_9 = __pyx_v_key; __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_7, __pyx_v_item) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_item);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9);
      __Pyx_INCREF(__pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_item);
      __pyx_t_1 = 0;
      __pyx_t_9 = 0;
      __pyx_t_8 = PyList_Append(__pyx_v_pq, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_L12:;

    /* "cytoolz/itertoolz.pyx":1692
 *         else:
 *             PyList_Append(pq, (key(item), i, item))
 *         i -= 1             # <<<<<<<<<<<<<<
 *         if i == 0:
 *             break
 */
    __pyx_v_i = (__pyx_v_i - 1);

    /* "cytoolz/itertoolz.pyx":1693
 *             PyList_Append(pq, (key(item), i, item))
 *         i -= 1
 *         if i == 0:             # <<<<<<<<<<<<<<
 *             break
 *     if i != 0:
 */
    __pyx_t_2 = ((__pyx_v_i == 0) != 0);
    if (__pyx_t_2) {

      /* "cytoolz/itertoolz.pyx":1694
 *         i -= 1
 *         if i == 0:
 *             break             # <<<<<<<<<<<<<<
 *     if i != 0:
 *         pq.sort(reverse=True)
 */
      goto __pyx_L11_break;

      /* "cytoolz/itertoolz.pyx":1693
 *             PyList_Append(pq, (key(item), i, item))
 *         i -= 1
 *         if i == 0:             # <<<<<<<<<<<<<<
 *             break
 *     if i != 0:
 */
    }

    /* "cytoolz/itertoolz.pyx":1687
 *             return (max(it, key=key),)
 * 
 *     for item in it:             # <<<<<<<<<<<<<<
 *         if key is None:
 *             PyList_Append(pq, (item, i))
 */
  }
  __pyx_L11_break:;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytoolz/itertoolz.pyx":1695
 *         if i == 0:
 *             break
 *     if i != 0:             # <<<<<<<<<<<<<<
 *         pq.sort(reverse=True)
 *         k = 0 if key is None else 2
 */
  __pyx_t_2 = ((__pyx_v_i != 0) != 0);
  if (__pyx_t_2) {

    /* "cytoolz/itertoolz.pyx":1696
 *             break
 *     if i != 0:
 *         pq.sort(reverse=True)             # <<<<<<<<<<<<<<
 *         k = 0 if key is None else 2
 *         return tuple([item[k] for item in pq])
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pq, __pyx_n_s_sort); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_reverse, Py_True) < 0) __PYX_ERR(0, 1696, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytoolz/itertoolz.pyx":1697
 *     if i != 0:
 *         pq.sort(reverse=True)
 *         k = 0 if key is None else 2             # <<<<<<<<<<<<<<
 *         return tuple([item[k] for item in pq])
 * 
 */
    __pyx_t_2 = (__pyx_v_key == Py_None);
    if ((__pyx_t_2 != 0)) {
      __pyx_t_6 = 0;
    } else {
      __pyx_t_6 = 2;
    }
    __pyx_v_k = __pyx_t_6;

    /* "cytoolz/itertoolz.pyx":1698
 *         pq.sort(reverse=True)
 *         k = 0 if key is None else 2
 *         return tuple([item[k] for item in pq])             # <<<<<<<<<<<<<<
 * 
 *     heapify(pq)
 */
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1698, __pyx_L17_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = __pyx_v_pq; __Pyx_INCREF(__pyx_t_7); __pyx_t_6 = 0;
      for (;;) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1698, __pyx_L17_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1698, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_item, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_8genexpr1__pyx_v_item, __pyx_v_k, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1698, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1698, __pyx_L17_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_item); __pyx_8genexpr1__pyx_v_item = 0;
      goto __pyx_L20_exit_scope;
      __pyx_L17_error:;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_item); __pyx_8genexpr1__pyx_v_item = 0;
      goto __pyx_L1_error;
      __pyx_L20_exit_scope:;
    } /* exit inner scope */
    __pyx_t_7 = PyList_AsTuple(((PyObject*)__pyx_t_9)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "cytoolz/itertoolz.pyx":1695
 *         if i == 0:
 *             break
 *     if i != 0:             # <<<<<<<<<<<<<<
 *         pq.sort(reverse=True)
 *         k = 0 if key is None else 2
 */
  }

  /* "cytoolz/itertoolz.pyx":1700
 *         return tuple([item[k] for item in pq])
 * 
 *     heapify(pq)             # <<<<<<<<<<<<<<
 *     top = pq[0][0]
 *     if key is None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_heapify); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_5, __pyx_v_pq) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_pq);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cytoolz/itertoolz.pyx":1701
 * 
 *     heapify(pq)
 *     top = pq[0][0]             # <<<<<<<<<<<<<<
 *     if key is None:
 *         for item in it:
 */
  __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_pq, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_top = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "cytoolz/itertoolz.pyx":1702
 *     heapify(pq)
 *     top = pq[0][0]
 *     if key is None:             # <<<<<<<<<<<<<<
 *         for item in it:
 *             if top < item:
 */
  __pyx_t_2 = (__pyx_v_key == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "cytoolz/itertoolz.pyx":1703
 *     top = pq[0][0]
 *     if key is None:
 *         for item in it:             # <<<<<<<<<<<<<<
 *             if top < item:
 *                 _heapreplace(pq, (item, i))
 */
    if (likely(PyList_CheckExact(__pyx_v_it)) || PyTuple_CheckExact(__pyx_v_it)) {
      __pyx_t_9 = __pyx_v_it; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_it); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1703, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1703, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1703, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1703, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1703, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1703, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_10(__pyx_t_9);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1703, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "cytoolz/itertoolz.pyx":1704
 *     if key is None:
 *         for item in it:
 *             if top < item:             # <<<<<<<<<<<<<<
 *                 _heapreplace(pq, (item, i))
 *                 top = pq[0][0]
 */
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_top, __pyx_v_item, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1704, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1704, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_3) {

        /* "cytoolz/itertoolz.pyx":1705
 *         for item in it:
 *             if top < item:
 *                 _heapreplace(pq, (item, i))             # <<<<<<<<<<<<<<
 *                 top = pq[0][0]
 *                 i -= 1
 */
        __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1705, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_item);
        __Pyx_GIVEREF(__pyx_v_item);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_item);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_v__heapreplace);
        __pyx_t_5 = __pyx_v__heapreplace; __pyx_t_11 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_11);
            __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_11, __pyx_v_pq, __pyx_t_1};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1705, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_pq, __pyx_t_1};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1705, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1705, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
          }
          __Pyx_INCREF(__pyx_v_pq);
          __Pyx_GIVEREF(__pyx_v_pq);
          PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_8, __pyx_v_pq);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_8, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1705, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "cytoolz/itertoolz.pyx":1706
 *             if top < item:
 *                 _heapreplace(pq, (item, i))
 *                 top = pq[0][0]             # <<<<<<<<<<<<<<
 *                 i -= 1
 *     else:
 */
        __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_pq, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_top, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "cytoolz/itertoolz.pyx":1707
 *                 _heapreplace(pq, (item, i))
 *                 top = pq[0][0]
 *                 i -= 1             # <<<<<<<<<<<<<<
 *     else:
 *         for item in it:
 */
        __pyx_v_i = (__pyx_v_i - 1);

        /* "cytoolz/itertoolz.pyx":1704
 *     if key is None:
 *         for item in it:
 *             if top < item:             # <<<<<<<<<<<<<<
 *                 _heapreplace(pq, (item, i))
 *                 top = pq[0][0]
 */
      }

      /* "cytoolz/itertoolz.pyx":1703
 *     top = pq[0][0]
 *     if key is None:
 *         for item in it:             # <<<<<<<<<<<<<<
 *             if top < item:
 *                 _heapreplace(pq, (item, i))
 */
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytoolz/itertoolz.pyx":1702
 *     heapify(pq)
 *     top = pq[0][0]
 *     if key is None:             # <<<<<<<<<<<<<<
 *         for item in it:
 *             if top < item:
 */
    goto __pyx_L21;
  }

  /* "cytoolz/itertoolz.pyx":1709
 *                 i -= 1
 *     else:
 *         for item in it:             # <<<<<<<<<<<<<<
 *             val = key(item)
 *             if top < val:
 */
  /*else*/ {
    if (likely(PyList_CheckExact(__pyx_v_it)) || PyTuple_CheckExact(__pyx_v_it)) {
      __pyx_t_9 = __pyx_v_it; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_it); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1709, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1709, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1709, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1709, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1709, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_10(__pyx_t_9);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1709, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "cytoolz/itertoolz.pyx":1710
 *     else:
 *         for item in it:
 *             val = key(item)             # <<<<<<<<<<<<<<
 *             if top < val:
 *                 _heapreplace(pq, (val, i, item))
 */
      __Pyx_INCREF(__pyx_v_key);
      __pyx_t_7 = __pyx_v_key; __pyx_t_12 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_v_item) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_item);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "cytoolz/itertoolz.pyx":1711
 *         for item in it:
 *             val = key(item)
 *             if top < val:             # <<<<<<<<<<<<<<
 *                 _heapreplace(pq, (val, i, item))
 *                 top = pq[0][0]
 */
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_top, __pyx_v_val, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1711, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1711, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_3) {

        /* "cytoolz/itertoolz.pyx":1712
 *             val = key(item)
 *             if top < val:
 *                 _heapreplace(pq, (val, i, item))             # <<<<<<<<<<<<<<
 *                 top = pq[0][0]
 *                 i -= 1
 */
        __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1712, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1712, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_INCREF(__pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_val);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_7);
        __Pyx_INCREF(__pyx_v_item);
        __Pyx_GIVEREF(__pyx_v_item);
        PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_v_item);
        __pyx_t_7 = 0;
        __Pyx_INCREF(__pyx_v__heapreplace);
        __pyx_t_7 = __pyx_v__heapreplace; __pyx_t_1 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_8 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_pq, __pyx_t_12};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1712, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_pq, __pyx_t_12};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1712, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        } else
        #endif
        {
          __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1712, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (__pyx_t_1) {
            __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
          }
          __Pyx_INCREF(__pyx_v_pq);
          __Pyx_GIVEREF(__pyx_v_pq);
          PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_v_pq);
          __Pyx_GIVEREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_t_12);
          __pyx_t_12 = 0;
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1712, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cytoolz/itertoolz.pyx":1713
 *             if top < val:
 *                 _heapreplace(pq, (val, i, item))
 *                 top = pq[0][0]             # <<<<<<<<<<<<<<
 *                 i -= 1
 * 
 */
        __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_pq, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1713, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1713, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_top, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "cytoolz/itertoolz.pyx":1714
 *                 _heapreplace(pq, (val, i, item))
 *                 top = pq[0][0]
 *                 i -= 1             # <<<<<<<<<<<<<<
 * 
 *     pq.sort(reverse=True)
 */
        __pyx_v_i = (__pyx_v_i - 1);

        /* "cytoolz/itertoolz.pyx":1711
 *         for item in it:
 *             val = key(item)
 *             if top < val:             # <<<<<<<<<<<<<<
 *                 _heapreplace(pq, (val, i, item))
 *                 top = pq[0][0]
 */
      }

      /* "cytoolz/itertoolz.pyx":1709
 *                 i -= 1
 *     else:
 *         for item in it:             # <<<<<<<<<<<<<<
 *             val = key(item)
 *             if top < val:
 */
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_L21:;

  /* "cytoolz/itertoolz.pyx":1716
 *                 i -= 1
 * 
 *     pq.sort(reverse=True)             # <<<<<<<<<<<<<<
 *     k = 0 if key is None else 2
 *     return tuple([item[k] for item in pq])
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_pq, __pyx_n_s_sort); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_reverse, Py_True) < 0) __PYX_ERR(0, 1716, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytoolz/itertoolz.pyx":1717
 * 
 *     pq.sort(reverse=True)
 *     k = 0 if key is None else 2             # <<<<<<<<<<<<<<
 *     return tuple([item[k] for item in pq])
 * 
 */
  __pyx_t_3 = (__pyx_v_key == Py_None);
  if ((__pyx_t_3 != 0)) {
    __pyx_t_6 = 0;
  } else {
    __pyx_t_6 = 2;
  }
  __pyx_v_k = __pyx_t_6;

  /* "cytoolz/itertoolz.pyx":1718
 *     pq.sort(reverse=True)
 *     k = 0 if key is None else 2
 *     return tuple([item[k] for item in pq])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1718, __pyx_L30_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __pyx_v_pq; __Pyx_INCREF(__pyx_t_7); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1718, __pyx_L30_error)
      #else
      __pyx_t_9 = PySequence_ITEM(__pyx_t_7, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1718, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_item, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_8genexpr2__pyx_v_item, __pyx_v_k, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1718, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1718, __pyx_L30_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_item); __pyx_8genexpr2__pyx_v_item = 0;
    goto __pyx_L33_exit_scope;
    __pyx_L30_error:;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_item); __pyx_8genexpr2__pyx_v_item = 0;
    goto __pyx_L1_error;
    __pyx_L33_exit_scope:;
  } /* exit inner scope */
  __pyx_t_7 = PyList_AsTuple(((PyObject*)__pyx_t_5)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1649
 * 
 * 
 * cpdef object topk(Py_ssize_t k, object seq, object key=None):             # <<<<<<<<<<<<<<
 *     """
 *     Find the k largest elements of a sequence
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytoolz.itertoolz.topk", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_top);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF(__pyx_v__heapreplace);
  __Pyx_XDECREF(__pyx_v_pq);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_item);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_57topk(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_56topk[] = "topk(Py_ssize_t k, seq, key=None)\n\n    Find the k largest elements of a sequence\n\n    Operates lazily in ``n*log(k)`` time\n\n    >>> topk(2, [1, 100, 10, 1000])\n    (1000, 100)\n\n    Use a key function to change sorted order\n\n    >>> topk(2, ['Alice', 'Bob', 'Charlie', 'Dan'], key=len)\n    ('Charlie', 'Alice')\n\n    See also:\n        heapq.nlargest\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_57topk = {"topk", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_57topk, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_56topk};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_57topk(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  Py_ssize_t __pyx_v_k;
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("topk (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_k,&__pyx_n_s_seq,&__pyx_n_s_key,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_k)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("topk", 0, 2, 3, 1); __PYX_ERR(0, 1649, __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--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "topk") < 0)) __PYX_ERR(0, 1649, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_k = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_k == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1649, __pyx_L3_error)
    __pyx_v_seq = values[1];
    __pyx_v_key = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("topk", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1649, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.topk", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_56topk(__pyx_self, __pyx_v_k, __pyx_v_seq, __pyx_v_key);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_56topk(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_k, PyObject *__pyx_v_seq, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytoolz_9itertoolz_topk __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("topk", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.key = __pyx_v_key;
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_topk(__pyx_v_k, __pyx_v_seq, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":1721
 * 
 * 
 * cpdef object peek(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Retrieve the next element of a sequence
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_59peek(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_peek(PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_iterator = NULL;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("peek", 0);

  /* "cytoolz/itertoolz.pyx":1735
 *     [0, 1, 2, 3, 4]
 *     """
 *     iterator = iter(seq)             # <<<<<<<<<<<<<<
 *     item = next(iterator)
 *     return item, chain((item,), iterator)
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_iterator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1736
 *     """
 *     iterator = iter(seq)
 *     item = next(iterator)             # <<<<<<<<<<<<<<
 *     return item, chain((item,), iterator)
 * 
 */
  __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_iterator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_item = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1737
 *     iterator = iter(seq)
 *     item = next(iterator)
 *     return item, chain((item,), iterator)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chain); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_item);
  __Pyx_GIVEREF(__pyx_v_item);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_item);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_iterator};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1737, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_iterator};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1737, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1737, __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_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_iterator);
    __Pyx_GIVEREF(__pyx_v_iterator);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_iterator);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_item);
  __Pyx_GIVEREF(__pyx_v_item);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_item);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1721
 * 
 * 
 * cpdef object peek(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Retrieve the next element of a sequence
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytoolz.itertoolz.peek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_iterator);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_59peek(PyObject *__pyx_self, PyObject *__pyx_v_seq); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_58peek[] = "peek(seq)\n\n    Retrieve the next element of a sequence\n\n    Returns the first element and an iterable equivalent to the original\n    sequence, still having the element retrieved.\n\n    >>> seq = [0, 1, 2, 3, 4]\n    >>> first, seq = peek(seq)\n    >>> first\n    0\n    >>> list(seq)\n    [0, 1, 2, 3, 4]\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_59peek = {"peek", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_59peek, METH_O, __pyx_doc_7cytoolz_9itertoolz_58peek};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_59peek(PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("peek (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_58peek(__pyx_self, ((PyObject *)__pyx_v_seq));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_58peek(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq) {
  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("peek", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_peek(__pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":1740
 * 
 * 
 * cpdef object peekn(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Retrieve the next n elements of a sequence
 */

static PyObject *__pyx_pw_7cytoolz_9itertoolz_61peekn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7cytoolz_9itertoolz_peekn(Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_iterator = NULL;
  PyObject *__pyx_v_peeked = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("peekn", 0);

  /* "cytoolz/itertoolz.pyx":1754
 *     [0, 1, 2, 3, 4]
 *     """
 *     iterator = iter(seq)             # <<<<<<<<<<<<<<
 *     peeked = tuple(take(n, iterator))
 *     return peeked, chain(iter(peeked), iterator)
 */
  __pyx_t_1 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_iterator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":1755
 *     """
 *     iterator = iter(seq)
 *     peeked = tuple(take(n, iterator))             # <<<<<<<<<<<<<<
 *     return peeked, chain(iter(peeked), iterator)
 * 
 */
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_take(__pyx_v_n, __pyx_v_iterator, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_peeked = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1756
 *     iterator = iter(seq)
 *     peeked = tuple(take(n, iterator))
 *     return peeked, chain(iter(peeked), iterator)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_chain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetIter(__pyx_v_peeked); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_iterator};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1756, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_iterator};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1756, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1756, __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_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_iterator);
    __Pyx_GIVEREF(__pyx_v_iterator);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_iterator);
    __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_peeked);
  __Pyx_GIVEREF(__pyx_v_peeked);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_peeked);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1740
 * 
 * 
 * cpdef object peekn(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Retrieve the next n elements of a sequence
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytoolz.itertoolz.peekn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_iterator);
  __Pyx_XDECREF(__pyx_v_peeked);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_61peekn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_60peekn[] = "peekn(Py_ssize_t n, seq)\n\n    Retrieve the next n elements of a sequence\n\n    Returns a tuple of the first n elements and an iterable equivalent\n    to the original, still having the elements retrieved.\n\n    >>> seq = [0, 1, 2, 3, 4]\n    >>> first_two, seq = peekn(2, seq)\n    >>> first_two\n    (0, 1)\n    >>> list(seq)\n    [0, 1, 2, 3, 4]\n    ";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_61peekn = {"peekn", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_61peekn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_60peekn};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_61peekn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seq = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("peekn (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_seq,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_n)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("peekn", 1, 2, 2, 1); __PYX_ERR(0, 1740, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "peekn") < 0)) __PYX_ERR(0, 1740, __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_n = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_n == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1740, __pyx_L3_error)
    __pyx_v_seq = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("peekn", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1740, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.peekn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_60peekn(__pyx_self, __pyx_v_n, __pyx_v_seq);

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_60peekn(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_n, PyObject *__pyx_v_seq) {
  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("peekn", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytoolz_9itertoolz_peekn(__pyx_v_n, __pyx_v_seq, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "cytoolz/itertoolz.pyx":1793
 *     [7, 9, 19, 25, 30, 32, 34, 48, 59, 60, 81, 98]
 *     """
 *     def __cinit__(self, object prob, object seq, random_state=None):             # <<<<<<<<<<<<<<
 *         float(prob)
 *         self.prob = prob
 */

/* Python wrapper */
static int __pyx_pw_7cytoolz_9itertoolz_13random_sample_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7cytoolz_9itertoolz_13random_sample_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prob = 0;
  PyObject *__pyx_v_seq = 0;
  PyObject *__pyx_v_random_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prob,&__pyx_n_s_seq,&__pyx_n_s_random_state,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prob)) != 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_seq)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 1793, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_random_state);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1793, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_prob = values[0];
    __pyx_v_seq = values[1];
    __pyx_v_random_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1793, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.random_sample.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13random_sample___cinit__(((struct __pyx_obj_7cytoolz_9itertoolz_random_sample *)__pyx_v_self), __pyx_v_prob, __pyx_v_seq, __pyx_v_random_state);

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

static int __pyx_pf_7cytoolz_9itertoolz_13random_sample___cinit__(struct __pyx_obj_7cytoolz_9itertoolz_random_sample *__pyx_v_self, PyObject *__pyx_v_prob, PyObject *__pyx_v_seq, PyObject *__pyx_v_random_state) {
  PyObject *__pyx_v_Random = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  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("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_random_state);

  /* "cytoolz/itertoolz.pyx":1794
 *     """
 *     def __cinit__(self, object prob, object seq, random_state=None):
 *         float(prob)             # <<<<<<<<<<<<<<
 *         self.prob = prob
 *         self.iter_seq = iter(seq)
 */
  __pyx_t_1 = __Pyx_PyObject_AsDouble(__pyx_v_prob); if (unlikely(__pyx_t_1 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1794, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":1795
 *     def __cinit__(self, object prob, object seq, random_state=None):
 *         float(prob)
 *         self.prob = prob             # <<<<<<<<<<<<<<
 *         self.iter_seq = iter(seq)
 *         if not hasattr(random_state, 'random'):
 */
  __Pyx_INCREF(__pyx_v_prob);
  __Pyx_GIVEREF(__pyx_v_prob);
  __Pyx_GOTREF(__pyx_v_self->prob);
  __Pyx_DECREF(__pyx_v_self->prob);
  __pyx_v_self->prob = __pyx_v_prob;

  /* "cytoolz/itertoolz.pyx":1796
 *         float(prob)
 *         self.prob = prob
 *         self.iter_seq = iter(seq)             # <<<<<<<<<<<<<<
 *         if not hasattr(random_state, 'random'):
 *             from random import Random
 */
  __pyx_t_2 = PyObject_GetIter(__pyx_v_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->iter_seq);
  __Pyx_DECREF(__pyx_v_self->iter_seq);
  __pyx_v_self->iter_seq = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1797
 *         self.prob = prob
 *         self.iter_seq = iter(seq)
 *         if not hasattr(random_state, 'random'):             # <<<<<<<<<<<<<<
 *             from random import Random
 * 
 */
  __pyx_t_3 = __Pyx_HasAttr(__pyx_v_random_state, __pyx_n_u_random); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1797, __pyx_L1_error)
  __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
  if (__pyx_t_4) {

    /* "cytoolz/itertoolz.pyx":1798
 *         self.iter_seq = iter(seq)
 *         if not hasattr(random_state, 'random'):
 *             from random import Random             # <<<<<<<<<<<<<<
 * 
 *             random_state = Random(random_state)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_Random);
    __Pyx_GIVEREF(__pyx_n_s_Random);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Random);
    __pyx_t_5 = __Pyx_Import(__pyx_n_s_random, __pyx_t_2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_Random); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_Random = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytoolz/itertoolz.pyx":1800
 *             from random import Random
 * 
 *             random_state = Random(random_state)             # <<<<<<<<<<<<<<
 *         self.random_func = random_state.random
 * 
 */
    __Pyx_INCREF(__pyx_v_Random);
    __pyx_t_2 = __pyx_v_Random; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_random_state) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_random_state);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_random_state, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytoolz/itertoolz.pyx":1797
 *         self.prob = prob
 *         self.iter_seq = iter(seq)
 *         if not hasattr(random_state, 'random'):             # <<<<<<<<<<<<<<
 *             from random import Random
 * 
 */
  }

  /* "cytoolz/itertoolz.pyx":1801
 * 
 *             random_state = Random(random_state)
 *         self.random_func = random_state.random             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_random_state, __pyx_n_s_random); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->random_func);
  __Pyx_DECREF(__pyx_v_self->random_func);
  __pyx_v_self->random_func = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cytoolz/itertoolz.pyx":1793
 *     [7, 9, 19, 25, 30, 32, 34, 48, 59, 60, 81, 98]
 *     """
 *     def __cinit__(self, object prob, object seq, random_state=None):             # <<<<<<<<<<<<<<
 *         float(prob)
 *         self.prob = prob
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytoolz.itertoolz.random_sample.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_Random);
  __Pyx_XDECREF(__pyx_v_random_state);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytoolz/itertoolz.pyx":1803
 *         self.random_func = random_state.random
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13random_sample_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13random_sample_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13random_sample_2__iter__(((struct __pyx_obj_7cytoolz_9itertoolz_random_sample *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13random_sample_2__iter__(struct __pyx_obj_7cytoolz_9itertoolz_random_sample *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cytoolz/itertoolz.pyx":1804
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cytoolz/itertoolz.pyx":1803
 *         self.random_func = random_state.random
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cytoolz/itertoolz.pyx":1806
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         while True:
 *             if self.random_func() < self.prob:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13random_sample_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13random_sample_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13random_sample_4__next__(((struct __pyx_obj_7cytoolz_9itertoolz_random_sample *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13random_sample_4__next__(struct __pyx_obj_7cytoolz_9itertoolz_random_sample *__pyx_v_self) {
  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("__next__", 0);

  /* "cytoolz/itertoolz.pyx":1807
 * 
 *     def __next__(self):
 *         while True:             # <<<<<<<<<<<<<<
 *             if self.random_func() < self.prob:
 *                 return next(self.iter_seq)
 */
  while (1) {

    /* "cytoolz/itertoolz.pyx":1808
 *     def __next__(self):
 *         while True:
 *             if self.random_func() < self.prob:             # <<<<<<<<<<<<<<
 *                 return next(self.iter_seq)
 *             next(self.iter_seq)
 */
    __Pyx_INCREF(__pyx_v_self->random_func);
    __pyx_t_2 = __pyx_v_self->random_func; __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_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, 1808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_self->prob, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1808, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1808, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "cytoolz/itertoolz.pyx":1809
 *         while True:
 *             if self.random_func() < self.prob:
 *                 return next(self.iter_seq)             # <<<<<<<<<<<<<<
 *             next(self.iter_seq)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __pyx_v_self->iter_seq;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1809, __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;

      /* "cytoolz/itertoolz.pyx":1808
 *     def __next__(self):
 *         while True:
 *             if self.random_func() < self.prob:             # <<<<<<<<<<<<<<
 *                 return next(self.iter_seq)
 *             next(self.iter_seq)
 */
    }

    /* "cytoolz/itertoolz.pyx":1810
 *             if self.random_func() < self.prob:
 *                 return next(self.iter_seq)
 *             next(self.iter_seq)             # <<<<<<<<<<<<<<
 */
    __pyx_t_1 = __pyx_v_self->iter_seq;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1810, __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;
  }

  /* "cytoolz/itertoolz.pyx":1806
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         while True:
 *             if self.random_func() < self.prob:
 */

  /* 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("cytoolz.itertoolz.random_sample.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13random_sample_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_13random_sample_6__reduce_cython__[] = "random_sample.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_13random_sample_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13random_sample_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_13random_sample_6__reduce_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13random_sample_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13random_sample_6__reduce_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_random_sample *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13random_sample_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_random_sample *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.random_sample.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13random_sample_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_13random_sample_8__setstate_cython__[] = "random_sample.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_13random_sample_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13random_sample_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_13random_sample_8__setstate_cython__};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_13random_sample_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_13random_sample_8__setstate_cython__(((struct __pyx_obj_7cytoolz_9itertoolz_random_sample *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7cytoolz_9itertoolz_13random_sample_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7cytoolz_9itertoolz_random_sample *__pyx_v_self, CYTHON_UNUSED 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)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytoolz.itertoolz.random_sample.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__getter_null(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_7cytoolz_9itertoolz_63__pyx_unpickle__getter_null(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7cytoolz_9itertoolz_62__pyx_unpickle__getter_null[] = "__pyx_unpickle__getter_null(__pyx_type, long __pyx_checksum, __pyx_state)";
static PyMethodDef __pyx_mdef_7cytoolz_9itertoolz_63__pyx_unpickle__getter_null = {"__pyx_unpickle__getter_null", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7cytoolz_9itertoolz_63__pyx_unpickle__getter_null, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7cytoolz_9itertoolz_62__pyx_unpickle__getter_null};
static PyObject *__pyx_pw_7cytoolz_9itertoolz_63__pyx_unpickle__getter_null(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__getter_null (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__getter_null", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__getter_null", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle__getter_null") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__getter_null", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cytoolz.itertoolz.__pyx_unpickle__getter_null", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytoolz_9itertoolz_62__pyx_unpickle__getter_null(__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_7cytoolz_9itertoolz_62__pyx_unpickle__getter_null(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__getter_null", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__83, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 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 (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = _getter_null.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 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, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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(1, 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 (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = _getter_null.__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(1, 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(1, 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(1, 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(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = _getter_null.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__getter_null__set_state(<_getter_null> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__getter_null), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 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(1, 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 (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = _getter_null.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__getter_null__set_state(<_getter_null> __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 = _getter_null.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__getter_null__set_state(<_getter_null> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__getter_null__set_state(_getter_null __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_7cytoolz_9itertoolz___pyx_unpickle__getter_null__set_state(((struct __pyx_obj_7cytoolz_9itertoolz__getter_null *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 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 (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = _getter_null.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__getter_null__set_state(<_getter_null> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__getter_null__set_state(<_getter_null> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__getter_null__set_state(_getter_null __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__getter_null(__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("cytoolz.itertoolz.__pyx_unpickle__getter_null", __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__getter_null__set_state(<_getter_null> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__getter_null__set_state(_getter_null __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_7cytoolz_9itertoolz___pyx_unpickle__getter_null__set_state(struct __pyx_obj_7cytoolz_9itertoolz__getter_null *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__getter_null__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__getter_null__set_state(_getter_null __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__getter_null__set_state(_getter_null __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__getter_null__set_state(_getter_null __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__getter_null__set_state(<_getter_null> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__getter_null__set_state(_getter_null __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytoolz.itertoolz.__pyx_unpickle__getter_null__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz_remove(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz_remove *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_7cytoolz_9itertoolz_remove *)o);
  p->predicate = Py_None; Py_INCREF(Py_None);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_6remove_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz_remove(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz_remove *p = (struct __pyx_obj_7cytoolz_9itertoolz_remove *)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->predicate);
  Py_CLEAR(p->iter_seq);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz_remove(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz_remove *p = (struct __pyx_obj_7cytoolz_9itertoolz_remove *)o;
  if (p->predicate) {
    e = (*v)(p->predicate, a); if (e) return e;
  }
  if (p->iter_seq) {
    e = (*v)(p->iter_seq, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz_remove(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz_remove *p = (struct __pyx_obj_7cytoolz_9itertoolz_remove *)o;
  tmp = ((PyObject*)p->predicate);
  p->predicate = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->iter_seq);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_6remove_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_6remove_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz_remove[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_6remove_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_6remove_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_6remove_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_6remove_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_6remove_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz_remove = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz.remove", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz_remove), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz_remove, /*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*/
  " remove(predicate, seq)\n\n    Return those items of sequence for which predicate(item) is False\n\n    >>> def iseven(x):\n    ...     return x % 2 == 0\n    >>> list(remove(iseven, [1, 2, 3, 4]))\n    [1, 3]\n    ", /*tp_doc*/
  __pyx_tp_traverse_7cytoolz_9itertoolz_remove, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz_remove, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_6remove_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_6remove_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz_remove, /*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_7cytoolz_9itertoolz_remove, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz_accumulate(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz_accumulate *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_7cytoolz_9itertoolz_accumulate *)o);
  p->binop = Py_None; Py_INCREF(Py_None);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  p->result = Py_None; Py_INCREF(Py_None);
  p->initial = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_10accumulate_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz_accumulate(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz_accumulate *p = (struct __pyx_obj_7cytoolz_9itertoolz_accumulate *)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->binop);
  Py_CLEAR(p->iter_seq);
  Py_CLEAR(p->result);
  Py_CLEAR(p->initial);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz_accumulate(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz_accumulate *p = (struct __pyx_obj_7cytoolz_9itertoolz_accumulate *)o;
  if (p->binop) {
    e = (*v)(p->binop, a); if (e) return e;
  }
  if (p->iter_seq) {
    e = (*v)(p->iter_seq, a); if (e) return e;
  }
  if (p->result) {
    e = (*v)(p->result, a); if (e) return e;
  }
  if (p->initial) {
    e = (*v)(p->initial, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz_accumulate(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz_accumulate *p = (struct __pyx_obj_7cytoolz_9itertoolz_accumulate *)o;
  tmp = ((PyObject*)p->binop);
  p->binop = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->iter_seq);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->result);
  p->result = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->initial);
  p->initial = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_10accumulate_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_10accumulate_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz_accumulate[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_10accumulate_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_10accumulate_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_10accumulate_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_10accumulate_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_10accumulate_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz_accumulate = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz.accumulate", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz_accumulate), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz_accumulate, /*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*/
  " accumulate(binop, seq, initial='__no__default__')\n\n    Repeatedly apply binary function to a sequence, accumulating results\n\n    >>> from operator import add, mul\n    >>> list(accumulate(add, [1, 2, 3, 4, 5]))\n    [1, 3, 6, 10, 15]\n    >>> list(accumulate(mul, [1, 2, 3, 4, 5]))\n    [1, 2, 6, 24, 120]\n\n    Accumulate is similar to ``reduce`` and is good for making functions like\n    cumulative sum:\n\n    >>> from functools import partial, reduce\n    >>> sum    = partial(reduce, add)\n    >>> cumsum = partial(accumulate, add)\n\n    Accumulate also takes an optional argument that will be used as the first\n    value. This is similar to reduce.\n\n    >>> list(accumulate(add, [1, 2, 3], -1))\n    [-1, 0, 2, 5]\n    >>> list(accumulate(add, [], 1))\n    [1]\n\n    See Also:\n        itertools.accumulate :  In standard itertools for Python 3.2+\n    ", /*tp_doc*/
  __pyx_tp_traverse_7cytoolz_9itertoolz_accumulate, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz_accumulate, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_10accumulate_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_10accumulate_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz_accumulate, /*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_7cytoolz_9itertoolz_accumulate, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__merge_sorted(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *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_7cytoolz_9itertoolz__merge_sorted *)o);
  p->seq1 = Py_None; Py_INCREF(Py_None);
  p->seq2 = Py_None; Py_INCREF(Py_None);
  p->val1 = Py_None; Py_INCREF(Py_None);
  p->val2 = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__merge_sorted(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *p = (struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *)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->seq1);
  Py_CLEAR(p->seq2);
  Py_CLEAR(p->val1);
  Py_CLEAR(p->val2);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz__merge_sorted(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *p = (struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *)o;
  if (p->seq1) {
    e = (*v)(p->seq1, a); if (e) return e;
  }
  if (p->seq2) {
    e = (*v)(p->seq2, a); if (e) return e;
  }
  if (p->val1) {
    e = (*v)(p->val1, a); if (e) return e;
  }
  if (p->val2) {
    e = (*v)(p->val2, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz__merge_sorted(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *p = (struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted *)o;
  tmp = ((PyObject*)p->seq1);
  p->seq1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->seq2);
  p->seq2 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->val1);
  p->val1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->val2);
  p->val2 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__merge_sorted[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_13_merge_sorted_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_13_merge_sorted_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__merge_sorted = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._merge_sorted", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__merge_sorted, /*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_7cytoolz_9itertoolz__merge_sorted, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__merge_sorted, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_13_merge_sorted_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__merge_sorted, /*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_7cytoolz_9itertoolz__merge_sorted, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__merge_sorted_key(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *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_7cytoolz_9itertoolz__merge_sorted_key *)o);
  p->seq1 = Py_None; Py_INCREF(Py_None);
  p->seq2 = Py_None; Py_INCREF(Py_None);
  p->val1 = Py_None; Py_INCREF(Py_None);
  p->val2 = Py_None; Py_INCREF(Py_None);
  p->key = Py_None; Py_INCREF(Py_None);
  p->key1 = Py_None; Py_INCREF(Py_None);
  p->key2 = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__merge_sorted_key(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *p = (struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *)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->seq1);
  Py_CLEAR(p->seq2);
  Py_CLEAR(p->val1);
  Py_CLEAR(p->val2);
  Py_CLEAR(p->key);
  Py_CLEAR(p->key1);
  Py_CLEAR(p->key2);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz__merge_sorted_key(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *p = (struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *)o;
  if (p->seq1) {
    e = (*v)(p->seq1, a); if (e) return e;
  }
  if (p->seq2) {
    e = (*v)(p->seq2, a); if (e) return e;
  }
  if (p->val1) {
    e = (*v)(p->val1, a); if (e) return e;
  }
  if (p->val2) {
    e = (*v)(p->val2, a); if (e) return e;
  }
  if (p->key) {
    e = (*v)(p->key, a); if (e) return e;
  }
  if (p->key1) {
    e = (*v)(p->key1, a); if (e) return e;
  }
  if (p->key2) {
    e = (*v)(p->key2, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz__merge_sorted_key(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *p = (struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key *)o;
  tmp = ((PyObject*)p->seq1);
  p->seq1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->seq2);
  p->seq2 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->val1);
  p->val1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->val2);
  p->val2 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->key);
  p->key = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->key1);
  p->key1 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->key2);
  p->key2 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__merge_sorted_key[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_17_merge_sorted_key_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_17_merge_sorted_key_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__merge_sorted_key = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._merge_sorted_key", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__merge_sorted_key), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__merge_sorted_key, /*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_7cytoolz_9itertoolz__merge_sorted_key, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__merge_sorted_key, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_17_merge_sorted_key_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__merge_sorted_key, /*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_7cytoolz_9itertoolz__merge_sorted_key, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz_interleave(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz_interleave *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_7cytoolz_9itertoolz_interleave *)o);
  p->iters = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->newiters = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_10interleave_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz_interleave(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz_interleave *p = (struct __pyx_obj_7cytoolz_9itertoolz_interleave *)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->iters);
  Py_CLEAR(p->newiters);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz_interleave(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz_interleave *p = (struct __pyx_obj_7cytoolz_9itertoolz_interleave *)o;
  if (p->iters) {
    e = (*v)(p->iters, a); if (e) return e;
  }
  if (p->newiters) {
    e = (*v)(p->newiters, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz_interleave(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz_interleave *p = (struct __pyx_obj_7cytoolz_9itertoolz_interleave *)o;
  tmp = ((PyObject*)p->iters);
  p->iters = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->newiters);
  p->newiters = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_10interleave_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_10interleave_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz_interleave[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_10interleave_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_10interleave_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_10interleave_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_10interleave_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_10interleave_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz_interleave = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz.interleave", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz_interleave), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz_interleave, /*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*/
  " interleave(seqs)\n\n    Interleave a sequence of sequences\n\n    >>> list(interleave([[1, 2], [3, 4]]))\n    [1, 3, 2, 4]\n\n    >>> ''.join(interleave(('ABC', 'XY')))\n    'AXBYC'\n\n    Both the individual sequences and the sequence of sequences may be infinite\n\n    Returns a lazy iterator\n    ", /*tp_doc*/
  __pyx_tp_traverse_7cytoolz_9itertoolz_interleave, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz_interleave, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_10interleave_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_10interleave_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz_interleave, /*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_7cytoolz_9itertoolz_interleave, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__unique_key(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__unique_key *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_7cytoolz_9itertoolz__unique_key *)o);
  p->key = Py_None; Py_INCREF(Py_None);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  p->seen = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_11_unique_key_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__unique_key(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__unique_key *p = (struct __pyx_obj_7cytoolz_9itertoolz__unique_key *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->key);
  Py_CLEAR(p->iter_seq);
  Py_CLEAR(p->seen);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz__unique_key(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz__unique_key *p = (struct __pyx_obj_7cytoolz_9itertoolz__unique_key *)o;
  if (p->key) {
    e = (*v)(p->key, a); if (e) return e;
  }
  if (p->iter_seq) {
    e = (*v)(p->iter_seq, a); if (e) return e;
  }
  if (p->seen) {
    e = (*v)(p->seen, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz__unique_key(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__unique_key *p = (struct __pyx_obj_7cytoolz_9itertoolz__unique_key *)o;
  tmp = ((PyObject*)p->key);
  p->key = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->iter_seq);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->seen);
  p->seen = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_11_unique_key_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_11_unique_key_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__unique_key[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_11_unique_key_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_unique_key_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_11_unique_key_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_unique_key_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_11_unique_key_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__unique_key = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._unique_key", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__unique_key), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__unique_key, /*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_7cytoolz_9itertoolz__unique_key, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__unique_key, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_11_unique_key_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_11_unique_key_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__unique_key, /*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_7cytoolz_9itertoolz__unique_key, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__unique_identity(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *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_7cytoolz_9itertoolz__unique_identity *)o);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  p->seen = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__unique_identity(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *p = (struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *)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->iter_seq);
  Py_CLEAR(p->seen);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz__unique_identity(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *p = (struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *)o;
  if (p->iter_seq) {
    e = (*v)(p->iter_seq, a); if (e) return e;
  }
  if (p->seen) {
    e = (*v)(p->seen, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz__unique_identity(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *p = (struct __pyx_obj_7cytoolz_9itertoolz__unique_identity *)o;
  tmp = ((PyObject*)p->iter_seq);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->seen);
  p->seen = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_16_unique_identity_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_16_unique_identity_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__unique_identity[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_16_unique_identity_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_16_unique_identity_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_16_unique_identity_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_16_unique_identity_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__unique_identity = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._unique_identity", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__unique_identity), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__unique_identity, /*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_7cytoolz_9itertoolz__unique_identity, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__unique_identity, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_16_unique_identity_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_16_unique_identity_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__unique_identity, /*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_7cytoolz_9itertoolz__unique_identity, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz_interpose(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz_interpose *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_7cytoolz_9itertoolz_interpose *)o);
  p->el = Py_None; Py_INCREF(Py_None);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  p->val = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_9interpose_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz_interpose(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz_interpose *p = (struct __pyx_obj_7cytoolz_9itertoolz_interpose *)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->el);
  Py_CLEAR(p->iter_seq);
  Py_CLEAR(p->val);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz_interpose(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz_interpose *p = (struct __pyx_obj_7cytoolz_9itertoolz_interpose *)o;
  if (p->el) {
    e = (*v)(p->el, a); if (e) return e;
  }
  if (p->iter_seq) {
    e = (*v)(p->iter_seq, a); if (e) return e;
  }
  if (p->val) {
    e = (*v)(p->val, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz_interpose(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz_interpose *p = (struct __pyx_obj_7cytoolz_9itertoolz_interpose *)o;
  tmp = ((PyObject*)p->el);
  p->el = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->iter_seq);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->val);
  p->val = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_9interpose_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_9interpose_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz_interpose[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_9interpose_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_9interpose_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_9interpose_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_9interpose_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_9interpose_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz_interpose = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz.interpose", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz_interpose), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz_interpose, /*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*/
  " interpose(el, seq)\n\n    Introduce element between each pair of elements in seq\n\n    >>> list(interpose(\"a\", [1, 2, 3]))\n    [1, 'a', 2, 'a', 3]\n    ", /*tp_doc*/
  __pyx_tp_traverse_7cytoolz_9itertoolz_interpose, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz_interpose, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_9interpose_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_9interpose_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz_interpose, /*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_7cytoolz_9itertoolz_interpose, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz_iterate(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz_iterate *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_7cytoolz_9itertoolz_iterate *)o);
  p->func = Py_None; Py_INCREF(Py_None);
  p->x = Py_None; Py_INCREF(Py_None);
  p->val = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_7iterate_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz_iterate(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz_iterate *p = (struct __pyx_obj_7cytoolz_9itertoolz_iterate *)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->func);
  Py_CLEAR(p->x);
  Py_CLEAR(p->val);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz_iterate(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz_iterate *p = (struct __pyx_obj_7cytoolz_9itertoolz_iterate *)o;
  if (p->func) {
    e = (*v)(p->func, a); if (e) return e;
  }
  if (p->x) {
    e = (*v)(p->x, a); if (e) return e;
  }
  if (p->val) {
    e = (*v)(p->val, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz_iterate(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz_iterate *p = (struct __pyx_obj_7cytoolz_9itertoolz_iterate *)o;
  tmp = ((PyObject*)p->func);
  p->func = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->x);
  p->x = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->val);
  p->val = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_7iterate_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_7iterate_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz_iterate[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_7iterate_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_7iterate_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_7iterate_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_7iterate_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_7iterate_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz_iterate = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz.iterate", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz_iterate), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz_iterate, /*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*/
  " iterate(func, x)\n\n    Repeatedly apply a function func onto an original input\n\n    Yields x, then func(x), then func(func(x)), then func(func(func(x))), etc..\n\n    >>> def inc(x):  return x + 1\n    >>> counter = iterate(inc, 0)\n    >>> next(counter)\n    0\n    >>> next(counter)\n    1\n    >>> next(counter)\n    2\n\n    >>> double = lambda x: x * 2\n    >>> powers_of_two = iterate(double, 1)\n    >>> next(powers_of_two)\n    1\n    >>> next(powers_of_two)\n    2\n    >>> next(powers_of_two)\n    4\n    >>> next(powers_of_two)\n    8\n    ", /*tp_doc*/
  __pyx_tp_traverse_7cytoolz_9itertoolz_iterate, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz_iterate, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_7iterate_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_7iterate_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz_iterate, /*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_7cytoolz_9itertoolz_iterate, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz_sliding_window(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *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_7cytoolz_9itertoolz_sliding_window *)o);
  p->iterseq = Py_None; Py_INCREF(Py_None);
  p->prev = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_14sliding_window_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz_sliding_window(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *p = (struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *)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->iterseq);
  Py_CLEAR(p->prev);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz_sliding_window(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *p = (struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *)o;
  if (p->iterseq) {
    e = (*v)(p->iterseq, a); if (e) return e;
  }
  if (p->prev) {
    e = (*v)(p->prev, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz_sliding_window(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *p = (struct __pyx_obj_7cytoolz_9itertoolz_sliding_window *)o;
  tmp = ((PyObject*)p->iterseq);
  p->iterseq = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->prev);
  p->prev = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_14sliding_window_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_14sliding_window_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz_sliding_window[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_14sliding_window_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_14sliding_window_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_14sliding_window_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_14sliding_window_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_14sliding_window_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz_sliding_window = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz.sliding_window", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz_sliding_window), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz_sliding_window, /*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*/
  " sliding_window(n, seq)\n\n    A sequence of overlapping subsequences\n\n    >>> list(sliding_window(2, [1, 2, 3, 4]))\n    [(1, 2), (2, 3), (3, 4)]\n\n    This function creates a sliding window suitable for transformations like\n    sliding means / smoothing\n\n    >>> mean = lambda seq: float(sum(seq)) / len(seq)\n    >>> list(map(mean, sliding_window(2, [1, 2, 3, 4])))\n    [1.5, 2.5, 3.5]\n    ", /*tp_doc*/
  __pyx_tp_traverse_7cytoolz_9itertoolz_sliding_window, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz_sliding_window, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_14sliding_window_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_14sliding_window_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz_sliding_window, /*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_7cytoolz_9itertoolz_sliding_window, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz_partition_all(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz_partition_all *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_7cytoolz_9itertoolz_partition_all *)o);
  p->iterseq = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_13partition_all_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz_partition_all(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz_partition_all *p = (struct __pyx_obj_7cytoolz_9itertoolz_partition_all *)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->iterseq);
  (*Py_TYPE(o)->tp_free)(o);
}

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

static int __pyx_tp_clear_7cytoolz_9itertoolz_partition_all(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz_partition_all *p = (struct __pyx_obj_7cytoolz_9itertoolz_partition_all *)o;
  tmp = ((PyObject*)p->iterseq);
  p->iterseq = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_13partition_all_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_13partition_all_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz_partition_all[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_13partition_all_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13partition_all_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_13partition_all_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13partition_all_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_13partition_all_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz_partition_all = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz.partition_all", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz_partition_all), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz_partition_all, /*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*/
  " partition_all(n, seq)\n\n    Partition all elements of sequence into tuples of length at most n\n\n    The final tuple may be shorter to accommodate extra elements.\n\n    >>> list(partition_all(2, [1, 2, 3, 4]))\n    [(1, 2), (3, 4)]\n\n    >>> list(partition_all(2, [1, 2, 3, 4, 5]))\n    [(1, 2), (3, 4), (5,)]\n\n    See Also:\n        partition\n    ", /*tp_doc*/
  __pyx_tp_traverse_7cytoolz_9itertoolz_partition_all, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz_partition_all, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_13partition_all_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_13partition_all_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz_partition_all, /*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_7cytoolz_9itertoolz_partition_all, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__pluck_index(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *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_7cytoolz_9itertoolz__pluck_index *)o);
  p->ind = Py_None; Py_INCREF(Py_None);
  p->iterseqs = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__pluck_index(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *)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->ind);
  Py_CLEAR(p->iterseqs);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz__pluck_index(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *)o;
  if (p->ind) {
    e = (*v)(p->ind, a); if (e) return e;
  }
  if (p->iterseqs) {
    e = (*v)(p->iterseqs, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz__pluck_index(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_index *)o;
  tmp = ((PyObject*)p->ind);
  p->ind = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->iterseqs);
  p->iterseqs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_12_pluck_index_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_12_pluck_index_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__pluck_index[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_12_pluck_index_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_12_pluck_index_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_pluck_index_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_12_pluck_index_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__pluck_index = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._pluck_index", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__pluck_index, /*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_7cytoolz_9itertoolz__pluck_index, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__pluck_index, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_12_pluck_index_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_12_pluck_index_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__pluck_index, /*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_7cytoolz_9itertoolz__pluck_index, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__pluck_index_default(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *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_7cytoolz_9itertoolz__pluck_index_default *)o);
  p->ind = Py_None; Py_INCREF(Py_None);
  p->iterseqs = Py_None; Py_INCREF(Py_None);
  p->__pyx_default = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__pluck_index_default(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *)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->ind);
  Py_CLEAR(p->iterseqs);
  Py_CLEAR(p->__pyx_default);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz__pluck_index_default(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *)o;
  if (p->ind) {
    e = (*v)(p->ind, a); if (e) return e;
  }
  if (p->iterseqs) {
    e = (*v)(p->iterseqs, a); if (e) return e;
  }
  if (p->__pyx_default) {
    e = (*v)(p->__pyx_default, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz__pluck_index_default(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default *)o;
  tmp = ((PyObject*)p->ind);
  p->ind = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->iterseqs);
  p->iterseqs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_default);
  p->__pyx_default = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__pluck_index_default[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_20_pluck_index_default_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_20_pluck_index_default_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__pluck_index_default = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._pluck_index_default", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__pluck_index_default), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__pluck_index_default, /*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_7cytoolz_9itertoolz__pluck_index_default, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__pluck_index_default, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_20_pluck_index_default_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__pluck_index_default, /*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_7cytoolz_9itertoolz__pluck_index_default, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__pluck_list(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *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_7cytoolz_9itertoolz__pluck_list *)o);
  p->ind = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->iterseqs = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__pluck_list(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *)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->ind);
  Py_CLEAR(p->iterseqs);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz__pluck_list(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *)o;
  if (p->ind) {
    e = (*v)(p->ind, a); if (e) return e;
  }
  if (p->iterseqs) {
    e = (*v)(p->iterseqs, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz__pluck_list(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_list *)o;
  tmp = ((PyObject*)p->ind);
  p->ind = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->iterseqs);
  p->iterseqs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_11_pluck_list_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_11_pluck_list_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__pluck_list[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_11_pluck_list_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_11_pluck_list_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_pluck_list_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_11_pluck_list_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__pluck_list = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._pluck_list", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__pluck_list, /*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_7cytoolz_9itertoolz__pluck_list, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__pluck_list, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_11_pluck_list_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_11_pluck_list_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__pluck_list, /*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_7cytoolz_9itertoolz__pluck_list, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__pluck_list_default(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *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_7cytoolz_9itertoolz__pluck_list_default *)o);
  p->ind = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->iterseqs = Py_None; Py_INCREF(Py_None);
  p->__pyx_default = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__pluck_list_default(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *)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->ind);
  Py_CLEAR(p->iterseqs);
  Py_CLEAR(p->__pyx_default);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz__pluck_list_default(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *)o;
  if (p->ind) {
    e = (*v)(p->ind, a); if (e) return e;
  }
  if (p->iterseqs) {
    e = (*v)(p->iterseqs, a); if (e) return e;
  }
  if (p->__pyx_default) {
    e = (*v)(p->__pyx_default, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz__pluck_list_default(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *p = (struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default *)o;
  tmp = ((PyObject*)p->ind);
  p->ind = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->iterseqs);
  p->iterseqs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_default);
  p->__pyx_default = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__pluck_list_default[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_19_pluck_list_default_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_19_pluck_list_default_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__pluck_list_default = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._pluck_list_default", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__pluck_list_default), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__pluck_list_default, /*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_7cytoolz_9itertoolz__pluck_list_default, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__pluck_list_default, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_19_pluck_list_default_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__pluck_list_default, /*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_7cytoolz_9itertoolz__pluck_list_default, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__getter_index(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__getter_index *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_7cytoolz_9itertoolz__getter_index *)o);
  p->ind = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_13_getter_index_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__getter_index(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__getter_index *p = (struct __pyx_obj_7cytoolz_9itertoolz__getter_index *)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->ind);
  (*Py_TYPE(o)->tp_free)(o);
}

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

static int __pyx_tp_clear_7cytoolz_9itertoolz__getter_index(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__getter_index *p = (struct __pyx_obj_7cytoolz_9itertoolz__getter_index *)o;
  tmp = ((PyObject*)p->ind);
  p->ind = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__getter_index[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13_getter_index_5__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_13_getter_index_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13_getter_index_7__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_13_getter_index_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__getter_index = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._getter_index", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__getter_index), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__getter_index, /*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*/
  __pyx_pw_7cytoolz_9itertoolz_13_getter_index_3__call__, /*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_7cytoolz_9itertoolz__getter_index, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__getter_index, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__getter_index, /*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_7cytoolz_9itertoolz__getter_index, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__getter_list(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__getter_list *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_7cytoolz_9itertoolz__getter_list *)o);
  p->ind = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_12_getter_list_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__getter_list(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__getter_list *p = (struct __pyx_obj_7cytoolz_9itertoolz__getter_list *)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->ind);
  (*Py_TYPE(o)->tp_free)(o);
}

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

static int __pyx_tp_clear_7cytoolz_9itertoolz__getter_list(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__getter_list *p = (struct __pyx_obj_7cytoolz_9itertoolz__getter_list *)o;
  tmp = ((PyObject*)p->ind);
  p->ind = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__getter_list[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_getter_list_5__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_12_getter_list_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_getter_list_7__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_12_getter_list_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__getter_list = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._getter_list", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__getter_list), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__getter_list, /*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*/
  __pyx_pw_7cytoolz_9itertoolz_12_getter_list_3__call__, /*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_7cytoolz_9itertoolz__getter_list, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__getter_list, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__getter_list, /*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_7cytoolz_9itertoolz__getter_list, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__getter_null(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__getter_null(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__getter_null[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_getter_null_3__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_12_getter_null_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_12_getter_null_5__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_12_getter_null_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__getter_null = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._getter_null", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__getter_null), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__getter_null, /*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*/
  __pyx_pw_7cytoolz_9itertoolz_12_getter_null_1__call__, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__getter_null, /*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_7cytoolz_9itertoolz__getter_null, /*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_vtabstruct_7cytoolz_9itertoolz__join __pyx_vtable_7cytoolz_9itertoolz__join;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__join(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__join *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_7cytoolz_9itertoolz__join *)o);
  p->__pyx_vtab = __pyx_vtabptr_7cytoolz_9itertoolz__join;
  p->d = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->matches = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->seen_keys = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->leftseq = Py_None; Py_INCREF(Py_None);
  p->rightseq = Py_None; Py_INCREF(Py_None);
  p->_rightkey = Py_None; Py_INCREF(Py_None);
  p->right = Py_None; Py_INCREF(Py_None);
  p->left_default = Py_None; Py_INCREF(Py_None);
  p->right_default = Py_None; Py_INCREF(Py_None);
  p->keys = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_5_join_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__join(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__join *p = (struct __pyx_obj_7cytoolz_9itertoolz__join *)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->d);
  Py_CLEAR(p->matches);
  Py_CLEAR(p->seen_keys);
  Py_CLEAR(p->leftseq);
  Py_CLEAR(p->rightseq);
  Py_CLEAR(p->_rightkey);
  Py_CLEAR(p->right);
  Py_CLEAR(p->left_default);
  Py_CLEAR(p->right_default);
  Py_CLEAR(p->keys);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz__join(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz__join *p = (struct __pyx_obj_7cytoolz_9itertoolz__join *)o;
  if (p->d) {
    e = (*v)(p->d, a); if (e) return e;
  }
  if (p->matches) {
    e = (*v)(p->matches, a); if (e) return e;
  }
  if (p->seen_keys) {
    e = (*v)(p->seen_keys, a); if (e) return e;
  }
  if (p->leftseq) {
    e = (*v)(p->leftseq, a); if (e) return e;
  }
  if (p->rightseq) {
    e = (*v)(p->rightseq, a); if (e) return e;
  }
  if (p->_rightkey) {
    e = (*v)(p->_rightkey, a); if (e) return e;
  }
  if (p->right) {
    e = (*v)(p->right, a); if (e) return e;
  }
  if (p->left_default) {
    e = (*v)(p->left_default, a); if (e) return e;
  }
  if (p->right_default) {
    e = (*v)(p->right_default, a); if (e) return e;
  }
  if (p->keys) {
    e = (*v)(p->keys, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz__join(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__join *p = (struct __pyx_obj_7cytoolz_9itertoolz__join *)o;
  tmp = ((PyObject*)p->d);
  p->d = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->matches);
  p->matches = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->seen_keys);
  p->seen_keys = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->leftseq);
  p->leftseq = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->rightseq);
  p->rightseq = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_rightkey);
  p->_rightkey = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->right);
  p->right = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->left_default);
  p->left_default = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->right_default);
  p->right_default = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->keys);
  p->keys = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__join[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_5_join_5__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_5_join_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_5_join_7__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_5_join_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__join = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._join", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__join), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*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_vtabstruct_7cytoolz_9itertoolz__inner_join __pyx_vtable_7cytoolz_9itertoolz__inner_join;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__inner_join(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__inner_join *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__inner_join *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__inner_join;
  return o;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_11_inner_join_1__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_11_inner_join_1__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__inner_join[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_11_inner_join_1__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_inner_join_3__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_11_inner_join_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_inner_join_5__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_11_inner_join_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__inner_join = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._inner_join", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__inner_join), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  __pyx_pw_7cytoolz_9itertoolz_11_inner_join_1__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__inner_join, /*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_7cytoolz_9itertoolz__inner_join, /*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_vtabstruct_7cytoolz_9itertoolz__right_outer_join __pyx_vtable_7cytoolz_9itertoolz__right_outer_join;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__right_outer_join(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join;
  return o;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_1__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_1__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__right_outer_join[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_1__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_3__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_17_right_outer_join_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_5__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_17_right_outer_join_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__right_outer_join = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._right_outer_join", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  __pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_1__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__right_outer_join, /*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_7cytoolz_9itertoolz__right_outer_join, /*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_vtabstruct_7cytoolz_9itertoolz__left_outer_join __pyx_vtable_7cytoolz_9itertoolz__left_outer_join;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__left_outer_join(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join;
  return o;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_1__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_1__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__left_outer_join[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_1__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_3__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_16_left_outer_join_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_5__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_16_left_outer_join_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__left_outer_join = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._left_outer_join", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  __pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_1__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__left_outer_join, /*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_7cytoolz_9itertoolz__left_outer_join, /*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_vtabstruct_7cytoolz_9itertoolz__outer_join __pyx_vtable_7cytoolz_9itertoolz__outer_join;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__outer_join(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__outer_join *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__outer_join *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__outer_join;
  return o;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_11_outer_join_1__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_11_outer_join_1__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__outer_join[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_11_outer_join_1__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_outer_join_3__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_11_outer_join_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_11_outer_join_5__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_11_outer_join_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__outer_join = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._outer_join", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__outer_join), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  __pyx_pw_7cytoolz_9itertoolz_11_outer_join_1__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__outer_join, /*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_7cytoolz_9itertoolz__outer_join, /*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_vtabstruct_7cytoolz_9itertoolz__inner_join_key __pyx_vtable_7cytoolz_9itertoolz__inner_join_key;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__inner_join_key(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__inner_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__inner_join_key;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__inner_join_key[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_15_inner_join_key_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_15_inner_join_key___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_15_inner_join_key_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_15_inner_join_key_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__inner_join_key = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._inner_join_key", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__inner_join_key), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_11_inner_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__inner_join_key, /*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_7cytoolz_9itertoolz__inner_join_key, /*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_vtabstruct_7cytoolz_9itertoolz__inner_join_index __pyx_vtable_7cytoolz_9itertoolz__inner_join_index;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__inner_join_index(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__inner_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__inner_join_index;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__inner_join_index[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_inner_join_index_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_17_inner_join_index___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_inner_join_index_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_17_inner_join_index_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__inner_join_index = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._inner_join_index", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__inner_join_index), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_11_inner_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__inner_join_index, /*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_7cytoolz_9itertoolz__inner_join_index, /*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_vtabstruct_7cytoolz_9itertoolz__inner_join_indices __pyx_vtable_7cytoolz_9itertoolz__inner_join_indices;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__inner_join_indices(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__inner_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__inner_join_indices;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__inner_join_indices[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_inner_join_indices_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_19_inner_join_indices___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_inner_join_indices_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_19_inner_join_indices_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__inner_join_indices = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._inner_join_indices", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__inner_join_indices), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_11_inner_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__inner_join_indices, /*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_7cytoolz_9itertoolz__inner_join_indices, /*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_vtabstruct_7cytoolz_9itertoolz__right_outer_join_key __pyx_vtable_7cytoolz_9itertoolz__right_outer_join_key;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__right_outer_join_key(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__right_outer_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_key;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__right_outer_join_key[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_21_right_outer_join_key_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_21_right_outer_join_key___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_21_right_outer_join_key_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_21_right_outer_join_key_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__right_outer_join_key = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._right_outer_join_key", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_key), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__right_outer_join_key, /*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_7cytoolz_9itertoolz__right_outer_join_key, /*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_vtabstruct_7cytoolz_9itertoolz__right_outer_join_index __pyx_vtable_7cytoolz_9itertoolz__right_outer_join_index;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__right_outer_join_index(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__right_outer_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_index;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__right_outer_join_index[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_23_right_outer_join_index_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_23_right_outer_join_index___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_23_right_outer_join_index_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_23_right_outer_join_index_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__right_outer_join_index = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._right_outer_join_index", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_index), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__right_outer_join_index, /*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_7cytoolz_9itertoolz__right_outer_join_index, /*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_vtabstruct_7cytoolz_9itertoolz__right_outer_join_indices __pyx_vtable_7cytoolz_9itertoolz__right_outer_join_indices;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__right_outer_join_indices(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__right_outer_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_indices;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__right_outer_join_indices[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_25_right_outer_join_indices_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_25_right_outer_join_indices___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_25_right_outer_join_indices_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_25_right_outer_join_indices_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__right_outer_join_indices = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._right_outer_join_indices", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__right_outer_join_indices), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_17_right_outer_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__right_outer_join_indices, /*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_7cytoolz_9itertoolz__right_outer_join_indices, /*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_vtabstruct_7cytoolz_9itertoolz__left_outer_join_key __pyx_vtable_7cytoolz_9itertoolz__left_outer_join_key;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__left_outer_join_key(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__left_outer_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_key;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__left_outer_join_key[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_20_left_outer_join_key_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_20_left_outer_join_key___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_20_left_outer_join_key_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_20_left_outer_join_key_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__left_outer_join_key = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._left_outer_join_key", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_key), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__left_outer_join_key, /*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_7cytoolz_9itertoolz__left_outer_join_key, /*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_vtabstruct_7cytoolz_9itertoolz__left_outer_join_index __pyx_vtable_7cytoolz_9itertoolz__left_outer_join_index;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__left_outer_join_index(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__left_outer_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_index;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__left_outer_join_index[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_22_left_outer_join_index_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_22_left_outer_join_index___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_22_left_outer_join_index_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_22_left_outer_join_index_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__left_outer_join_index = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._left_outer_join_index", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_index), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__left_outer_join_index, /*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_7cytoolz_9itertoolz__left_outer_join_index, /*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_vtabstruct_7cytoolz_9itertoolz__left_outer_join_indices __pyx_vtable_7cytoolz_9itertoolz__left_outer_join_indices;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__left_outer_join_indices(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__left_outer_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_indices;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__left_outer_join_indices[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_24_left_outer_join_indices_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_24_left_outer_join_indices___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_24_left_outer_join_indices_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_24_left_outer_join_indices_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__left_outer_join_indices = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._left_outer_join_indices", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__left_outer_join_indices), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_16_left_outer_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__left_outer_join_indices, /*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_7cytoolz_9itertoolz__left_outer_join_indices, /*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_vtabstruct_7cytoolz_9itertoolz__outer_join_key __pyx_vtable_7cytoolz_9itertoolz__outer_join_key;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__outer_join_key(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__outer_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__outer_join_key;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__outer_join_key[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_15_outer_join_key_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_15_outer_join_key___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_15_outer_join_key_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_15_outer_join_key_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__outer_join_key = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._outer_join_key", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__outer_join_key), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_11_outer_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__outer_join_key, /*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_7cytoolz_9itertoolz__outer_join_key, /*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_vtabstruct_7cytoolz_9itertoolz__outer_join_index __pyx_vtable_7cytoolz_9itertoolz__outer_join_index;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__outer_join_index(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__outer_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__outer_join_index;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__outer_join_index[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_outer_join_index_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_17_outer_join_index___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_17_outer_join_index_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_17_outer_join_index_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__outer_join_index = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._outer_join_index", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__outer_join_index), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_11_outer_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__outer_join_index, /*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_7cytoolz_9itertoolz__outer_join_index, /*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_vtabstruct_7cytoolz_9itertoolz__outer_join_indices __pyx_vtable_7cytoolz_9itertoolz__outer_join_indices;

static PyObject *__pyx_tp_new_7cytoolz_9itertoolz__outer_join_indices(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices *p;
  PyObject *o = __pyx_tp_new_7cytoolz_9itertoolz__outer_join(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7cytoolz_9itertoolz__join*)__pyx_vtabptr_7cytoolz_9itertoolz__outer_join_indices;
  return o;
}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__outer_join_indices[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_outer_join_indices_1__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_19_outer_join_indices___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_19_outer_join_indices_3__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_19_outer_join_indices_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__outer_join_indices = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._outer_join_indices", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__outer_join_indices), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__join, /*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_7cytoolz_9itertoolz__join, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__join, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_5_join_3__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7cytoolz_9itertoolz_11_outer_join_1__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_7cytoolz_9itertoolz__outer_join_indices, /*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_7cytoolz_9itertoolz__outer_join_indices, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__diff_key(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__diff_key *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_7cytoolz_9itertoolz__diff_key *)o);
  p->iters = Py_None; Py_INCREF(Py_None);
  p->key = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_9_diff_key_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__diff_key(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__diff_key *p = (struct __pyx_obj_7cytoolz_9itertoolz__diff_key *)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->iters);
  Py_CLEAR(p->key);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz__diff_key(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz__diff_key *p = (struct __pyx_obj_7cytoolz_9itertoolz__diff_key *)o;
  if (p->iters) {
    e = (*v)(p->iters, a); if (e) return e;
  }
  if (p->key) {
    e = (*v)(p->key, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz__diff_key(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__diff_key *p = (struct __pyx_obj_7cytoolz_9itertoolz__diff_key *)o;
  tmp = ((PyObject*)p->iters);
  p->iters = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->key);
  p->key = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_9_diff_key_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_9_diff_key_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__diff_key[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_9_diff_key_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_9_diff_key_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_9_diff_key_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_9_diff_key_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_9_diff_key_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__diff_key = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._diff_key", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__diff_key), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__diff_key, /*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_7cytoolz_9itertoolz__diff_key, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__diff_key, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_9_diff_key_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_9_diff_key_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__diff_key, /*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_7cytoolz_9itertoolz__diff_key, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz__diff_identity(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *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_7cytoolz_9itertoolz__diff_identity *)o);
  p->iters = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz__diff_identity(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *p = (struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *)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->iters);
  (*Py_TYPE(o)->tp_free)(o);
}

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

static int __pyx_tp_clear_7cytoolz_9itertoolz__diff_identity(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *p = (struct __pyx_obj_7cytoolz_9itertoolz__diff_identity *)o;
  tmp = ((PyObject*)p->iters);
  p->iters = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_14_diff_identity_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_14_diff_identity_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz__diff_identity[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_14_diff_identity_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_14_diff_identity_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_14_diff_identity_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_14_diff_identity_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz__diff_identity = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz._diff_identity", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz__diff_identity), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz__diff_identity, /*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_7cytoolz_9itertoolz__diff_identity, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz__diff_identity, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_14_diff_identity_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_14_diff_identity_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz__diff_identity, /*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_7cytoolz_9itertoolz__diff_identity, /*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 PyObject *__pyx_tp_new_7cytoolz_9itertoolz_random_sample(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytoolz_9itertoolz_random_sample *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_7cytoolz_9itertoolz_random_sample *)o);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  p->prob = Py_None; Py_INCREF(Py_None);
  p->random_func = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7cytoolz_9itertoolz_13random_sample_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7cytoolz_9itertoolz_random_sample(PyObject *o) {
  struct __pyx_obj_7cytoolz_9itertoolz_random_sample *p = (struct __pyx_obj_7cytoolz_9itertoolz_random_sample *)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->iter_seq);
  Py_CLEAR(p->prob);
  Py_CLEAR(p->random_func);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7cytoolz_9itertoolz_random_sample(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytoolz_9itertoolz_random_sample *p = (struct __pyx_obj_7cytoolz_9itertoolz_random_sample *)o;
  if (p->iter_seq) {
    e = (*v)(p->iter_seq, a); if (e) return e;
  }
  if (p->prob) {
    e = (*v)(p->prob, a); if (e) return e;
  }
  if (p->random_func) {
    e = (*v)(p->random_func, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytoolz_9itertoolz_random_sample(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytoolz_9itertoolz_random_sample *p = (struct __pyx_obj_7cytoolz_9itertoolz_random_sample *)o;
  tmp = ((PyObject*)p->iter_seq);
  p->iter_seq = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->prob);
  p->prob = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->random_func);
  p->random_func = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_13random_sample_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_7cytoolz_9itertoolz_13random_sample_5__next__(self);}

static PyMethodDef __pyx_methods_7cytoolz_9itertoolz_random_sample[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_7cytoolz_9itertoolz_13random_sample_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13random_sample_7__reduce_cython__, METH_NOARGS, __pyx_doc_7cytoolz_9itertoolz_13random_sample_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7cytoolz_9itertoolz_13random_sample_9__setstate_cython__, METH_O, __pyx_doc_7cytoolz_9itertoolz_13random_sample_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7cytoolz_9itertoolz_random_sample = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytoolz.itertoolz.random_sample", /*tp_name*/
  sizeof(struct __pyx_obj_7cytoolz_9itertoolz_random_sample), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytoolz_9itertoolz_random_sample, /*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*/
  " random_sample(prob, seq, random_state=None)\n\n    Return elements from a sequence with probability of prob\n\n    Returns a lazy iterator of random items from seq.\n\n    ``random_sample`` considers each item independently and without\n    replacement. See below how the first time it returned 13 items and the\n    next time it returned 6 items.\n\n    >>> seq = list(range(100))\n    >>> list(random_sample(0.1, seq)) # doctest: +SKIP\n    [6, 9, 19, 35, 45, 50, 58, 62, 68, 72, 78, 86, 95]\n    >>> list(random_sample(0.1, seq)) # doctest: +SKIP\n    [6, 44, 54, 61, 69, 94]\n\n    Providing an integer seed for ``random_state`` will result in\n    deterministic sampling. Given the same seed it will return the same sample\n    every time.\n\n    >>> list(random_sample(0.1, seq, random_state=2016))\n    [7, 9, 19, 25, 30, 32, 34, 48, 59, 60, 81, 98]\n    >>> list(random_sample(0.1, seq, random_state=2016))\n    [7, 9, 19, 25, 30, 32, 34, 48, 59, 60, 81, 98]\n\n    ``random_state`` can also be any object with a method ``random`` that\n    returns floats between 0.0 and 1.0 (exclusive).\n\n    >>> from random import Random\n    >>> randobj = Random(2016)\n    >>> list(random_sample(0.1, seq, random_state=randobj))\n    [7, 9, 19, 25, 30, 32, 34, 48, 59, 60, 81, 98]\n    ", /*tp_doc*/
  __pyx_tp_traverse_7cytoolz_9itertoolz_random_sample, /*tp_traverse*/
  __pyx_tp_clear_7cytoolz_9itertoolz_random_sample, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_7cytoolz_9itertoolz_13random_sample_3__iter__, /*tp_iter*/
  __pyx_pw_7cytoolz_9itertoolz_13random_sample_5__next__, /*tp_iternext*/
  __pyx_methods_7cytoolz_9itertoolz_random_sample, /*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_7cytoolz_9itertoolz_random_sample, /*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_itertoolz(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_itertoolz},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "itertoolz",
    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_u_Add_el_to_beginning_of_possibly, __pyx_k_Add_el_to_beginning_of_possibly, sizeof(__pyx_k_Add_el_to_beginning_of_possibly), 0, 1, 0, 0},
  {&__pyx_kp_u_All_values_in_sequence_are_dist, __pyx_k_All_values_in_sequence_are_dist, sizeof(__pyx_k_All_values_in_sequence_are_dist), 0, 1, 0, 0},
  {&__pyx_kp_u_Apply_func_to_each_sequence_in, __pyx_k_Apply_func_to_each_sequence_in, sizeof(__pyx_k_Apply_func_to_each_sequence_in), 0, 1, 0, 0},
  {&__pyx_kp_u_Concatenate_zero_or_more_iterab, __pyx_k_Concatenate_zero_or_more_iterab, sizeof(__pyx_k_Concatenate_zero_or_more_iterab), 0, 1, 0, 0},
  {&__pyx_kp_u_Every_nth_item_in_seq_list_take, __pyx_k_Every_nth_item_in_seq_list_take, sizeof(__pyx_k_Every_nth_item_in_seq_list_take), 0, 1, 0, 0},
  {&__pyx_kp_u_Find_number_of_occurrences_of_e, __pyx_k_Find_number_of_occurrences_of_e, sizeof(__pyx_k_Find_number_of_occurrences_of_e), 0, 1, 0, 0},
  {&__pyx_kp_u_Find_the_k_largest_elements_of, __pyx_k_Find_the_k_largest_elements_of, sizeof(__pyx_k_Find_the_k_largest_elements_of), 0, 1, 0, 0},
  {&__pyx_kp_u_Get_element_in_a_sequence_or_di, __pyx_k_Get_element_in_a_sequence_or_di, sizeof(__pyx_k_Get_element_in_a_sequence_or_di), 0, 1, 0, 0},
  {&__pyx_kp_u_Group_a_collection_by_a_key_fun, __pyx_k_Group_a_collection_by_a_key_fun, sizeof(__pyx_k_Group_a_collection_by_a_key_fun), 0, 1, 0, 0},
  {&__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_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_kp_u_Is_x_iterable_isiterable_1_2_3, __pyx_k_Is_x_iterable_isiterable_1_2_3, sizeof(__pyx_k_Is_x_iterable_isiterable_1_2_3), 0, 1, 0, 0},
  {&__pyx_kp_u_Join_two_sequences_on_common_at, __pyx_k_Join_two_sequences_on_common_at, sizeof(__pyx_k_Join_two_sequences_on_common_at), 0, 1, 0, 0},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_kp_u_Merge_and_sort_a_collection_of, __pyx_k_Merge_and_sort_a_collection_of, sizeof(__pyx_k_Merge_and_sort_a_collection_of), 0, 1, 0, 0},
  {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1},
  {&__pyx_kp_u_Partition_sequence_into_tuples, __pyx_k_Partition_sequence_into_tuples, sizeof(__pyx_k_Partition_sequence_into_tuples), 0, 1, 0, 0},
  {&__pyx_kp_u_Perform_a_simultaneous_groupby, __pyx_k_Perform_a_simultaneous_groupby, sizeof(__pyx_k_Perform_a_simultaneous_groupby), 0, 1, 0, 0},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_Random, __pyx_k_Random, sizeof(__pyx_k_Random), 0, 0, 1, 1},
  {&__pyx_kp_u_Retrieve_the_next_element_of_a, __pyx_k_Retrieve_the_next_element_of_a, sizeof(__pyx_k_Retrieve_the_next_element_of_a), 0, 1, 0, 0},
  {&__pyx_kp_u_Retrieve_the_next_n_elements_of, __pyx_k_Retrieve_the_next_n_elements_of, sizeof(__pyx_k_Retrieve_the_next_n_elements_of), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_only_unique_elements_of, __pyx_k_Return_only_unique_elements_of, sizeof(__pyx_k_Return_only_unique_elements_of), 0, 1, 0, 0},
  {&__pyx_kp_u_Return_those_items_that_differ, __pyx_k_Return_those_items_that_differ, sizeof(__pyx_k_Return_those_items_that_differ), 0, 1, 0, 0},
  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
  {&__pyx_kp_u_The_first_element_in_a_sequence, __pyx_k_The_first_element_in_a_sequence, sizeof(__pyx_k_The_first_element_in_a_sequence), 0, 1, 0, 0},
  {&__pyx_kp_u_The_first_n_elements_of_a_seque, __pyx_k_The_first_n_elements_of_a_seque, sizeof(__pyx_k_The_first_n_elements_of_a_seque), 0, 1, 0, 0},
  {&__pyx_kp_u_The_last_element_in_a_sequence, __pyx_k_The_last_element_in_a_sequence, sizeof(__pyx_k_The_last_element_in_a_sequence), 0, 1, 0, 0},
  {&__pyx_kp_u_The_last_n_elements_of_a_sequen, __pyx_k_The_last_n_elements_of_a_sequen, sizeof(__pyx_k_The_last_n_elements_of_a_sequen), 0, 1, 0, 0},
  {&__pyx_kp_u_The_nth_element_in_a_sequence_n, __pyx_k_The_nth_element_in_a_sequence_n, sizeof(__pyx_k_The_nth_element_in_a_sequence_n), 0, 1, 0, 0},
  {&__pyx_kp_u_The_second_element_in_a_sequenc, __pyx_k_The_second_element_in_a_sequenc, sizeof(__pyx_k_The_second_element_in_a_sequenc), 0, 1, 0, 0},
  {&__pyx_kp_u_The_sequence_following_the_firs, __pyx_k_The_sequence_following_the_firs, sizeof(__pyx_k_The_sequence_following_the_firs), 0, 1, 0, 0},
  {&__pyx_kp_u_Too_few_sequences_given_min_2_re, __pyx_k_Too_few_sequences_given_min_2_re, sizeof(__pyx_k_Too_few_sequences_given_min_2_re), 0, 1, 0, 0},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_u_Variadic_version_of_concat_list, __pyx_k_Variadic_version_of_concat_list, sizeof(__pyx_k_Variadic_version_of_concat_list), 0, 1, 0, 0},
  {&__pyx_n_s_accumulate, __pyx_k_accumulate, sizeof(__pyx_k_accumulate), 0, 0, 1, 1},
  {&__pyx_n_u_accumulate, __pyx_k_accumulate, sizeof(__pyx_k_accumulate), 0, 1, 0, 1},
  {&__pyx_n_s_accumulate___reduce_cython, __pyx_k_accumulate___reduce_cython, sizeof(__pyx_k_accumulate___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_accumulate___setstate_cython, __pyx_k_accumulate___setstate_cython, sizeof(__pyx_k_accumulate___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_n_s_binop, __pyx_k_binop, sizeof(__pyx_k_binop), 0, 0, 1, 1},
  {&__pyx_n_s_chain, __pyx_k_chain, sizeof(__pyx_k_chain), 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_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_concat, __pyx_k_concat, sizeof(__pyx_k_concat), 0, 0, 1, 1},
  {&__pyx_n_u_concat, __pyx_k_concat, sizeof(__pyx_k_concat), 0, 1, 0, 1},
  {&__pyx_kp_u_concat_line_695, __pyx_k_concat_line_695, sizeof(__pyx_k_concat_line_695), 0, 1, 0, 0},
  {&__pyx_n_s_concatv, __pyx_k_concatv, sizeof(__pyx_k_concatv), 0, 0, 1, 1},
  {&__pyx_n_u_concatv, __pyx_k_concatv, sizeof(__pyx_k_concatv), 0, 1, 0, 1},
  {&__pyx_kp_u_concatv_line_714, __pyx_k_concatv_line_714, sizeof(__pyx_k_concatv_line_714), 0, 1, 0, 0},
  {&__pyx_n_s_cons, __pyx_k_cons, sizeof(__pyx_k_cons), 0, 0, 1, 1},
  {&__pyx_n_u_cons, __pyx_k_cons, sizeof(__pyx_k_cons), 0, 1, 0, 1},
  {&__pyx_kp_u_cons_line_738, __pyx_k_cons_line_738, sizeof(__pyx_k_cons_line_738), 0, 1, 0, 0},
  {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
  {&__pyx_n_u_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 1, 0, 1},
  {&__pyx_n_s_cytoolz_itertoolz, __pyx_k_cytoolz_itertoolz, sizeof(__pyx_k_cytoolz_itertoolz), 0, 0, 1, 1},
  {&__pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_k_cytoolz_itertoolz_pyx, sizeof(__pyx_k_cytoolz_itertoolz_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_cytoolz_utils, __pyx_k_cytoolz_utils, sizeof(__pyx_k_cytoolz_utils), 0, 0, 1, 1},
  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_u_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 1, 0, 1},
  {&__pyx_n_s_deque, __pyx_k_deque, sizeof(__pyx_k_deque), 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_diff, __pyx_k_diff, sizeof(__pyx_k_diff), 0, 0, 1, 1},
  {&__pyx_n_u_diff, __pyx_k_diff, sizeof(__pyx_k_diff), 0, 1, 0, 1},
  {&__pyx_n_s_diff_identity, __pyx_k_diff_identity, sizeof(__pyx_k_diff_identity), 0, 0, 1, 1},
  {&__pyx_n_s_diff_identity___reduce_cython, __pyx_k_diff_identity___reduce_cython, sizeof(__pyx_k_diff_identity___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_diff_identity___setstate_cython, __pyx_k_diff_identity___setstate_cython, sizeof(__pyx_k_diff_identity___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_diff_key, __pyx_k_diff_key, sizeof(__pyx_k_diff_key), 0, 0, 1, 1},
  {&__pyx_n_s_diff_key___reduce_cython, __pyx_k_diff_key___reduce_cython, sizeof(__pyx_k_diff_key___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_diff_key___setstate_cython, __pyx_k_diff_key___setstate_cython, sizeof(__pyx_k_diff_key___setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_u_diff_line_1623, __pyx_k_diff_line_1623, sizeof(__pyx_k_diff_line_1623), 0, 1, 0, 0},
  {&__pyx_n_s_drop, __pyx_k_drop, sizeof(__pyx_k_drop), 0, 0, 1, 1},
  {&__pyx_n_u_drop, __pyx_k_drop, sizeof(__pyx_k_drop), 0, 1, 0, 1},
  {&__pyx_kp_u_drop_line_515, __pyx_k_drop_line_515, sizeof(__pyx_k_drop_line_515), 0, 1, 0, 0},
  {&__pyx_n_s_el, __pyx_k_el, sizeof(__pyx_k_el), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_fillvalue, __pyx_k_fillvalue, sizeof(__pyx_k_fillvalue), 0, 0, 1, 1},
  {&__pyx_n_s_first, __pyx_k_first, sizeof(__pyx_k_first), 0, 0, 1, 1},
  {&__pyx_n_u_first, __pyx_k_first, sizeof(__pyx_k_first), 0, 1, 0, 1},
  {&__pyx_kp_u_first_line_549, __pyx_k_first_line_549, sizeof(__pyx_k_first_line_549), 0, 1, 0, 0},
  {&__pyx_n_s_frequencies, __pyx_k_frequencies, sizeof(__pyx_k_frequencies), 0, 0, 1, 1},
  {&__pyx_n_u_frequencies, __pyx_k_frequencies, sizeof(__pyx_k_frequencies), 0, 1, 0, 1},
  {&__pyx_kp_u_frequencies_line_778, __pyx_k_frequencies_line_778, sizeof(__pyx_k_frequencies_line_778), 0, 1, 0, 0},
  {&__pyx_n_s_from_iterable, __pyx_k_from_iterable, sizeof(__pyx_k_from_iterable), 0, 0, 1, 1},
  {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_u_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 1, 0, 1},
  {&__pyx_kp_u_get_line_617, __pyx_k_get_line_617, sizeof(__pyx_k_get_line_617), 0, 1, 0, 0},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_getter, __pyx_k_getter, sizeof(__pyx_k_getter), 0, 0, 1, 1},
  {&__pyx_n_s_getter_index, __pyx_k_getter_index, sizeof(__pyx_k_getter_index), 0, 0, 1, 1},
  {&__pyx_n_s_getter_index___reduce_cython, __pyx_k_getter_index___reduce_cython, sizeof(__pyx_k_getter_index___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_getter_index___setstate_cython, __pyx_k_getter_index___setstate_cython, sizeof(__pyx_k_getter_index___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_getter_list, __pyx_k_getter_list, sizeof(__pyx_k_getter_list), 0, 0, 1, 1},
  {&__pyx_n_s_getter_list___reduce_cython, __pyx_k_getter_list___reduce_cython, sizeof(__pyx_k_getter_list___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_getter_list___setstate_cython, __pyx_k_getter_list___setstate_cython, sizeof(__pyx_k_getter_list___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_getter_null, __pyx_k_getter_null, sizeof(__pyx_k_getter_null), 0, 0, 1, 1},
  {&__pyx_n_s_getter_null___reduce_cython, __pyx_k_getter_null___reduce_cython, sizeof(__pyx_k_getter_null___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_getter_null___setstate_cython, __pyx_k_getter_null___setstate_cython, sizeof(__pyx_k_getter_null___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_groupby, __pyx_k_groupby, sizeof(__pyx_k_groupby), 0, 0, 1, 1},
  {&__pyx_n_u_groupby, __pyx_k_groupby, sizeof(__pyx_k_groupby), 0, 1, 0, 1},
  {&__pyx_kp_u_groupby_line_116, __pyx_k_groupby_line_116, sizeof(__pyx_k_groupby_line_116), 0, 1, 0, 0},
  {&__pyx_n_s_heapify, __pyx_k_heapify, sizeof(__pyx_k_heapify), 0, 0, 1, 1},
  {&__pyx_n_s_heappop, __pyx_k_heappop, sizeof(__pyx_k_heappop), 0, 0, 1, 1},
  {&__pyx_n_s_heapq, __pyx_k_heapq, sizeof(__pyx_k_heapq), 0, 0, 1, 1},
  {&__pyx_n_s_heapreplace, __pyx_k_heapreplace, sizeof(__pyx_k_heapreplace), 0, 0, 1, 1},
  {&__pyx_n_s_identity, __pyx_k_identity, sizeof(__pyx_k_identity), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_ind, __pyx_k_ind, sizeof(__pyx_k_ind), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_initial, __pyx_k_initial, sizeof(__pyx_k_initial), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join, __pyx_k_inner_join, sizeof(__pyx_k_inner_join), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join___reduce_cython, __pyx_k_inner_join___reduce_cython, sizeof(__pyx_k_inner_join___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join___setstate_cython, __pyx_k_inner_join___setstate_cython, sizeof(__pyx_k_inner_join___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join_index, __pyx_k_inner_join_index, sizeof(__pyx_k_inner_join_index), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join_index___reduce_cytho, __pyx_k_inner_join_index___reduce_cytho, sizeof(__pyx_k_inner_join_index___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join_index___setstate_cyt, __pyx_k_inner_join_index___setstate_cyt, sizeof(__pyx_k_inner_join_index___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join_indices, __pyx_k_inner_join_indices, sizeof(__pyx_k_inner_join_indices), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join_indices___reduce_cyt, __pyx_k_inner_join_indices___reduce_cyt, sizeof(__pyx_k_inner_join_indices___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join_indices___setstate_c, __pyx_k_inner_join_indices___setstate_c, sizeof(__pyx_k_inner_join_indices___setstate_c), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join_key, __pyx_k_inner_join_key, sizeof(__pyx_k_inner_join_key), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join_key___reduce_cython, __pyx_k_inner_join_key___reduce_cython, sizeof(__pyx_k_inner_join_key___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_inner_join_key___setstate_cytho, __pyx_k_inner_join_key___setstate_cytho, sizeof(__pyx_k_inner_join_key___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_interleave, __pyx_k_interleave, sizeof(__pyx_k_interleave), 0, 0, 1, 1},
  {&__pyx_n_u_interleave, __pyx_k_interleave, sizeof(__pyx_k_interleave), 0, 1, 0, 1},
  {&__pyx_n_s_interleave___reduce_cython, __pyx_k_interleave___reduce_cython, sizeof(__pyx_k_interleave___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_interleave___setstate_cython, __pyx_k_interleave___setstate_cython, sizeof(__pyx_k_interleave___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_interpose, __pyx_k_interpose, sizeof(__pyx_k_interpose), 0, 0, 1, 1},
  {&__pyx_n_u_interpose, __pyx_k_interpose, sizeof(__pyx_k_interpose), 0, 1, 0, 1},
  {&__pyx_n_s_interpose___reduce_cython, __pyx_k_interpose___reduce_cython, sizeof(__pyx_k_interpose___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_interpose___setstate_cython, __pyx_k_interpose___setstate_cython, sizeof(__pyx_k_interpose___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_isdistinct, __pyx_k_isdistinct, sizeof(__pyx_k_isdistinct), 0, 0, 1, 1},
  {&__pyx_n_u_isdistinct, __pyx_k_isdistinct, sizeof(__pyx_k_isdistinct), 0, 1, 0, 1},
  {&__pyx_kp_u_isdistinct_line_460, __pyx_k_isdistinct_line_460, sizeof(__pyx_k_isdistinct_line_460), 0, 1, 0, 0},
  {&__pyx_n_s_isiterable, __pyx_k_isiterable, sizeof(__pyx_k_isiterable), 0, 0, 1, 1},
  {&__pyx_n_u_isiterable, __pyx_k_isiterable, sizeof(__pyx_k_isiterable), 0, 1, 0, 1},
  {&__pyx_kp_u_isiterable_line_441, __pyx_k_isiterable_line_441, sizeof(__pyx_k_isiterable_line_441), 0, 1, 0, 0},
  {&__pyx_n_s_islice, __pyx_k_islice, sizeof(__pyx_k_islice), 0, 0, 1, 1},
  {&__pyx_n_s_itemgetter, __pyx_k_itemgetter, sizeof(__pyx_k_itemgetter), 0, 0, 1, 1},
  {&__pyx_n_s_iterate, __pyx_k_iterate, sizeof(__pyx_k_iterate), 0, 0, 1, 1},
  {&__pyx_n_u_iterate, __pyx_k_iterate, sizeof(__pyx_k_iterate), 0, 1, 0, 1},
  {&__pyx_n_s_iterate___reduce_cython, __pyx_k_iterate___reduce_cython, sizeof(__pyx_k_iterate___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_iterate___setstate_cython, __pyx_k_iterate___setstate_cython, sizeof(__pyx_k_iterate___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_join_2, __pyx_k_join_2, sizeof(__pyx_k_join_2), 0, 0, 1, 1},
  {&__pyx_n_u_join_2, __pyx_k_join_2, sizeof(__pyx_k_join_2), 0, 1, 0, 1},
  {&__pyx_n_s_join___reduce_cython, __pyx_k_join___reduce_cython, sizeof(__pyx_k_join___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_join___setstate_cython, __pyx_k_join___setstate_cython, sizeof(__pyx_k_join___setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_u_join_line_1250, __pyx_k_join_line_1250, sizeof(__pyx_k_join_line_1250), 0, 1, 0, 0},
  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_u_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 1, 0, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_last, __pyx_k_last, sizeof(__pyx_k_last), 0, 0, 1, 1},
  {&__pyx_n_u_last, __pyx_k_last, sizeof(__pyx_k_last), 0, 1, 0, 1},
  {&__pyx_kp_u_last_line_589, __pyx_k_last_line_589, sizeof(__pyx_k_last_line_589), 0, 1, 0, 0},
  {&__pyx_n_s_left_default, __pyx_k_left_default, sizeof(__pyx_k_left_default), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join, __pyx_k_left_outer_join, sizeof(__pyx_k_left_outer_join), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join___reduce_cython, __pyx_k_left_outer_join___reduce_cython, sizeof(__pyx_k_left_outer_join___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join___setstate_cyth, __pyx_k_left_outer_join___setstate_cyth, sizeof(__pyx_k_left_outer_join___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join_index, __pyx_k_left_outer_join_index, sizeof(__pyx_k_left_outer_join_index), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join_index___reduce, __pyx_k_left_outer_join_index___reduce, sizeof(__pyx_k_left_outer_join_index___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join_index___setstat, __pyx_k_left_outer_join_index___setstat, sizeof(__pyx_k_left_outer_join_index___setstat), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join_indices, __pyx_k_left_outer_join_indices, sizeof(__pyx_k_left_outer_join_indices), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join_indices___reduc, __pyx_k_left_outer_join_indices___reduc, sizeof(__pyx_k_left_outer_join_indices___reduc), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join_indices___setst, __pyx_k_left_outer_join_indices___setst, sizeof(__pyx_k_left_outer_join_indices___setst), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join_key, __pyx_k_left_outer_join_key, sizeof(__pyx_k_left_outer_join_key), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join_key___reduce_cy, __pyx_k_left_outer_join_key___reduce_cy, sizeof(__pyx_k_left_outer_join_key___reduce_cy), 0, 0, 1, 1},
  {&__pyx_n_s_left_outer_join_key___setstate, __pyx_k_left_outer_join_key___setstate, sizeof(__pyx_k_left_outer_join_key___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_leftkey, __pyx_k_leftkey, sizeof(__pyx_k_leftkey), 0, 0, 1, 1},
  {&__pyx_n_s_leftseq, __pyx_k_leftseq, sizeof(__pyx_k_leftseq), 0, 0, 1, 1},
  {&__pyx_n_u_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 1, 0, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
  {&__pyx_n_s_mapcat, __pyx_k_mapcat, sizeof(__pyx_k_mapcat), 0, 0, 1, 1},
  {&__pyx_n_u_mapcat, __pyx_k_mapcat, sizeof(__pyx_k_mapcat), 0, 1, 0, 1},
  {&__pyx_kp_u_mapcat_line_727, __pyx_k_mapcat_line_727, sizeof(__pyx_k_mapcat_line_727), 0, 1, 0, 0},
  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {&__pyx_n_s_merge_sorted, __pyx_k_merge_sorted, sizeof(__pyx_k_merge_sorted), 0, 0, 1, 1},
  {&__pyx_n_s_merge_sorted_2, __pyx_k_merge_sorted_2, sizeof(__pyx_k_merge_sorted_2), 0, 0, 1, 1},
  {&__pyx_n_u_merge_sorted_2, __pyx_k_merge_sorted_2, sizeof(__pyx_k_merge_sorted_2), 0, 1, 0, 1},
  {&__pyx_n_s_merge_sorted___reduce_cython, __pyx_k_merge_sorted___reduce_cython, sizeof(__pyx_k_merge_sorted___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_merge_sorted___setstate_cython, __pyx_k_merge_sorted___setstate_cython, sizeof(__pyx_k_merge_sorted___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_merge_sorted_key, __pyx_k_merge_sorted_key, sizeof(__pyx_k_merge_sorted_key), 0, 0, 1, 1},
  {&__pyx_n_s_merge_sorted_key___reduce_cytho, __pyx_k_merge_sorted_key___reduce_cytho, sizeof(__pyx_k_merge_sorted_key___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_merge_sorted_key___setstate_cyt, __pyx_k_merge_sorted_key___setstate_cyt, sizeof(__pyx_k_merge_sorted_key___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_kp_u_merge_sorted_line_293, __pyx_k_merge_sorted_line_293, sizeof(__pyx_k_merge_sorted_line_293), 0, 1, 0, 0},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_kp_u_n_argument_for_drop_must_be_non, __pyx_k_n_argument_for_drop_must_be_non, sizeof(__pyx_k_n_argument_for_drop_must_be_non), 0, 1, 0, 0},
  {&__pyx_kp_u_n_must_be_positive_when_indexin, __pyx_k_n_must_be_positive_when_indexin, sizeof(__pyx_k_n_must_be_positive_when_indexin), 0, 1, 0, 0},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_u_no__default, __pyx_k_no__default, sizeof(__pyx_k_no__default), 0, 1, 0, 1},
  {&__pyx_n_u_no__pad, __pyx_k_no__pad, sizeof(__pyx_k_no__pad), 0, 1, 0, 1},
  {&__pyx_n_s_no_default, __pyx_k_no_default, sizeof(__pyx_k_no_default), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_no_pad, __pyx_k_no_pad, sizeof(__pyx_k_no_pad), 0, 0, 1, 1},
  {&__pyx_n_s_nth, __pyx_k_nth, sizeof(__pyx_k_nth), 0, 0, 1, 1},
  {&__pyx_n_u_nth, __pyx_k_nth, sizeof(__pyx_k_nth), 0, 1, 0, 1},
  {&__pyx_kp_u_nth_line_571, __pyx_k_nth_line_571, sizeof(__pyx_k_nth_line_571), 0, 1, 0, 0},
  {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join, __pyx_k_outer_join, sizeof(__pyx_k_outer_join), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join___reduce_cython, __pyx_k_outer_join___reduce_cython, sizeof(__pyx_k_outer_join___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join___setstate_cython, __pyx_k_outer_join___setstate_cython, sizeof(__pyx_k_outer_join___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join_index, __pyx_k_outer_join_index, sizeof(__pyx_k_outer_join_index), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join_index___reduce_cytho, __pyx_k_outer_join_index___reduce_cytho, sizeof(__pyx_k_outer_join_index___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join_index___setstate_cyt, __pyx_k_outer_join_index___setstate_cyt, sizeof(__pyx_k_outer_join_index___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join_indices, __pyx_k_outer_join_indices, sizeof(__pyx_k_outer_join_indices), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join_indices___reduce_cyt, __pyx_k_outer_join_indices___reduce_cyt, sizeof(__pyx_k_outer_join_indices___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join_indices___setstate_c, __pyx_k_outer_join_indices___setstate_c, sizeof(__pyx_k_outer_join_indices___setstate_c), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join_key, __pyx_k_outer_join_key, sizeof(__pyx_k_outer_join_key), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join_key___reduce_cython, __pyx_k_outer_join_key___reduce_cython, sizeof(__pyx_k_outer_join_key___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_outer_join_key___setstate_cytho, __pyx_k_outer_join_key___setstate_cytho, sizeof(__pyx_k_outer_join_key___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_pad, __pyx_k_pad, sizeof(__pyx_k_pad), 0, 0, 1, 1},
  {&__pyx_n_s_partition, __pyx_k_partition, sizeof(__pyx_k_partition), 0, 0, 1, 1},
  {&__pyx_n_u_partition, __pyx_k_partition, sizeof(__pyx_k_partition), 0, 1, 0, 1},
  {&__pyx_n_s_partition_all, __pyx_k_partition_all, sizeof(__pyx_k_partition_all), 0, 0, 1, 1},
  {&__pyx_n_u_partition_all, __pyx_k_partition_all, sizeof(__pyx_k_partition_all), 0, 1, 0, 1},
  {&__pyx_n_s_partition_all___reduce_cython, __pyx_k_partition_all___reduce_cython, sizeof(__pyx_k_partition_all___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_partition_all___setstate_cython, __pyx_k_partition_all___setstate_cython, sizeof(__pyx_k_partition_all___setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_u_partition_line_995, __pyx_k_partition_line_995, sizeof(__pyx_k_partition_line_995), 0, 1, 0, 0},
  {&__pyx_n_s_peek, __pyx_k_peek, sizeof(__pyx_k_peek), 0, 0, 1, 1},
  {&__pyx_n_u_peek, __pyx_k_peek, sizeof(__pyx_k_peek), 0, 1, 0, 1},
  {&__pyx_kp_u_peek_line_1721, __pyx_k_peek_line_1721, sizeof(__pyx_k_peek_line_1721), 0, 1, 0, 0},
  {&__pyx_n_s_peekn, __pyx_k_peekn, sizeof(__pyx_k_peekn), 0, 0, 1, 1},
  {&__pyx_n_u_peekn, __pyx_k_peekn, sizeof(__pyx_k_peekn), 0, 1, 0, 1},
  {&__pyx_kp_u_peekn_line_1740, __pyx_k_peekn_line_1740, sizeof(__pyx_k_peekn_line_1740), 0, 1, 0, 0},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_pluck, __pyx_k_pluck, sizeof(__pyx_k_pluck), 0, 0, 1, 1},
  {&__pyx_n_u_pluck, __pyx_k_pluck, sizeof(__pyx_k_pluck), 0, 1, 0, 1},
  {&__pyx_n_s_pluck_index, __pyx_k_pluck_index, sizeof(__pyx_k_pluck_index), 0, 0, 1, 1},
  {&__pyx_n_s_pluck_index___reduce_cython, __pyx_k_pluck_index___reduce_cython, sizeof(__pyx_k_pluck_index___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_pluck_index___setstate_cython, __pyx_k_pluck_index___setstate_cython, sizeof(__pyx_k_pluck_index___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_pluck_index_default, __pyx_k_pluck_index_default, sizeof(__pyx_k_pluck_index_default), 0, 0, 1, 1},
  {&__pyx_n_s_pluck_index_default___reduce_cy, __pyx_k_pluck_index_default___reduce_cy, sizeof(__pyx_k_pluck_index_default___reduce_cy), 0, 0, 1, 1},
  {&__pyx_n_s_pluck_index_default___setstate, __pyx_k_pluck_index_default___setstate, sizeof(__pyx_k_pluck_index_default___setstate), 0, 0, 1, 1},
  {&__pyx_kp_u_pluck_line_1174, __pyx_k_pluck_line_1174, sizeof(__pyx_k_pluck_line_1174), 0, 1, 0, 0},
  {&__pyx_n_s_pluck_list, __pyx_k_pluck_list, sizeof(__pyx_k_pluck_list), 0, 0, 1, 1},
  {&__pyx_n_s_pluck_list___reduce_cython, __pyx_k_pluck_list___reduce_cython, sizeof(__pyx_k_pluck_list___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_pluck_list___setstate_cython, __pyx_k_pluck_list___setstate_cython, sizeof(__pyx_k_pluck_list___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_pluck_list_default, __pyx_k_pluck_list_default, sizeof(__pyx_k_pluck_list_default), 0, 0, 1, 1},
  {&__pyx_n_s_pluck_list_default___reduce_cyt, __pyx_k_pluck_list_default___reduce_cyt, sizeof(__pyx_k_pluck_list_default___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_pluck_list_default___setstate_c, __pyx_k_pluck_list_default___setstate_c, sizeof(__pyx_k_pluck_list_default___setstate_c), 0, 0, 1, 1},
  {&__pyx_kp_u_plucks_an_element_or_several_el, __pyx_k_plucks_an_element_or_several_el, sizeof(__pyx_k_plucks_an_element_or_several_el), 0, 1, 0, 0},
  {&__pyx_n_s_predicate, __pyx_k_predicate, sizeof(__pyx_k_predicate), 0, 0, 1, 1},
  {&__pyx_n_s_prob, __pyx_k_prob, sizeof(__pyx_k_prob), 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__getter_null, __pyx_k_pyx_unpickle__getter_null, sizeof(__pyx_k_pyx_unpickle__getter_null), 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_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1},
  {&__pyx_n_u_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 1, 0, 1},
  {&__pyx_n_s_random_sample, __pyx_k_random_sample, sizeof(__pyx_k_random_sample), 0, 0, 1, 1},
  {&__pyx_n_u_random_sample, __pyx_k_random_sample, sizeof(__pyx_k_random_sample), 0, 1, 0, 1},
  {&__pyx_n_s_random_sample___reduce_cython, __pyx_k_random_sample___reduce_cython, sizeof(__pyx_k_random_sample___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_random_sample___setstate_cython, __pyx_k_random_sample___setstate_cython, sizeof(__pyx_k_random_sample___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_random_state, __pyx_k_random_state, sizeof(__pyx_k_random_state), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_reduceby, __pyx_k_reduceby, sizeof(__pyx_k_reduceby), 0, 0, 1, 1},
  {&__pyx_n_u_reduceby, __pyx_k_reduceby, sizeof(__pyx_k_reduceby), 0, 1, 0, 1},
  {&__pyx_kp_u_reduceby_line_815, __pyx_k_reduceby_line_815, sizeof(__pyx_k_reduceby_line_815), 0, 1, 0, 0},
  {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {&__pyx_n_u_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 1, 0, 1},
  {&__pyx_n_s_remove___reduce_cython, __pyx_k_remove___reduce_cython, sizeof(__pyx_k_remove___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_remove___setstate_cython, __pyx_k_remove___setstate_cython, sizeof(__pyx_k_remove___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_rest, __pyx_k_rest, sizeof(__pyx_k_rest), 0, 0, 1, 1},
  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
  {&__pyx_n_s_right_default, __pyx_k_right_default, sizeof(__pyx_k_right_default), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join, __pyx_k_right_outer_join, sizeof(__pyx_k_right_outer_join), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join___reduce_cytho, __pyx_k_right_outer_join___reduce_cytho, sizeof(__pyx_k_right_outer_join___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join___setstate_cyt, __pyx_k_right_outer_join___setstate_cyt, sizeof(__pyx_k_right_outer_join___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join_index, __pyx_k_right_outer_join_index, sizeof(__pyx_k_right_outer_join_index), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join_index___reduce, __pyx_k_right_outer_join_index___reduce, sizeof(__pyx_k_right_outer_join_index___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join_index___setsta, __pyx_k_right_outer_join_index___setsta, sizeof(__pyx_k_right_outer_join_index___setsta), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join_indices, __pyx_k_right_outer_join_indices, sizeof(__pyx_k_right_outer_join_indices), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join_indices___redu, __pyx_k_right_outer_join_indices___redu, sizeof(__pyx_k_right_outer_join_indices___redu), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join_indices___sets, __pyx_k_right_outer_join_indices___sets, sizeof(__pyx_k_right_outer_join_indices___sets), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join_key, __pyx_k_right_outer_join_key, sizeof(__pyx_k_right_outer_join_key), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join_key___reduce_c, __pyx_k_right_outer_join_key___reduce_c, sizeof(__pyx_k_right_outer_join_key___reduce_c), 0, 0, 1, 1},
  {&__pyx_n_s_right_outer_join_key___setstate, __pyx_k_right_outer_join_key___setstate, sizeof(__pyx_k_right_outer_join_key___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_rightkey, __pyx_k_rightkey, sizeof(__pyx_k_rightkey), 0, 0, 1, 1},
  {&__pyx_n_s_rightseq, __pyx_k_rightseq, sizeof(__pyx_k_rightseq), 0, 0, 1, 1},
  {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1},
  {&__pyx_n_u_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 1, 0, 1},
  {&__pyx_kp_u_second_line_559, __pyx_k_second_line_559, sizeof(__pyx_k_second_line_559), 0, 1, 0, 0},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_seq, __pyx_k_seq, sizeof(__pyx_k_seq), 0, 0, 1, 1},
  {&__pyx_n_s_seq1, __pyx_k_seq1, sizeof(__pyx_k_seq1), 0, 0, 1, 1},
  {&__pyx_n_s_seq2, __pyx_k_seq2, sizeof(__pyx_k_seq2), 0, 0, 1, 1},
  {&__pyx_n_s_seqs, __pyx_k_seqs, sizeof(__pyx_k_seqs), 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_sliding_window, __pyx_k_sliding_window, sizeof(__pyx_k_sliding_window), 0, 0, 1, 1},
  {&__pyx_n_u_sliding_window, __pyx_k_sliding_window, sizeof(__pyx_k_sliding_window), 0, 1, 0, 1},
  {&__pyx_n_s_sliding_window___reduce_cython, __pyx_k_sliding_window___reduce_cython, sizeof(__pyx_k_sliding_window___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_sliding_window___setstate_cython, __pyx_k_sliding_window___setstate_cython, sizeof(__pyx_k_sliding_window___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 0, 0, 1, 1},
  {&__pyx_n_u_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 0, 1, 0, 1},
  {&__pyx_kp_u_tail_line_499, __pyx_k_tail_line_499, sizeof(__pyx_k_tail_line_499), 0, 1, 0, 0},
  {&__pyx_n_s_take, __pyx_k_take, sizeof(__pyx_k_take), 0, 0, 1, 1},
  {&__pyx_n_u_take, __pyx_k_take, sizeof(__pyx_k_take), 0, 1, 0, 1},
  {&__pyx_kp_u_take_line_485, __pyx_k_take_line_485, sizeof(__pyx_k_take_line_485), 0, 1, 0, 0},
  {&__pyx_n_s_take_nth, __pyx_k_take_nth, sizeof(__pyx_k_take_nth), 0, 0, 1, 1},
  {&__pyx_n_u_take_nth, __pyx_k_take_nth, sizeof(__pyx_k_take_nth), 0, 1, 0, 1},
  {&__pyx_kp_u_take_nth_line_539, __pyx_k_take_nth_line_539, sizeof(__pyx_k_take_nth_line_539), 0, 1, 0, 0},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_topk, __pyx_k_topk, sizeof(__pyx_k_topk), 0, 0, 1, 1},
  {&__pyx_n_u_topk, __pyx_k_topk, sizeof(__pyx_k_topk), 0, 1, 0, 1},
  {&__pyx_kp_u_topk_line_1649, __pyx_k_topk_line_1649, sizeof(__pyx_k_topk_line_1649), 0, 1, 0, 0},
  {&__pyx_n_s_unique, __pyx_k_unique, sizeof(__pyx_k_unique), 0, 0, 1, 1},
  {&__pyx_n_u_unique, __pyx_k_unique, sizeof(__pyx_k_unique), 0, 1, 0, 1},
  {&__pyx_n_s_unique_identity, __pyx_k_unique_identity, sizeof(__pyx_k_unique_identity), 0, 0, 1, 1},
  {&__pyx_n_s_unique_identity___reduce_cython, __pyx_k_unique_identity___reduce_cython, sizeof(__pyx_k_unique_identity___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_unique_identity___setstate_cyth, __pyx_k_unique_identity___setstate_cyth, sizeof(__pyx_k_unique_identity___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_unique_key, __pyx_k_unique_key, sizeof(__pyx_k_unique_key), 0, 0, 1, 1},
  {&__pyx_n_s_unique_key___reduce_cython, __pyx_k_unique_key___reduce_cython, sizeof(__pyx_k_unique_key___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_unique_key___setstate_cython, __pyx_k_unique_key___setstate_cython, sizeof(__pyx_k_unique_key___setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_u_unique_line_421, __pyx_k_unique_line_421, sizeof(__pyx_k_unique_line_421), 0, 1, 0, 0},
  {&__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_val2, __pyx_k_val2, sizeof(__pyx_k_val2), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {&__pyx_n_s_zip_longest, __pyx_k_zip_longest, sizeof(__pyx_k_zip_longest), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 613, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 613, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 613, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 153, __pyx_L1_error)
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 180, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 527, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 660, __pyx_L1_error)
  __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 735, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1016, __pyx_L1_error)
  __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 1683, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "cytoolz/itertoolz.pyx":527
 *     """
 *     if n < 0:
 *         raise ValueError('n argument for drop() must be non-negative')             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     cdef object iter_seq
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_n_argument_for_drop_must_be_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "cytoolz/itertoolz.pyx":581
 *         return seq[n]
 *     if n < 0:
 *         raise ValueError('"n" must be positive when indexing an iterator')             # <<<<<<<<<<<<<<
 *     seq = iter(seq)
 *     while n > 0:
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_n_must_be_positive_when_indexin); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "cytoolz/itertoolz.pyx":1570
 *         self.N = len(seqs)
 *         if self.N < 2:
 *             raise TypeError('Too few sequences given (min 2 required)')             # <<<<<<<<<<<<<<
 *         if default == no_default:
 *             self.iters = zip(*seqs)
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_u_Too_few_sequences_given_min_2_re); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_tuple__83 = PyTuple_Pack(3, __pyx_int_222419149, __pyx_int_238750788, __pyx_int_228825662); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "cytoolz/itertoolz.pyx":28
 * 
 * 
 * cpdef object identity(object x):             # <<<<<<<<<<<<<<
 *     return x
 * 
 */
  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_n_s_x); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_identity, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 28, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__88 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__92 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":116
 * 
 * 
 * cpdef dict groupby(object key, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Group a collection by a key function
 */
  __pyx_tuple__94 = PyTuple_Pack(2, __pyx_n_s_key, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_groupby, 116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 116, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(1, 1, __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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__98 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(1, 1, __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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__102 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 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_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":293
 * 
 * 
 * def merge_sorted(*seqs, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Merge and sort a collection of sorted collections
 */
  __pyx_tuple__104 = PyTuple_Pack(2, __pyx_n_s_seqs, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__105 = (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__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_merge_sorted_2, 293, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 293, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__106 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__108 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__110 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__112 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__114 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__116 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":421
 * 
 * 
 * cpdef object unique(object seq, object key=None):             # <<<<<<<<<<<<<<
 *     """
 *     Return only unique elements of a sequence
 */
  __pyx_tuple__118 = PyTuple_Pack(2, __pyx_n_s_seq, __pyx_n_s_key); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_unique, 421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 421, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":441
 * 
 * 
 * cpdef object isiterable(object x):             # <<<<<<<<<<<<<<
 *     """
 *     Is x iterable?
 */
  __pyx_tuple__120 = PyTuple_Pack(1, __pyx_n_s_x); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_isiterable, 441, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 441, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":460
 * 
 * 
 * cpdef object isdistinct(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     All values in sequence are distinct
 */
  __pyx_tuple__122 = PyTuple_Pack(1, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_isdistinct, 460, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 460, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":485
 * 
 * 
 * cpdef object take(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The first n elements of a sequence
 */
  __pyx_tuple__124 = PyTuple_Pack(2, __pyx_n_s_n, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_cytoolz_itertoolz_pyx, __pyx_n_s_take, 485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 485, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":499
 * 
 * 
 * cpdef object tail(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The last n elements of a sequence
 */
  __pyx_tuple__126 = PyTuple_Pack(2, __pyx_n_s_n, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_cytoolz_itertoolz_pyx, __pyx_n_s_tail, 499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 499, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":515
 * 
 * 
 * cpdef object drop(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The sequence following the first n elements
 */
  __pyx_tuple__128 = PyTuple_Pack(2, __pyx_n_s_n, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_cytoolz_itertoolz_pyx, __pyx_n_s_drop, 515, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 515, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":539
 * 
 * 
 * cpdef object take_nth(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Every nth item in seq
 */
  __pyx_tuple__130 = PyTuple_Pack(2, __pyx_n_s_n, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_cytoolz_itertoolz_pyx, __pyx_n_s_take_nth, 539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 539, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":549
 * 
 * 
 * cpdef object first(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The first element in a sequence
 */
  __pyx_tuple__132 = PyTuple_Pack(1, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_cytoolz_itertoolz_pyx, __pyx_n_s_first, 549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 549, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":559
 * 
 * 
 * cpdef object second(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The second element in a sequence
 */
  __pyx_tuple__134 = PyTuple_Pack(1, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_cytoolz_itertoolz_pyx, __pyx_n_s_second, 559, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 559, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":571
 * 
 * 
 * cpdef object nth(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The nth element in a sequence
 */
  __pyx_tuple__136 = PyTuple_Pack(2, __pyx_n_s_n, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_nth, 571, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 571, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":589
 * 
 * 
 * cpdef object last(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The last element in a sequence
 */
  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_cytoolz_itertoolz_pyx, __pyx_n_s_last, 589, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 589, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":607
 * 
 * 
 * cpdef object rest(object seq):             # <<<<<<<<<<<<<<
 *     seq = iter(seq)
 *     next(seq)
 */
  __pyx_tuple__140 = PyTuple_Pack(1, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_rest, 607, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 607, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":613
 * 
 * 
 * cdef tuple _get_exceptions = (IndexError, KeyError, TypeError)             # <<<<<<<<<<<<<<
 * cdef tuple _get_list_exc = (IndexError, KeyError)
 * 
 */
  __pyx_tuple__142 = PyTuple_Pack(3, __pyx_builtin_IndexError, __pyx_builtin_KeyError, __pyx_builtin_TypeError); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "cytoolz/itertoolz.pyx":614
 * 
 * cdef tuple _get_exceptions = (IndexError, KeyError, TypeError)
 * cdef tuple _get_list_exc = (IndexError, KeyError)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__143 = PyTuple_Pack(2, __pyx_builtin_IndexError, __pyx_builtin_KeyError); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);

  /* "cytoolz/itertoolz.pyx":617
 * 
 * 
 * cpdef object get(object ind, object seq, object default='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     Get element in a sequence or dict
 */
  __pyx_tuple__144 = PyTuple_Pack(3, __pyx_n_s_ind, __pyx_n_s_seq, __pyx_n_s_default); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_get, 617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 617, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":695
 * 
 * 
 * cpdef object concat(object seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate zero or more iterables, any of which may be infinite.
 */
  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_n_s_seqs); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_concat, 695, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 695, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":714
 * 
 * 
 * def concatv(*seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Variadic version of concat
 */
  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_n_s_seqs); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_concatv, 714, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 714, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":727
 * 
 * 
 * cpdef object mapcat(object func, object seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Apply func to each sequence in seqs, concatenating results.
 */
  __pyx_tuple__150 = PyTuple_Pack(2, __pyx_n_s_func, __pyx_n_s_seqs); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_mapcat, 727, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 727, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":738
 * 
 * 
 * cpdef object cons(object el, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Add el to beginning of (possibly infinite) sequence seq.
 */
  __pyx_tuple__152 = PyTuple_Pack(2, __pyx_n_s_el, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_cons, 738, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 738, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__154 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__156 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":778
 * 
 * 
 * cpdef dict frequencies(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Find number of occurrences of each value in seq
 */
  __pyx_tuple__158 = PyTuple_Pack(1, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_frequencies, 778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 778, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":815
 * 
 * 
 * cpdef dict reduceby(object key, object binop, object seq, object init='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     Perform a simultaneous groupby and reduction
 */
  __pyx_tuple__160 = PyTuple_Pack(4, __pyx_n_s_key, __pyx_n_s_binop, __pyx_n_s_seq, __pyx_n_s_init); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_reduceby, 815, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 815, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__162 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__164 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__166 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__168 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":995
 * 
 * 
 * cpdef object partition(Py_ssize_t n, object seq, object pad='__no__pad__'):             # <<<<<<<<<<<<<<
 *     """
 *     Partition sequence into tuples of length n
 */
  __pyx_tuple__170 = PyTuple_Pack(3, __pyx_n_s_n, __pyx_n_s_seq, __pyx_n_s_pad); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_partition, 995, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 995, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__172 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__174 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":1064
 * 
 * 
 * cpdef object count(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Count the number of items in seq
 */
  __pyx_tuple__176 = PyTuple_Pack(1, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_count, 1064, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 1064, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__178 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__180 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__184 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__186 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__188 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__190 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__192 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);
  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":1174
 * 
 * 
 * cpdef object pluck(object ind, object seqs, object default='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     plucks an element or several elements from each item in a sequence.
 */
  __pyx_tuple__194 = PyTuple_Pack(3, __pyx_n_s_ind, __pyx_n_s_seqs, __pyx_n_s_default); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_pluck, 1174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 1174, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__196 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__198 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__200 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);
  __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__202 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);
  __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__204 = 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__204)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);
  __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__getter_null, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__getter_null__set_state(self, __pyx_state)
 */
  __pyx_tuple__206 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);
  __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":1240
 * 
 * # TODO: benchmark getters (and compare against itemgetter)
 * cpdef object getter(object index):             # <<<<<<<<<<<<<<
 *     if isinstance(index, list):
 *         if PyList_GET_SIZE(index) == 0:
 */
  __pyx_tuple__208 = PyTuple_Pack(1, __pyx_n_s_index); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_getter, 1240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 1240, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":1250
 * 
 * 
 * cpdef object join(object leftkey, object leftseq,             # <<<<<<<<<<<<<<
 *                   object rightkey, object rightseq,
 *                   object left_default='__no__default__',
 */
  __pyx_tuple__210 = PyTuple_Pack(6, __pyx_n_s_leftkey, __pyx_n_s_leftseq, __pyx_n_s_rightkey, __pyx_n_s_rightseq, __pyx_n_s_left_default, __pyx_n_s_right_default); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);
  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_join_2, 1250, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 1250, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__212 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);
  __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__214 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);
  __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__216 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);
  __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__218 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);
  __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__220 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);
  __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__222 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);
  __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__224 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);
  __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__226 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);
  __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__228 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);
  __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__230 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);
  __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__232 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);
  __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__234 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);
  __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__236 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);
  __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__238 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);
  __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__240 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);
  __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__242 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__242);
  __Pyx_GIVEREF(__pyx_tuple__242);
  __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__244 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);
  __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__246 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);
  __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__248 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);
  __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__250 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);
  __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__252 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);
  __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__254 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);
  __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__256 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);
  __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__258 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);
  __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__260 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);
  __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__262 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);
  __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__264 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);
  __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__266 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);
  __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__268 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);
  __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__270 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);
  __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__272 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__272);
  __Pyx_GIVEREF(__pyx_tuple__272);
  __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__274 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__274);
  __Pyx_GIVEREF(__pyx_tuple__274);
  __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__276 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__276);
  __Pyx_GIVEREF(__pyx_tuple__276);
  __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__278 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__278);
  __Pyx_GIVEREF(__pyx_tuple__278);
  __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__280 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);
  __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__282 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__282);
  __Pyx_GIVEREF(__pyx_tuple__282);
  __pyx_codeobj__283 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__283)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__284 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__284);
  __Pyx_GIVEREF(__pyx_tuple__284);
  __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__286 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__286);
  __Pyx_GIVEREF(__pyx_tuple__286);
  __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":1623
 * 
 * 
 * def diff(*seqs, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Return those items that differ between sequences
 */
  __pyx_tuple__288 = PyTuple_Pack(5, __pyx_n_s_seqs, __pyx_n_s_kwargs, __pyx_n_s_N, __pyx_n_s_default, __pyx_n_s_key); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);
  __pyx_codeobj__289 = (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__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_diff, 1623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(0, 1623, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":1649
 * 
 * 
 * cpdef object topk(Py_ssize_t k, object seq, object key=None):             # <<<<<<<<<<<<<<
 *     """
 *     Find the k largest elements of a sequence
 */
  __pyx_tuple__290 = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_seq, __pyx_n_s_key); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);
  __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_topk, 1649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(0, 1649, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":1721
 * 
 * 
 * cpdef object peek(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Retrieve the next element of a sequence
 */
  __pyx_tuple__292 = PyTuple_Pack(1, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 1721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__292);
  __Pyx_GIVEREF(__pyx_tuple__292);
  __pyx_codeobj__293 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_peek, 1721, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__293)) __PYX_ERR(0, 1721, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":1740
 * 
 * 
 * cpdef object peekn(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Retrieve the next n elements of a sequence
 */
  __pyx_tuple__294 = PyTuple_Pack(2, __pyx_n_s_n, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__294);
  __Pyx_GIVEREF(__pyx_tuple__294);
  __pyx_codeobj__295 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cytoolz_itertoolz_pyx, __pyx_n_s_peekn, 1740, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__295)) __PYX_ERR(0, 1740, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__296 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__296);
  __Pyx_GIVEREF(__pyx_tuple__296);
  __pyx_codeobj__297 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__297)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__298 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__298);
  __Pyx_GIVEREF(__pyx_tuple__298);
  __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle__getter_null(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__300 = 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__300)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__300);
  __Pyx_GIVEREF(__pyx_tuple__300);
  __pyx_codeobj__301 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__300, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__getter_null, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_228825662 = PyInt_FromLong(228825662L); if (unlikely(!__pyx_int_228825662)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_238750788 = PyInt_FromLong(238750788L); if (unlikely(!__pyx_int_238750788)) __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_v_7cytoolz_9itertoolz__get_exceptions = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7cytoolz_9itertoolz__get_list_exc = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("groupby", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_groupby, "PyObject *(PyObject *, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("c_merge_sorted", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_c_merge_sorted, "PyObject *(PyObject *, struct __pyx_opt_args_7cytoolz_9itertoolz_c_merge_sorted *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("unique", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_unique, "PyObject *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_unique *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("isiterable", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_isiterable, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("isdistinct", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_isdistinct, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("take", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_take, "PyObject *(Py_ssize_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("tail", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_tail, "PyObject *(Py_ssize_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("drop", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_drop, "PyObject *(Py_ssize_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("take_nth", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_take_nth, "PyObject *(Py_ssize_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("first", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_first, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("second", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_second, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("nth", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_nth, "PyObject *(Py_ssize_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("last", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_last, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("rest", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_rest, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("get", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_get, "PyObject *(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_get *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cons", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_cons, "PyObject *(PyObject *, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("concat", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_concat, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("mapcat", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_mapcat, "PyObject *(PyObject *, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("frequencies", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_frequencies, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("reduceby", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_reduceby, "PyObject *(PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_reduceby *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("partition", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_partition, "PyObject *(Py_ssize_t, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_partition *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("count", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_count, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("pluck", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_pluck, "PyObject *(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_pluck *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("getter", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_getter, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("join", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_join, "PyObject *(PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_join *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("c_diff", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_c_diff, "PyObject *(PyObject *, struct __pyx_opt_args_7cytoolz_9itertoolz_c_diff *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("topk", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_topk, "PyObject *(Py_ssize_t, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytoolz_9itertoolz_topk *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("peek", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_peek, "PyObject *(PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("peekn", (void (*)(void))__pyx_f_7cytoolz_9itertoolz_peekn, "PyObject *(Py_ssize_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz_remove) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz_remove.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz_remove.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz_remove.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz_remove.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_remove, (PyObject *)&__pyx_type_7cytoolz_9itertoolz_remove) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz_remove) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz_remove = &__pyx_type_7cytoolz_9itertoolz_remove;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz_accumulate) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz_accumulate.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz_accumulate.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz_accumulate.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz_accumulate.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_accumulate, (PyObject *)&__pyx_type_7cytoolz_9itertoolz_accumulate) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz_accumulate) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz_accumulate = &__pyx_type_7cytoolz_9itertoolz_accumulate;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__merge_sorted) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__merge_sorted.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__merge_sorted.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__merge_sorted.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__merge_sorted.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_merge_sorted, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__merge_sorted) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__merge_sorted) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__merge_sorted = &__pyx_type_7cytoolz_9itertoolz__merge_sorted;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__merge_sorted_key) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__merge_sorted_key.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__merge_sorted_key.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__merge_sorted_key.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__merge_sorted_key.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_merge_sorted_key, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__merge_sorted_key) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__merge_sorted_key) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__merge_sorted_key = &__pyx_type_7cytoolz_9itertoolz__merge_sorted_key;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz_interleave) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz_interleave.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz_interleave.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz_interleave.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz_interleave.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_interleave, (PyObject *)&__pyx_type_7cytoolz_9itertoolz_interleave) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz_interleave) < 0) __PYX_ERR(0, 315, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz_interleave = &__pyx_type_7cytoolz_9itertoolz_interleave;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__unique_key) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__unique_key.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__unique_key.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__unique_key.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__unique_key.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_unique_key, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__unique_key) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__unique_key) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__unique_key = &__pyx_type_7cytoolz_9itertoolz__unique_key;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__unique_identity) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__unique_identity.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__unique_identity.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__unique_identity.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__unique_identity.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_unique_identity, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__unique_identity) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__unique_identity) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__unique_identity = &__pyx_type_7cytoolz_9itertoolz__unique_identity;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz_interpose) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz_interpose.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz_interpose.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz_interpose.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz_interpose.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_interpose, (PyObject *)&__pyx_type_7cytoolz_9itertoolz_interpose) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz_interpose) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz_interpose = &__pyx_type_7cytoolz_9itertoolz_interpose;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz_iterate) < 0) __PYX_ERR(0, 903, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz_iterate.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz_iterate.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz_iterate.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz_iterate.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_iterate, (PyObject *)&__pyx_type_7cytoolz_9itertoolz_iterate) < 0) __PYX_ERR(0, 903, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz_iterate) < 0) __PYX_ERR(0, 903, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz_iterate = &__pyx_type_7cytoolz_9itertoolz_iterate;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz_sliding_window) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz_sliding_window.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz_sliding_window.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz_sliding_window.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz_sliding_window.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_sliding_window, (PyObject *)&__pyx_type_7cytoolz_9itertoolz_sliding_window) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz_sliding_window) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz_sliding_window = &__pyx_type_7cytoolz_9itertoolz_sliding_window;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz_partition_all) < 0) __PYX_ERR(0, 1021, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz_partition_all.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz_partition_all.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz_partition_all.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz_partition_all.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_partition_all, (PyObject *)&__pyx_type_7cytoolz_9itertoolz_partition_all) < 0) __PYX_ERR(0, 1021, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz_partition_all) < 0) __PYX_ERR(0, 1021, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz_partition_all = &__pyx_type_7cytoolz_9itertoolz_partition_all;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__pluck_index) < 0) __PYX_ERR(0, 1083, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__pluck_index.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__pluck_index.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__pluck_index.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__pluck_index.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pluck_index, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__pluck_index) < 0) __PYX_ERR(0, 1083, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__pluck_index) < 0) __PYX_ERR(0, 1083, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__pluck_index = &__pyx_type_7cytoolz_9itertoolz__pluck_index;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__pluck_index_default) < 0) __PYX_ERR(0, 1096, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__pluck_index_default.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__pluck_index_default.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__pluck_index_default.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__pluck_index_default.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pluck_index_default, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__pluck_index_default) < 0) __PYX_ERR(0, 1096, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__pluck_index_default) < 0) __PYX_ERR(0, 1096, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__pluck_index_default = &__pyx_type_7cytoolz_9itertoolz__pluck_index_default;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__pluck_list) < 0) __PYX_ERR(0, 1121, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__pluck_list.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__pluck_list.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__pluck_list.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__pluck_list.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pluck_list, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__pluck_list) < 0) __PYX_ERR(0, 1121, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__pluck_list) < 0) __PYX_ERR(0, 1121, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__pluck_list = &__pyx_type_7cytoolz_9itertoolz__pluck_list;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__pluck_list_default) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__pluck_list_default.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__pluck_list_default.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__pluck_list_default.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__pluck_list_default.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pluck_list_default, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__pluck_list_default) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__pluck_list_default) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__pluck_list_default = &__pyx_type_7cytoolz_9itertoolz__pluck_list_default;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__getter_index) < 0) __PYX_ERR(0, 1209, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__getter_index.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__getter_index.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__getter_index.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__getter_index.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_getter_index, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__getter_index) < 0) __PYX_ERR(0, 1209, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__getter_index) < 0) __PYX_ERR(0, 1209, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__getter_index = &__pyx_type_7cytoolz_9itertoolz__getter_index;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__getter_list) < 0) __PYX_ERR(0, 1217, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__getter_list.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__getter_list.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__getter_list.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__getter_list.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_getter_list, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__getter_list) < 0) __PYX_ERR(0, 1217, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__getter_list) < 0) __PYX_ERR(0, 1217, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__getter_list = &__pyx_type_7cytoolz_9itertoolz__getter_list;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__getter_null) < 0) __PYX_ERR(0, 1234, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__getter_null.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__getter_null.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__getter_null.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__getter_null.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_getter_null, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__getter_null) < 0) __PYX_ERR(0, 1234, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__getter_null) < 0) __PYX_ERR(0, 1234, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__getter_null = &__pyx_type_7cytoolz_9itertoolz__getter_null;
  __pyx_vtabptr_7cytoolz_9itertoolz__join = &__pyx_vtable_7cytoolz_9itertoolz__join;
  __pyx_vtable_7cytoolz_9itertoolz__join.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_5_join_rightkey;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__join) < 0) __PYX_ERR(0, 1353, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__join.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__join.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__join.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__join.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__join.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__join) < 0) __PYX_ERR(0, 1353, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_join, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__join) < 0) __PYX_ERR(0, 1353, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__join) < 0) __PYX_ERR(0, 1353, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__join = &__pyx_type_7cytoolz_9itertoolz__join;
  __pyx_vtabptr_7cytoolz_9itertoolz__inner_join = &__pyx_vtable_7cytoolz_9itertoolz__inner_join;
  __pyx_vtable_7cytoolz_9itertoolz__inner_join.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__join;
  __pyx_type_7cytoolz_9itertoolz__inner_join.tp_base = __pyx_ptype_7cytoolz_9itertoolz__join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__inner_join) < 0) __PYX_ERR(0, 1530, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__inner_join.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__inner_join.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__inner_join.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__inner_join.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__inner_join.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__inner_join) < 0) __PYX_ERR(0, 1530, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_inner_join, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__inner_join) < 0) __PYX_ERR(0, 1530, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__inner_join) < 0) __PYX_ERR(0, 1530, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__inner_join = &__pyx_type_7cytoolz_9itertoolz__inner_join;
  __pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join = &__pyx_vtable_7cytoolz_9itertoolz__right_outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__right_outer_join.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__join;
  __pyx_type_7cytoolz_9itertoolz__right_outer_join.tp_base = __pyx_ptype_7cytoolz_9itertoolz__join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__right_outer_join) < 0) __PYX_ERR(0, 1381, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__right_outer_join.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__right_outer_join.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__right_outer_join.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__right_outer_join.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__right_outer_join.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join) < 0) __PYX_ERR(0, 1381, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_right_outer_join, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__right_outer_join) < 0) __PYX_ERR(0, 1381, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__right_outer_join) < 0) __PYX_ERR(0, 1381, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__right_outer_join = &__pyx_type_7cytoolz_9itertoolz__right_outer_join;
  __pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join = &__pyx_vtable_7cytoolz_9itertoolz__left_outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__left_outer_join.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__join;
  __pyx_type_7cytoolz_9itertoolz__left_outer_join.tp_base = __pyx_ptype_7cytoolz_9itertoolz__join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__left_outer_join) < 0) __PYX_ERR(0, 1474, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__left_outer_join.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__left_outer_join.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__left_outer_join.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__left_outer_join.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__left_outer_join.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join) < 0) __PYX_ERR(0, 1474, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_left_outer_join, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__left_outer_join) < 0) __PYX_ERR(0, 1474, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__left_outer_join) < 0) __PYX_ERR(0, 1474, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__left_outer_join = &__pyx_type_7cytoolz_9itertoolz__left_outer_join;
  __pyx_vtabptr_7cytoolz_9itertoolz__outer_join = &__pyx_vtable_7cytoolz_9itertoolz__outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__outer_join.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__join;
  __pyx_type_7cytoolz_9itertoolz__outer_join.tp_base = __pyx_ptype_7cytoolz_9itertoolz__join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__outer_join) < 0) __PYX_ERR(0, 1418, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__outer_join.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__outer_join.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__outer_join.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__outer_join.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__outer_join.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__outer_join) < 0) __PYX_ERR(0, 1418, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_outer_join, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__outer_join) < 0) __PYX_ERR(0, 1418, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__outer_join) < 0) __PYX_ERR(0, 1418, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__outer_join = &__pyx_type_7cytoolz_9itertoolz__outer_join;
  __pyx_vtabptr_7cytoolz_9itertoolz__inner_join_key = &__pyx_vtable_7cytoolz_9itertoolz__inner_join_key;
  __pyx_vtable_7cytoolz_9itertoolz__inner_join_key.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__inner_join;
  __pyx_vtable_7cytoolz_9itertoolz__inner_join_key.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_15_inner_join_key_rightkey;
  __pyx_type_7cytoolz_9itertoolz__inner_join_key.tp_base = __pyx_ptype_7cytoolz_9itertoolz__inner_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__inner_join_key) < 0) __PYX_ERR(0, 1545, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__inner_join_key.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__inner_join_key.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__inner_join_key.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__inner_join_key.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__inner_join_key.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__inner_join_key) < 0) __PYX_ERR(0, 1545, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_inner_join_key, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__inner_join_key) < 0) __PYX_ERR(0, 1545, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__inner_join_key) < 0) __PYX_ERR(0, 1545, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__inner_join_key = &__pyx_type_7cytoolz_9itertoolz__inner_join_key;
  __pyx_vtabptr_7cytoolz_9itertoolz__inner_join_index = &__pyx_vtable_7cytoolz_9itertoolz__inner_join_index;
  __pyx_vtable_7cytoolz_9itertoolz__inner_join_index.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__inner_join;
  __pyx_vtable_7cytoolz_9itertoolz__inner_join_index.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_17_inner_join_index_rightkey;
  __pyx_type_7cytoolz_9itertoolz__inner_join_index.tp_base = __pyx_ptype_7cytoolz_9itertoolz__inner_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__inner_join_index) < 0) __PYX_ERR(0, 1550, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__inner_join_index.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__inner_join_index.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__inner_join_index.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__inner_join_index.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__inner_join_index.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__inner_join_index) < 0) __PYX_ERR(0, 1550, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_inner_join_index, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__inner_join_index) < 0) __PYX_ERR(0, 1550, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__inner_join_index) < 0) __PYX_ERR(0, 1550, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__inner_join_index = &__pyx_type_7cytoolz_9itertoolz__inner_join_index;
  __pyx_vtabptr_7cytoolz_9itertoolz__inner_join_indices = &__pyx_vtable_7cytoolz_9itertoolz__inner_join_indices;
  __pyx_vtable_7cytoolz_9itertoolz__inner_join_indices.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__inner_join;
  __pyx_vtable_7cytoolz_9itertoolz__inner_join_indices.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_19_inner_join_indices_rightkey;
  __pyx_type_7cytoolz_9itertoolz__inner_join_indices.tp_base = __pyx_ptype_7cytoolz_9itertoolz__inner_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__inner_join_indices) < 0) __PYX_ERR(0, 1555, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__inner_join_indices.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__inner_join_indices.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__inner_join_indices.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__inner_join_indices.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__inner_join_indices.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__inner_join_indices) < 0) __PYX_ERR(0, 1555, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_inner_join_indices, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__inner_join_indices) < 0) __PYX_ERR(0, 1555, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__inner_join_indices) < 0) __PYX_ERR(0, 1555, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__inner_join_indices = &__pyx_type_7cytoolz_9itertoolz__inner_join_indices;
  __pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_key = &__pyx_vtable_7cytoolz_9itertoolz__right_outer_join_key;
  __pyx_vtable_7cytoolz_9itertoolz__right_outer_join_key.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__right_outer_join_key.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_21_right_outer_join_key_rightkey;
  __pyx_type_7cytoolz_9itertoolz__right_outer_join_key.tp_base = __pyx_ptype_7cytoolz_9itertoolz__right_outer_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__right_outer_join_key) < 0) __PYX_ERR(0, 1397, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__right_outer_join_key.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__right_outer_join_key.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__right_outer_join_key.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__right_outer_join_key.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__right_outer_join_key.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_key) < 0) __PYX_ERR(0, 1397, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_right_outer_join_key, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__right_outer_join_key) < 0) __PYX_ERR(0, 1397, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__right_outer_join_key) < 0) __PYX_ERR(0, 1397, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__right_outer_join_key = &__pyx_type_7cytoolz_9itertoolz__right_outer_join_key;
  __pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_index = &__pyx_vtable_7cytoolz_9itertoolz__right_outer_join_index;
  __pyx_vtable_7cytoolz_9itertoolz__right_outer_join_index.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__right_outer_join_index.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_23_right_outer_join_index_rightkey;
  __pyx_type_7cytoolz_9itertoolz__right_outer_join_index.tp_base = __pyx_ptype_7cytoolz_9itertoolz__right_outer_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__right_outer_join_index) < 0) __PYX_ERR(0, 1402, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__right_outer_join_index.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__right_outer_join_index.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__right_outer_join_index.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__right_outer_join_index.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__right_outer_join_index.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_index) < 0) __PYX_ERR(0, 1402, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_right_outer_join_index, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__right_outer_join_index) < 0) __PYX_ERR(0, 1402, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__right_outer_join_index) < 0) __PYX_ERR(0, 1402, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__right_outer_join_index = &__pyx_type_7cytoolz_9itertoolz__right_outer_join_index;
  __pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_indices = &__pyx_vtable_7cytoolz_9itertoolz__right_outer_join_indices;
  __pyx_vtable_7cytoolz_9itertoolz__right_outer_join_indices.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__right_outer_join_indices.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_25_right_outer_join_indices_rightkey;
  __pyx_type_7cytoolz_9itertoolz__right_outer_join_indices.tp_base = __pyx_ptype_7cytoolz_9itertoolz__right_outer_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__right_outer_join_indices) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__right_outer_join_indices.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__right_outer_join_indices.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__right_outer_join_indices.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__right_outer_join_indices.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__right_outer_join_indices.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__right_outer_join_indices) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_right_outer_join_indices, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__right_outer_join_indices) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__right_outer_join_indices) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__right_outer_join_indices = &__pyx_type_7cytoolz_9itertoolz__right_outer_join_indices;
  __pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_key = &__pyx_vtable_7cytoolz_9itertoolz__left_outer_join_key;
  __pyx_vtable_7cytoolz_9itertoolz__left_outer_join_key.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__left_outer_join_key.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_20_left_outer_join_key_rightkey;
  __pyx_type_7cytoolz_9itertoolz__left_outer_join_key.tp_base = __pyx_ptype_7cytoolz_9itertoolz__left_outer_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__left_outer_join_key) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__left_outer_join_key.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__left_outer_join_key.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__left_outer_join_key.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__left_outer_join_key.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__left_outer_join_key.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_key) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_left_outer_join_key, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__left_outer_join_key) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__left_outer_join_key) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__left_outer_join_key = &__pyx_type_7cytoolz_9itertoolz__left_outer_join_key;
  __pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_index = &__pyx_vtable_7cytoolz_9itertoolz__left_outer_join_index;
  __pyx_vtable_7cytoolz_9itertoolz__left_outer_join_index.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__left_outer_join_index.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_22_left_outer_join_index_rightkey;
  __pyx_type_7cytoolz_9itertoolz__left_outer_join_index.tp_base = __pyx_ptype_7cytoolz_9itertoolz__left_outer_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__left_outer_join_index) < 0) __PYX_ERR(0, 1514, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__left_outer_join_index.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__left_outer_join_index.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__left_outer_join_index.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__left_outer_join_index.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__left_outer_join_index.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_index) < 0) __PYX_ERR(0, 1514, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_left_outer_join_index, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__left_outer_join_index) < 0) __PYX_ERR(0, 1514, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__left_outer_join_index) < 0) __PYX_ERR(0, 1514, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__left_outer_join_index = &__pyx_type_7cytoolz_9itertoolz__left_outer_join_index;
  __pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_indices = &__pyx_vtable_7cytoolz_9itertoolz__left_outer_join_indices;
  __pyx_vtable_7cytoolz_9itertoolz__left_outer_join_indices.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__left_outer_join_indices.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_24_left_outer_join_indices_rightkey;
  __pyx_type_7cytoolz_9itertoolz__left_outer_join_indices.tp_base = __pyx_ptype_7cytoolz_9itertoolz__left_outer_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__left_outer_join_indices) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__left_outer_join_indices.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__left_outer_join_indices.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__left_outer_join_indices.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__left_outer_join_indices.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__left_outer_join_indices.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__left_outer_join_indices) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_left_outer_join_indices, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__left_outer_join_indices) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__left_outer_join_indices) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__left_outer_join_indices = &__pyx_type_7cytoolz_9itertoolz__left_outer_join_indices;
  __pyx_vtabptr_7cytoolz_9itertoolz__outer_join_key = &__pyx_vtable_7cytoolz_9itertoolz__outer_join_key;
  __pyx_vtable_7cytoolz_9itertoolz__outer_join_key.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__outer_join_key.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_15_outer_join_key_rightkey;
  __pyx_type_7cytoolz_9itertoolz__outer_join_key.tp_base = __pyx_ptype_7cytoolz_9itertoolz__outer_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__outer_join_key) < 0) __PYX_ERR(0, 1453, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__outer_join_key.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__outer_join_key.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__outer_join_key.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__outer_join_key.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__outer_join_key.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__outer_join_key) < 0) __PYX_ERR(0, 1453, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_outer_join_key, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__outer_join_key) < 0) __PYX_ERR(0, 1453, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__outer_join_key) < 0) __PYX_ERR(0, 1453, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__outer_join_key = &__pyx_type_7cytoolz_9itertoolz__outer_join_key;
  __pyx_vtabptr_7cytoolz_9itertoolz__outer_join_index = &__pyx_vtable_7cytoolz_9itertoolz__outer_join_index;
  __pyx_vtable_7cytoolz_9itertoolz__outer_join_index.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__outer_join_index.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_17_outer_join_index_rightkey;
  __pyx_type_7cytoolz_9itertoolz__outer_join_index.tp_base = __pyx_ptype_7cytoolz_9itertoolz__outer_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__outer_join_index) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__outer_join_index.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__outer_join_index.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__outer_join_index.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__outer_join_index.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__outer_join_index.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__outer_join_index) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_outer_join_index, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__outer_join_index) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__outer_join_index) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__outer_join_index = &__pyx_type_7cytoolz_9itertoolz__outer_join_index;
  __pyx_vtabptr_7cytoolz_9itertoolz__outer_join_indices = &__pyx_vtable_7cytoolz_9itertoolz__outer_join_indices;
  __pyx_vtable_7cytoolz_9itertoolz__outer_join_indices.__pyx_base = *__pyx_vtabptr_7cytoolz_9itertoolz__outer_join;
  __pyx_vtable_7cytoolz_9itertoolz__outer_join_indices.__pyx_base.__pyx_base.rightkey = (PyObject *(*)(struct __pyx_obj_7cytoolz_9itertoolz__join *))__pyx_f_7cytoolz_9itertoolz_19_outer_join_indices_rightkey;
  __pyx_type_7cytoolz_9itertoolz__outer_join_indices.tp_base = __pyx_ptype_7cytoolz_9itertoolz__outer_join;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__outer_join_indices) < 0) __PYX_ERR(0, 1463, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__outer_join_indices.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__outer_join_indices.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__outer_join_indices.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__outer_join_indices.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_7cytoolz_9itertoolz__outer_join_indices.tp_dict, __pyx_vtabptr_7cytoolz_9itertoolz__outer_join_indices) < 0) __PYX_ERR(0, 1463, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_outer_join_indices, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__outer_join_indices) < 0) __PYX_ERR(0, 1463, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__outer_join_indices) < 0) __PYX_ERR(0, 1463, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__outer_join_indices = &__pyx_type_7cytoolz_9itertoolz__outer_join_indices;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__diff_key) < 0) __PYX_ERR(0, 1566, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__diff_key.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__diff_key.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__diff_key.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__diff_key.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_diff_key, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__diff_key) < 0) __PYX_ERR(0, 1566, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__diff_key) < 0) __PYX_ERR(0, 1566, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__diff_key = &__pyx_type_7cytoolz_9itertoolz__diff_key;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz__diff_identity) < 0) __PYX_ERR(0, 1591, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz__diff_identity.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz__diff_identity.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz__diff_identity.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz__diff_identity.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_diff_identity, (PyObject *)&__pyx_type_7cytoolz_9itertoolz__diff_identity) < 0) __PYX_ERR(0, 1591, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz__diff_identity) < 0) __PYX_ERR(0, 1591, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz__diff_identity = &__pyx_type_7cytoolz_9itertoolz__diff_identity;
  if (PyType_Ready(&__pyx_type_7cytoolz_9itertoolz_random_sample) < 0) __PYX_ERR(0, 1759, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7cytoolz_9itertoolz_random_sample.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7cytoolz_9itertoolz_random_sample.tp_dictoffset && __pyx_type_7cytoolz_9itertoolz_random_sample.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7cytoolz_9itertoolz_random_sample.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_random_sample, (PyObject *)&__pyx_type_7cytoolz_9itertoolz_random_sample) < 0) __PYX_ERR(0, 1759, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7cytoolz_9itertoolz_random_sample) < 0) __PYX_ERR(0, 1759, __pyx_L1_error)
  __pyx_ptype_7cytoolz_9itertoolz_random_sample = &__pyx_type_7cytoolz_9itertoolz_random_sample;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __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 inititertoolz(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC inititertoolz(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_itertoolz(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_itertoolz(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_itertoolz(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'itertoolz' 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_itertoolz(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("itertoolz", __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_cytoolz__itertoolz) {
    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, "cytoolz.itertoolz")) {
      if (unlikely(PyDict_SetItemString(modules, "cytoolz.itertoolz", __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();
  if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (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

  /* "cytoolz/itertoolz.pyx":13
 * from cytoolz.cpython cimport PtrIter_Next, PtrObject_GetItem
 * 
 * from collections import deque             # <<<<<<<<<<<<<<
 * from heapq import heapify, heappop, heapreplace
 * from itertools import chain, islice, zip_longest
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_deque);
  __Pyx_GIVEREF(__pyx_n_s_deque);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_deque);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_deque, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":14
 * 
 * from collections import deque
 * from heapq import heapify, heappop, heapreplace             # <<<<<<<<<<<<<<
 * from itertools import chain, islice, zip_longest
 * from operator import itemgetter
 */
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_heapify);
  __Pyx_GIVEREF(__pyx_n_s_heapify);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_heapify);
  __Pyx_INCREF(__pyx_n_s_heappop);
  __Pyx_GIVEREF(__pyx_n_s_heappop);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_heappop);
  __Pyx_INCREF(__pyx_n_s_heapreplace);
  __Pyx_GIVEREF(__pyx_n_s_heapreplace);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_heapreplace);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_heapq, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_heapify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_heapify, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_heappop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_heappop, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_heapreplace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_heapreplace, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":15
 * from collections import deque
 * from heapq import heapify, heappop, heapreplace
 * from itertools import chain, islice, zip_longest             # <<<<<<<<<<<<<<
 * from operator import itemgetter
 * from cytoolz.utils import no_default
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_chain);
  __Pyx_GIVEREF(__pyx_n_s_chain);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_chain);
  __Pyx_INCREF(__pyx_n_s_islice);
  __Pyx_GIVEREF(__pyx_n_s_islice);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_islice);
  __Pyx_INCREF(__pyx_n_s_zip_longest);
  __Pyx_GIVEREF(__pyx_n_s_zip_longest);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_zip_longest);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __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_chain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chain, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_islice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_islice, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_zip_longest); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_zip_longest, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":16
 * from heapq import heapify, heappop, heapreplace
 * from itertools import chain, islice, zip_longest
 * from operator import itemgetter             # <<<<<<<<<<<<<<
 * from cytoolz.utils import no_default
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_itemgetter);
  __Pyx_GIVEREF(__pyx_n_s_itemgetter);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_itemgetter);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_operator, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __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_itemgetter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itemgetter, __pyx_t_2) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytoolz/itertoolz.pyx":17
 * from itertools import chain, islice, zip_longest
 * from operator import itemgetter
 * from cytoolz.utils import no_default             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_no_default);
  __Pyx_GIVEREF(__pyx_n_s_no_default);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_no_default);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_cytoolz_utils, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __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_no_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_no_default, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":20
 * 
 * 
 * __all__ = ['remove', 'accumulate', 'groupby', 'merge_sorted', 'interleave',             # <<<<<<<<<<<<<<
 *            'unique', 'isiterable', 'isdistinct', 'take', 'drop', 'take_nth',
 *            'first', 'second', 'nth', 'last', 'get', 'concat', 'concatv',
 */
  __pyx_t_2 = PyList_New(36); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_remove);
  __Pyx_GIVEREF(__pyx_n_u_remove);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_remove);
  __Pyx_INCREF(__pyx_n_u_accumulate);
  __Pyx_GIVEREF(__pyx_n_u_accumulate);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_accumulate);
  __Pyx_INCREF(__pyx_n_u_groupby);
  __Pyx_GIVEREF(__pyx_n_u_groupby);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_groupby);
  __Pyx_INCREF(__pyx_n_u_merge_sorted_2);
  __Pyx_GIVEREF(__pyx_n_u_merge_sorted_2);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_merge_sorted_2);
  __Pyx_INCREF(__pyx_n_u_interleave);
  __Pyx_GIVEREF(__pyx_n_u_interleave);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_u_interleave);
  __Pyx_INCREF(__pyx_n_u_unique);
  __Pyx_GIVEREF(__pyx_n_u_unique);
  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_u_unique);
  __Pyx_INCREF(__pyx_n_u_isiterable);
  __Pyx_GIVEREF(__pyx_n_u_isiterable);
  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_u_isiterable);
  __Pyx_INCREF(__pyx_n_u_isdistinct);
  __Pyx_GIVEREF(__pyx_n_u_isdistinct);
  PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_u_isdistinct);
  __Pyx_INCREF(__pyx_n_u_take);
  __Pyx_GIVEREF(__pyx_n_u_take);
  PyList_SET_ITEM(__pyx_t_2, 8, __pyx_n_u_take);
  __Pyx_INCREF(__pyx_n_u_drop);
  __Pyx_GIVEREF(__pyx_n_u_drop);
  PyList_SET_ITEM(__pyx_t_2, 9, __pyx_n_u_drop);
  __Pyx_INCREF(__pyx_n_u_take_nth);
  __Pyx_GIVEREF(__pyx_n_u_take_nth);
  PyList_SET_ITEM(__pyx_t_2, 10, __pyx_n_u_take_nth);
  __Pyx_INCREF(__pyx_n_u_first);
  __Pyx_GIVEREF(__pyx_n_u_first);
  PyList_SET_ITEM(__pyx_t_2, 11, __pyx_n_u_first);
  __Pyx_INCREF(__pyx_n_u_second);
  __Pyx_GIVEREF(__pyx_n_u_second);
  PyList_SET_ITEM(__pyx_t_2, 12, __pyx_n_u_second);
  __Pyx_INCREF(__pyx_n_u_nth);
  __Pyx_GIVEREF(__pyx_n_u_nth);
  PyList_SET_ITEM(__pyx_t_2, 13, __pyx_n_u_nth);
  __Pyx_INCREF(__pyx_n_u_last);
  __Pyx_GIVEREF(__pyx_n_u_last);
  PyList_SET_ITEM(__pyx_t_2, 14, __pyx_n_u_last);
  __Pyx_INCREF(__pyx_n_u_get);
  __Pyx_GIVEREF(__pyx_n_u_get);
  PyList_SET_ITEM(__pyx_t_2, 15, __pyx_n_u_get);
  __Pyx_INCREF(__pyx_n_u_concat);
  __Pyx_GIVEREF(__pyx_n_u_concat);
  PyList_SET_ITEM(__pyx_t_2, 16, __pyx_n_u_concat);
  __Pyx_INCREF(__pyx_n_u_concatv);
  __Pyx_GIVEREF(__pyx_n_u_concatv);
  PyList_SET_ITEM(__pyx_t_2, 17, __pyx_n_u_concatv);
  __Pyx_INCREF(__pyx_n_u_mapcat);
  __Pyx_GIVEREF(__pyx_n_u_mapcat);
  PyList_SET_ITEM(__pyx_t_2, 18, __pyx_n_u_mapcat);
  __Pyx_INCREF(__pyx_n_u_cons);
  __Pyx_GIVEREF(__pyx_n_u_cons);
  PyList_SET_ITEM(__pyx_t_2, 19, __pyx_n_u_cons);
  __Pyx_INCREF(__pyx_n_u_interpose);
  __Pyx_GIVEREF(__pyx_n_u_interpose);
  PyList_SET_ITEM(__pyx_t_2, 20, __pyx_n_u_interpose);
  __Pyx_INCREF(__pyx_n_u_frequencies);
  __Pyx_GIVEREF(__pyx_n_u_frequencies);
  PyList_SET_ITEM(__pyx_t_2, 21, __pyx_n_u_frequencies);
  __Pyx_INCREF(__pyx_n_u_reduceby);
  __Pyx_GIVEREF(__pyx_n_u_reduceby);
  PyList_SET_ITEM(__pyx_t_2, 22, __pyx_n_u_reduceby);
  __Pyx_INCREF(__pyx_n_u_iterate);
  __Pyx_GIVEREF(__pyx_n_u_iterate);
  PyList_SET_ITEM(__pyx_t_2, 23, __pyx_n_u_iterate);
  __Pyx_INCREF(__pyx_n_u_sliding_window);
  __Pyx_GIVEREF(__pyx_n_u_sliding_window);
  PyList_SET_ITEM(__pyx_t_2, 24, __pyx_n_u_sliding_window);
  __Pyx_INCREF(__pyx_n_u_partition);
  __Pyx_GIVEREF(__pyx_n_u_partition);
  PyList_SET_ITEM(__pyx_t_2, 25, __pyx_n_u_partition);
  __Pyx_INCREF(__pyx_n_u_partition_all);
  __Pyx_GIVEREF(__pyx_n_u_partition_all);
  PyList_SET_ITEM(__pyx_t_2, 26, __pyx_n_u_partition_all);
  __Pyx_INCREF(__pyx_n_u_count);
  __Pyx_GIVEREF(__pyx_n_u_count);
  PyList_SET_ITEM(__pyx_t_2, 27, __pyx_n_u_count);
  __Pyx_INCREF(__pyx_n_u_pluck);
  __Pyx_GIVEREF(__pyx_n_u_pluck);
  PyList_SET_ITEM(__pyx_t_2, 28, __pyx_n_u_pluck);
  __Pyx_INCREF(__pyx_n_u_join_2);
  __Pyx_GIVEREF(__pyx_n_u_join_2);
  PyList_SET_ITEM(__pyx_t_2, 29, __pyx_n_u_join_2);
  __Pyx_INCREF(__pyx_n_u_tail);
  __Pyx_GIVEREF(__pyx_n_u_tail);
  PyList_SET_ITEM(__pyx_t_2, 30, __pyx_n_u_tail);
  __Pyx_INCREF(__pyx_n_u_diff);
  __Pyx_GIVEREF(__pyx_n_u_diff);
  PyList_SET_ITEM(__pyx_t_2, 31, __pyx_n_u_diff);
  __Pyx_INCREF(__pyx_n_u_topk);
  __Pyx_GIVEREF(__pyx_n_u_topk);
  PyList_SET_ITEM(__pyx_t_2, 32, __pyx_n_u_topk);
  __Pyx_INCREF(__pyx_n_u_peek);
  __Pyx_GIVEREF(__pyx_n_u_peek);
  PyList_SET_ITEM(__pyx_t_2, 33, __pyx_n_u_peek);
  __Pyx_INCREF(__pyx_n_u_peekn);
  __Pyx_GIVEREF(__pyx_n_u_peekn);
  PyList_SET_ITEM(__pyx_t_2, 34, __pyx_n_u_peekn);
  __Pyx_INCREF(__pyx_n_u_random_sample);
  __Pyx_GIVEREF(__pyx_n_u_random_sample);
  PyList_SET_ITEM(__pyx_t_2, 35, __pyx_n_u_random_sample);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":28
 * 
 * 
 * cpdef object identity(object x):             # <<<<<<<<<<<<<<
 *     return x
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_1identity, 0, __pyx_n_s_identity, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_identity, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_6remove_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_remove___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_6remove_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_remove___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_10accumulate_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_accumulate___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_10accumulate_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_accumulate___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":116
 * 
 * 
 * cpdef dict groupby(object key, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Group a collection by a key function
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_3groupby, 0, __pyx_n_s_groupby, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupby, __pyx_t_2) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_13_merge_sorted_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_merge_sorted___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_13_merge_sorted_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_merge_sorted___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_17_merge_sorted_key_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_merge_sorted_key___reduce_cytho, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_17_merge_sorted_key_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_merge_sorted_key___setstate_cyt, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":293
 * 
 * 
 * def merge_sorted(*seqs, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Merge and sort a collection of sorted collections
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_5merge_sorted, 0, __pyx_n_s_merge_sorted_2, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_merge_sorted_2, __pyx_t_2) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_10interleave_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_interleave___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_10interleave_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_interleave___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_11_unique_key_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_unique_key___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_11_unique_key_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_unique_key___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_16_unique_identity_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_unique_identity___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_16_unique_identity_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_unique_identity___setstate_cyth, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":421
 * 
 * 
 * cpdef object unique(object seq, object key=None):             # <<<<<<<<<<<<<<
 *     """
 *     Return only unique elements of a sequence
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_7unique, 0, __pyx_n_s_unique, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_unique, __pyx_t_2) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":441
 * 
 * 
 * cpdef object isiterable(object x):             # <<<<<<<<<<<<<<
 *     """
 *     Is x iterable?
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_9isiterable, 0, __pyx_n_s_isiterable, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isiterable, __pyx_t_2) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":460
 * 
 * 
 * cpdef object isdistinct(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     All values in sequence are distinct
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_11isdistinct, 0, __pyx_n_s_isdistinct, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isdistinct, __pyx_t_2) < 0) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":485
 * 
 * 
 * cpdef object take(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The first n elements of a sequence
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_13take, 0, __pyx_n_s_take, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_take, __pyx_t_2) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":499
 * 
 * 
 * cpdef object tail(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The last n elements of a sequence
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_15tail, 0, __pyx_n_s_tail, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tail, __pyx_t_2) < 0) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":515
 * 
 * 
 * cpdef object drop(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The sequence following the first n elements
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_17drop, 0, __pyx_n_s_drop, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_drop, __pyx_t_2) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":539
 * 
 * 
 * cpdef object take_nth(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Every nth item in seq
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_19take_nth, 0, __pyx_n_s_take_nth, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_take_nth, __pyx_t_2) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":549
 * 
 * 
 * cpdef object first(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The first element in a sequence
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_21first, 0, __pyx_n_s_first, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_first, __pyx_t_2) < 0) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":559
 * 
 * 
 * cpdef object second(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The second element in a sequence
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_23second, 0, __pyx_n_s_second, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_second, __pyx_t_2) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":571
 * 
 * 
 * cpdef object nth(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The nth element in a sequence
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_25nth, 0, __pyx_n_s_nth, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nth, __pyx_t_2) < 0) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":589
 * 
 * 
 * cpdef object last(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     The last element in a sequence
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_27last, 0, __pyx_n_s_last, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_last, __pyx_t_2) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":607
 * 
 * 
 * cpdef object rest(object seq):             # <<<<<<<<<<<<<<
 *     seq = iter(seq)
 *     next(seq)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_29rest, 0, __pyx_n_s_rest, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rest, __pyx_t_2) < 0) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":613
 * 
 * 
 * cdef tuple _get_exceptions = (IndexError, KeyError, TypeError)             # <<<<<<<<<<<<<<
 * cdef tuple _get_list_exc = (IndexError, KeyError)
 * 
 */
  __Pyx_INCREF(__pyx_tuple__142);
  __Pyx_XGOTREF(__pyx_v_7cytoolz_9itertoolz__get_exceptions);
  __Pyx_DECREF_SET(__pyx_v_7cytoolz_9itertoolz__get_exceptions, __pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "cytoolz/itertoolz.pyx":614
 * 
 * cdef tuple _get_exceptions = (IndexError, KeyError, TypeError)
 * cdef tuple _get_list_exc = (IndexError, KeyError)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_tuple__143);
  __Pyx_XGOTREF(__pyx_v_7cytoolz_9itertoolz__get_list_exc);
  __Pyx_DECREF_SET(__pyx_v_7cytoolz_9itertoolz__get_list_exc, __pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);

  /* "cytoolz/itertoolz.pyx":617
 * 
 * 
 * cpdef object get(object ind, object seq, object default='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     Get element in a sequence or dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_31get, 0, __pyx_n_s_get, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get, __pyx_t_2) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":695
 * 
 * 
 * cpdef object concat(object seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Concatenate zero or more iterables, any of which may be infinite.
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_33concat, 0, __pyx_n_s_concat, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_concat, __pyx_t_2) < 0) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":714
 * 
 * 
 * def concatv(*seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Variadic version of concat
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_35concatv, 0, __pyx_n_s_concatv, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_concatv, __pyx_t_2) < 0) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":727
 * 
 * 
 * cpdef object mapcat(object func, object seqs):             # <<<<<<<<<<<<<<
 *     """
 *     Apply func to each sequence in seqs, concatenating results.
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_37mapcat, 0, __pyx_n_s_mapcat, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mapcat, __pyx_t_2) < 0) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":738
 * 
 * 
 * cpdef object cons(object el, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Add el to beginning of (possibly infinite) sequence seq.
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_39cons, 0, __pyx_n_s_cons, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cons, __pyx_t_2) < 0) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_9interpose_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_interpose___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_9interpose_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_interpose___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":778
 * 
 * 
 * cpdef dict frequencies(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Find number of occurrences of each value in seq
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_41frequencies, 0, __pyx_n_s_frequencies, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_frequencies, __pyx_t_2) < 0) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":815
 * 
 * 
 * cpdef dict reduceby(object key, object binop, object seq, object init='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     Perform a simultaneous groupby and reduction
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_43reduceby, 0, __pyx_n_s_reduceby, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduceby, __pyx_t_2) < 0) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_7iterate_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_iterate___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_7iterate_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_iterate___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_14sliding_window_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_sliding_window___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_14sliding_window_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_sliding_window___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":992
 * 
 * 
 * no_pad = '__no__pad__'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_no_pad, __pyx_n_u_no__pad) < 0) __PYX_ERR(0, 992, __pyx_L1_error)

  /* "cytoolz/itertoolz.pyx":995
 * 
 * 
 * cpdef object partition(Py_ssize_t n, object seq, object pad='__no__pad__'):             # <<<<<<<<<<<<<<
 *     """
 *     Partition sequence into tuples of length n
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_45partition, 0, __pyx_n_s_partition, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_partition, __pyx_t_2) < 0) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_13partition_all_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_partition_all___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_13partition_all_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_partition_all___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1064
 * 
 * 
 * cpdef object count(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Count the number of items in seq
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_47count, 0, __pyx_n_s_count, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_count, __pyx_t_2) < 0) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_12_pluck_index_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pluck_index___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_12_pluck_index_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pluck_index___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_20_pluck_index_default_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pluck_index_default___reduce_cy, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_20_pluck_index_default_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pluck_index_default___setstate, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_11_pluck_list_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pluck_list___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_11_pluck_list_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pluck_list___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_19_pluck_list_default_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pluck_list_default___reduce_cyt, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_19_pluck_list_default_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pluck_list_default___setstate_c, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1174
 * 
 * 
 * cpdef object pluck(object ind, object seqs, object default='__no__default__'):             # <<<<<<<<<<<<<<
 *     """
 *     plucks an element or several elements from each item in a sequence.
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_49pluck, 0, __pyx_n_s_pluck, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pluck, __pyx_t_2) < 0) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_13_getter_index_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_getter_index___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_13_getter_index_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_getter_index___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_12_getter_list_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_getter_list___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_12_getter_list_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_getter_list___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_12_getter_null_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_getter_null___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__getter_null->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_7cytoolz_9itertoolz__getter_null);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__getter_null, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__getter_null__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_12_getter_null_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_getter_null___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7cytoolz_9itertoolz__getter_null->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_7cytoolz_9itertoolz__getter_null);

  /* "cytoolz/itertoolz.pyx":1240
 * 
 * # TODO: benchmark getters (and compare against itemgetter)
 * cpdef object getter(object index):             # <<<<<<<<<<<<<<
 *     if isinstance(index, list):
 *         if PyList_GET_SIZE(index) == 0:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_51getter, 0, __pyx_n_s_getter, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getter, __pyx_t_2) < 0) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1250
 * 
 * 
 * cpdef object join(object leftkey, object leftseq,             # <<<<<<<<<<<<<<
 *                   object rightkey, object rightseq,
 *                   object left_default='__no__default__',
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_53join, 0, __pyx_n_s_join_2, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_join_2, __pyx_t_2) < 0) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1357
 *                   object leftkey, object leftseq,
 *                   object rightkey, object rightseq,
 *                   object left_default=no_default,             # <<<<<<<<<<<<<<
 *                   object right_default=no_default):
 *         self.left_default = left_default
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__37 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1358
 *                   object rightkey, object rightseq,
 *                   object left_default=no_default,
 *                   object right_default=no_default):             # <<<<<<<<<<<<<<
 *         self.left_default = left_default
 *         self.right_default = right_default
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__38 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_5_join_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_join___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_5_join_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_join___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_17_right_outer_join_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_right_outer_join___reduce_cytho, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_17_right_outer_join_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_right_outer_join___setstate_cyt, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_21_right_outer_join_key_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_right_outer_join_key___reduce_c, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_21_right_outer_join_key_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_right_outer_join_key___setstate, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_23_right_outer_join_index_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_right_outer_join_index___reduce, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_23_right_outer_join_index_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_right_outer_join_index___setsta, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_25_right_outer_join_indices_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_right_outer_join_indices___redu, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_25_right_outer_join_indices_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_right_outer_join_indices___sets, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_11_outer_join_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_outer_join___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_11_outer_join_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_outer_join___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_15_outer_join_key_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_outer_join_key___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_15_outer_join_key_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_outer_join_key___setstate_cytho, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_17_outer_join_index_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_outer_join_index___reduce_cytho, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_17_outer_join_index_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_outer_join_index___setstate_cyt, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_19_outer_join_indices_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_outer_join_indices___reduce_cyt, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_19_outer_join_indices_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_outer_join_indices___setstate_c, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_16_left_outer_join_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_left_outer_join___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_16_left_outer_join_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_left_outer_join___setstate_cyth, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_20_left_outer_join_key_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_left_outer_join_key___reduce_cy, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_20_left_outer_join_key_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_left_outer_join_key___setstate, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_22_left_outer_join_index_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_left_outer_join_index___reduce, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_22_left_outer_join_index_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_left_outer_join_index___setstat, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_24_left_outer_join_indices_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_left_outer_join_indices___reduc, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_24_left_outer_join_indices_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_left_outer_join_indices___setst, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_11_inner_join_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_inner_join___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_11_inner_join_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_inner_join___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_15_inner_join_key_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_inner_join_key___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_15_inner_join_key_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_inner_join_key___setstate_cytho, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_17_inner_join_index_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_inner_join_index___reduce_cytho, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__273)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_17_inner_join_index_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_inner_join_index___setstate_cyt, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_19_inner_join_indices_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_inner_join_indices___reduce_cyt, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_19_inner_join_indices_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_inner_join_indices___setstate_c, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1567
 * 
 * cdef class _diff_key:
 *     def __cinit__(self, object seqs, object key, object default=no_default):             # <<<<<<<<<<<<<<
 *         self.N = len(seqs)
 *         if self.N < 2:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__73 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_9_diff_key_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_diff_key___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_9_diff_key_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_diff_key___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__283)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1592
 * 
 * cdef class _diff_identity:
 *     def __cinit__(self, object seqs, object default=no_default):             # <<<<<<<<<<<<<<
 *         self.N = len(seqs)
 *         if self.N < 2:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__77 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_14_diff_identity_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_diff_identity___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_14_diff_identity_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_diff_identity___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1616
 * 
 * 
 * cdef object c_diff(object seqs, object default=no_default, object key=None):             # <<<<<<<<<<<<<<
 *     if key is None:
 *         return _diff_identity(seqs, default=default)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_no_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__80 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1623
 * 
 * 
 * def diff(*seqs, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Return those items that differ between sequences
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_55diff, 0, __pyx_n_s_diff, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_diff, __pyx_t_2) < 0) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1649
 * 
 * 
 * cpdef object topk(Py_ssize_t k, object seq, object key=None):             # <<<<<<<<<<<<<<
 *     """
 *     Find the k largest elements of a sequence
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_57topk, 0, __pyx_n_s_topk, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_topk, __pyx_t_2) < 0) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1721
 * 
 * 
 * cpdef object peek(object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Retrieve the next element of a sequence
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_59peek, 0, __pyx_n_s_peek, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__293)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_peek, __pyx_t_2) < 0) __PYX_ERR(0, 1721, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1740
 * 
 * 
 * cpdef object peekn(Py_ssize_t n, object seq):             # <<<<<<<<<<<<<<
 *     """
 *     Retrieve the next n elements of a sequence
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_61peekn, 0, __pyx_n_s_peekn, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__295)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_peekn, __pyx_t_2) < 0) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_13random_sample_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_random_sample___reduce_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__297)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_13random_sample_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_random_sample___setstate_cython, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__299)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__getter_null(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytoolz_9itertoolz_63__pyx_unpickle__getter_null, 0, __pyx_n_s_pyx_unpickle__getter_null, NULL, __pyx_n_s_cytoolz_itertoolz, __pyx_d, ((PyObject *)__pyx_codeobj__301)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__getter_null, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytoolz/itertoolz.pyx":1
 * from cpython.dict cimport PyDict_GetItem, PyDict_SetItem             # <<<<<<<<<<<<<<
 * from cpython.exc cimport PyErr_Clear, PyErr_GivenExceptionMatches, PyErr_Occurred
 * from cpython.list cimport PyList_Append, PyList_GET_ITEM, PyList_GET_SIZE
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(27); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_groupby_line_116, __pyx_kp_u_Group_a_collection_by_a_key_fun) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_merge_sorted_line_293, __pyx_kp_u_Merge_and_sort_a_collection_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_unique_line_421, __pyx_kp_u_Return_only_unique_elements_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_isiterable_line_441, __pyx_kp_u_Is_x_iterable_isiterable_1_2_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_isdistinct_line_460, __pyx_kp_u_All_values_in_sequence_are_dist) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_take_line_485, __pyx_kp_u_The_first_n_elements_of_a_seque) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tail_line_499, __pyx_kp_u_The_last_n_elements_of_a_sequen) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_drop_line_515, __pyx_kp_u_The_sequence_following_the_firs) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_take_nth_line_539, __pyx_kp_u_Every_nth_item_in_seq_list_take) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_first_line_549, __pyx_kp_u_The_first_element_in_a_sequence) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_second_line_559, __pyx_kp_u_The_second_element_in_a_sequenc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_nth_line_571, __pyx_kp_u_The_nth_element_in_a_sequence_n) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_last_line_589, __pyx_kp_u_The_last_element_in_a_sequence) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_get_line_617, __pyx_kp_u_Get_element_in_a_sequence_or_di) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_concat_line_695, __pyx_kp_u_Concatenate_zero_or_more_iterab) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_concatv_line_714, __pyx_kp_u_Variadic_version_of_concat_list) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_mapcat_line_727, __pyx_kp_u_Apply_func_to_each_sequence_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cons_line_738, __pyx_kp_u_Add_el_to_beginning_of_possibly) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_frequencies_line_778, __pyx_kp_u_Find_number_of_occurrences_of_e) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_reduceby_line_815, __pyx_kp_u_Perform_a_simultaneous_groupby) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_partition_line_995, __pyx_kp_u_Partition_sequence_into_tuples) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pluck_line_1174, __pyx_kp_u_plucks_an_element_or_several_el) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_join_line_1250, __pyx_kp_u_Join_two_sequences_on_common_at) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_diff_line_1623, __pyx_kp_u_Return_those_items_that_differ) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_topk_line_1649, __pyx_kp_u_Find_the_k_largest_elements_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_peek_line_1721, __pyx_kp_u_Retrieve_the_next_element_of_a) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_peekn_line_1740, __pyx_kp_u_Retrieve_the_next_n_elements_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init cytoolz.itertoolz", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cytoolz.itertoolz");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

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

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

/* IterNext */
static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_Occurred();
    if (unlikely(exc_type)) {
        if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return NULL;
        __Pyx_PyErr_Clear();
        Py_INCREF(defval);
        return defval;
    }
    if (defval) {
        Py_INCREF(defval);
        return defval;
    }
    __Pyx_PyErr_SetNone(PyExc_StopIteration);
    return NULL;
}
static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) {
    PyErr_Format(PyExc_TypeError,
        "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name);
}
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
    PyObject* next;
    iternextfunc iternext = Py_TYPE(iterator)->tp_iternext;
    if (likely(iternext)) {
#if CYTHON_USE_TYPE_SLOTS
        next = iternext(iterator);
        if (likely(next))
            return next;
        #if PY_VERSION_HEX >= 0x02070000
        if (unlikely(iternext == &_PyObject_NextNotImplemented))
            return NULL;
        #endif
#else
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
#endif
    } else if (CYTHON_USE_TYPE_SLOTS || unlikely(!PyIter_Check(iterator))) {
        __Pyx_PyIter_Next_ErrorNoIterator(iterator);
        return NULL;
    }
#if !CYTHON_USE_TYPE_SLOTS
    else {
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
    }
#endif
    return __Pyx_PyIter_Next2Default(defval);
}

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

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

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

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

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

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

/* DivInt[Py_ssize_t] */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

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

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

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

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

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

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

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

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

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

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

/* pyfrozenset_new */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
    if (it) {
        PyObject* result;
#if CYTHON_COMPILING_IN_PYPY
        PyObject* args;
        args = PyTuple_Pack(1, it);
        if (unlikely(!args))
            return NULL;
        result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
        Py_DECREF(args);
        return result;
#else
        if (PyFrozenSet_CheckExact(it)) {
            Py_INCREF(it);
            return it;
        }
        result = PyFrozenSet_New(it);
        if (unlikely(!result))
            return NULL;
        if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result)))
            return result;
        Py_DECREF(result);
#endif
    }
#if CYTHON_USE_TYPE_SLOTS
    return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#else
    return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#endif
}

/* PySetContains */
static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) {
    int result = -1;
    if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) {
        PyObject *tmpkey;
        PyErr_Clear();
        tmpkey = __Pyx_PyFrozenSet_New(key);
        if (tmpkey != NULL) {
            result = PySet_Contains(set, tmpkey);
            Py_DECREF(tmpkey);
        }
    }
    return result;
}
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) {
    int result = PySet_Contains(set, key);
    if (unlikely(result < 0)) {
        result = __Pyx_PySet_ContainsUnhashable(set, key);
    }
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            if (PY_VERSION_HEX >= 0x030700A0) {
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            }
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

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

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* pyobject_as_double */
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if !CYTHON_USE_TYPE_SLOTS
    float_value = PyNumber_Float(obj);  if ((0)) goto bad;
#else
    PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
    if (likely(nb) && likely(nb->nb_float)) {
        float_value = nb->nb_float(obj);
        if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
            PyErr_Format(PyExc_TypeError,
                "__float__ returned non-float (type %.200s)",
                Py_TYPE(float_value)->tp_name);
            Py_DECREF(float_value);
            goto bad;
        }
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

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

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
  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;
}

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

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if ((size_t)basicsize < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

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

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

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

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

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

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

/* FunctionExport */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

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