/* Generated by Cython 0.29.16 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "CYTHON_TRACE", 
                "1"
            ]
        ], 
        "name": "ddb.output.factory_term", 
        "sources": [
            "./ddb/output/factory_term.py"
        ]
    }, 
    "module_name": "ddb.output.factory_term"
}
END: Cython Metadata */

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

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

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#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 CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

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


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

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

#define __PYX_HAVE__ddb__output__factory_term
#define __PYX_HAVE_API__ddb__output__factory_term
/* Early includes */
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

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

/*--- Type declarations ---*/

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

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

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

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

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

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

/* Profile.proto */
#ifndef CYTHON_PROFILE
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  #define CYTHON_PROFILE 0
#else
  #define CYTHON_PROFILE 1
#endif
#endif
#ifndef CYTHON_TRACE_NOGIL
  #define CYTHON_TRACE_NOGIL 0
#else
  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
    #define CYTHON_TRACE 1
  #endif
#endif
#ifndef CYTHON_TRACE
  #define CYTHON_TRACE 0
#endif
#if CYTHON_TRACE
  #undef CYTHON_PROFILE_REUSE_FRAME
#endif
#ifndef CYTHON_PROFILE_REUSE_FRAME
  #define CYTHON_PROFILE_REUSE_FRAME 0
#endif
#if CYTHON_PROFILE || CYTHON_TRACE
  #include "compile.h"
  #include "frameobject.h"
  #include "traceback.h"
  #if CYTHON_PROFILE_REUSE_FRAME
    #define CYTHON_FRAME_MODIFIER static
    #define CYTHON_FRAME_DEL(frame)
  #else
    #define CYTHON_FRAME_MODIFIER
    #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
  #endif
  #define __Pyx_TraceDeclarations\
  static PyCodeObject *__pyx_frame_code = NULL;\
  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
  int __Pyx_use_tracing = 0;
  #define __Pyx_TraceFrameInit(codeobj)\
  if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
  #ifdef WITH_THREAD
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  if (nogil) {\
      if (CYTHON_TRACE_NOGIL) {\
          PyThreadState *tstate;\
          PyGILState_STATE state = PyGILState_Ensure();\
          tstate = __Pyx_PyThreadState_Current;\
          if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
                  (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
              __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          }\
          PyGILState_Release(state);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  } else {\
      PyThreadState* tstate = PyThreadState_GET();\
      if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #else
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  {   PyThreadState* tstate = PyThreadState_GET();\
      if (unlikely(tstate->use_tracing) && !tstate->tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #endif
  #define __Pyx_TraceException()\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (tstate->use_tracing &&\
              (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\
          tstate->tracing++;\
          tstate->use_tracing = 0;\
          PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
          if (exc_info) {\
              if (CYTHON_TRACE && tstate->c_tracefunc)\
                  tstate->c_tracefunc(\
                      tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              tstate->c_profilefunc(\
                  tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              Py_DECREF(exc_info);\
          }\
          tstate->use_tracing = 1;\
          tstate->tracing--;\
      }\
  }
  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      tstate->tracing++;
      tstate->use_tracing = 0;
      if (CYTHON_TRACE && tstate->c_tracefunc)
          tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
      if (tstate->c_profilefunc)
          tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
      CYTHON_FRAME_DEL(frame);
      tstate->use_tracing = 1;
      tstate->tracing--;
      __Pyx_ErrRestoreInState(tstate, type, value, traceback);
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (tstate->use_tracing) {\
                  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
              }\
              PyGILState_Release(state);\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (tstate->use_tracing) {\
              __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
          }\
      }\
  }
  #else
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (tstate->use_tracing) {\
          __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
      }\
  }
  #endif
  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
#else
  #define __Pyx_TraceDeclarations
  #define __Pyx_TraceFrameInit(codeobj)
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)   if ((1)); else goto_error;
  #define __Pyx_TraceException()
  #define __Pyx_TraceReturn(result, nogil)
#endif
#if CYTHON_TRACE
  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
      int ret;
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      __Pyx_PyFrame_SetLineNumber(frame, lineno);
      tstate->tracing++;
      tstate->use_tracing = 0;
      ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
      tstate->use_tracing = 1;
      tstate->tracing--;
      if (likely(!ret)) {
          __Pyx_ErrRestoreInState(tstate, type, value, traceback);
      } else {
          Py_XDECREF(type);
          Py_XDECREF(value);
          Py_XDECREF(traceback);
      }
      return ret;
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              int ret = 0;\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\
                  ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              }\
              PyGILState_Release(state);\
              if (unlikely(ret)) goto_error;\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\
              int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              if (unlikely(ret)) goto_error;\
          }\
      }\
  }
  #else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\
          int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
          if (unlikely(ret)) goto_error;\
      }\
  }
  #endif
#else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)   if ((1)); else goto_error;
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Print.proto */
static int __Pyx_Print(PyObject*, PyObject *, int);
#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
static PyObject* __pyx_print = 0;
static PyObject* __pyx_print_kwargs = 0;
#endif

/* PrintOne.proto */
static int __Pyx_PrintOne(PyObject* stream, PyObject *o);

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

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

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

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

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


/* Module declarations from 'ddb.output.factory_term' */
#define __Pyx_MODULE_NAME "ddb.output.factory_term"
extern int __pyx_module_is_main_ddb__output__factory_term;
int __pyx_module_is_main_ddb__output__factory_term = 0;

/* Implementation of 'ddb.output.factory_term' */
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_range;
static const char __pyx_k_0[] = "{0}";
static const char __pyx_k_b[] = "b";
static const char __pyx_k_c[] = "c";
static const char __pyx_k_d[] = "%d";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_f[] = "%f";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_l[] = "l";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_o[] = "o";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_s[] = "%s";
static const char __pyx_k_t[] = "t";
static const char __pyx_k__2[] = "{";
static const char __pyx_k__3[] = "}";
static const char __pyx_k__5[] = "\n";
static const char __pyx_k__7[] = "";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_0_1[] = "{0}{1}";
static const char __pyx_k_0_m[] = "\033[{0}m";
static const char __pyx_k_ALL[] = "ALL";
static const char __pyx_k_DIM[] = "DIM";
static const char __pyx_k_RED[] = "RED";
static const char __pyx_k__10[] = " ";
static const char __pyx_k__12[] = "\t";
static const char __pyx_k__13[] = "    ";
static const char __pyx_k__23[] = "\342\224\202";
static const char __pyx_k__24[] = "\342\224\200";
static const char __pyx_k__25[] = "\342\225\221";
static const char __pyx_k__26[] = "\342\225\220";
static const char __pyx_k__27[] = "|";
static const char __pyx_k__28[] = "-";
static const char __pyx_k__30[] = "\342\224\234";
static const char __pyx_k__31[] = "\342\224\274";
static const char __pyx_k__32[] = "\342\224\244";
static const char __pyx_k__33[] = "\342\225\240";
static const char __pyx_k__34[] = "\342\225\254";
static const char __pyx_k__35[] = "\342\225\243";
static const char __pyx_k__37[] = "+";
static const char __pyx_k__38[] = "=";
static const char __pyx_k__40[] = "\342\224\224";
static const char __pyx_k__41[] = "\342\224\264";
static const char __pyx_k__42[] = "\342\224\230";
static const char __pyx_k__43[] = "\342\225\232";
static const char __pyx_k__44[] = "\342\225\251";
static const char __pyx_k__45[] = "\342\225\235";
static const char __pyx_k__47[] = "\342\224\214";
static const char __pyx_k__48[] = "\342\224\254";
static const char __pyx_k__49[] = "\342\224\220";
static const char __pyx_k__50[] = "\342\225\224";
static const char __pyx_k__51[] = "\342\225\246";
static const char __pyx_k__52[] = "\342\225\227";
static const char __pyx_k__54[] = "\342\225\241";
static const char __pyx_k__55[] = "\342\225\236";
static const char __pyx_k__58[] = "[";
static const char __pyx_k__59[] = "]";
static const char __pyx_k_arg[] = "arg";
static const char __pyx_k_dim[] = "dim";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_mid[] = "mid";
static const char __pyx_k_pad[] = "pad";
static const char __pyx_k_pro[] = "pro";
static const char __pyx_k_raw[] = "raw";
static const char __pyx_k_red[] = "red";
static const char __pyx_k_row[] = "row";
static const char __pyx_k_rst[] = "rst";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_top[] = "top";
static const char __pyx_k_BLUE[] = "BLUE";
static const char __pyx_k_BOLD[] = "BOLD";
static const char __pyx_k_CYAN[] = "CYAN";
static const char __pyx_k_DATA[] = "DATA";
static const char __pyx_k_LRCF[] = "LRCF";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_blue[] = "blue";
static const char __pyx_k_bold[] = "bold";
static const char __pyx_k_char[] = "char";
static const char __pyx_k_cyan[] = "cyan";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_edge[] = "edge";
static const char __pyx_k_edit[] = "edit";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_find[] = "find";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_left[] = "left";
static const char __pyx_k_line[] = "line";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_page[] = "page";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_rows[] = "rows";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_term[] = "term";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_text[] = "text";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_0_1_2[] = "{0}{1}{2}";
static const char __pyx_k_BLACK[] = "BLACK";
static const char __pyx_k_BLINK[] = "BLINK";
static const char __pyx_k_ERROR[] = "ERROR";
static const char __pyx_k_GREEN[] = "GREEN";
static const char __pyx_k_Popen[] = "Popen";
static const char __pyx_k_STDIO[] = "STDIO";
static const char __pyx_k_WHITE[] = "WHITE";
static const char __pyx_k_White[] = "White";
static const char __pyx_k_ascii[] = "ascii";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_color[] = "color";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_green[] = "green";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_ljust[] = "ljust";
static const char __pyx_k_major[] = "major";
static const char __pyx_k_modes[] = "modes";
static const char __pyx_k_popen[] = "popen";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_reset[] = "reset";
static const char __pyx_k_right[] = "right";
static const char __pyx_k_space[] = "space";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_style[] = "style";
static const char __pyx_k_table[] = "table";
static const char __pyx_k_upper[] = "upper";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_walls[] = "walls";
static const char __pyx_k_white[] = "white";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_HIDDEN[] = "HIDDEN";
static const char __pyx_k_STRING[] = "STRING";
static const char __pyx_k_YELLOW[] = "YELLOW";
static const char __pyx_k_active[] = "active";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_bottom[] = "bottom";
static const char __pyx_k_buffer[] = "buffer";
static const char __pyx_k_center[] = "center";
static const char __pyx_k_colors[] = "colors";
static const char __pyx_k_column[] = "column";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_double[] = "double";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_errors[] = "errors";
static const char __pyx_k_footer[] = "footer";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_header[] = "header";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_mprint[] = "mprint";
static const char __pyx_k_render[] = "render";
static const char __pyx_k_rstrip[] = "rstrip";
static const char __pyx_k_single[] = "single";
static const char __pyx_k_stdout[] = "stdout";
static const char __pyx_k_yellow[] = "yellow";
static const char __pyx_k_COMMENT[] = "COMMENT";
static const char __pyx_k_DEFAULT[] = "DEFAULT";
static const char __pyx_k_MAGENTA[] = "MAGENTA";
static const char __pyx_k_REVERSE[] = "REVERSE";
static const char __pyx_k_columns[] = "columns";
static const char __pyx_k_comment[] = "comment";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_isspace[] = "isspace";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_results[] = "results";
static const char __pyx_k_char_rst[] = "char_rst";
static const char __pyx_k_char_top[] = "char_top";
static const char __pyx_k_column_0[] = "column{0}";
static const char __pyx_k_data_len[] = "data_len";
static const char __pyx_k_disabled[] = "disabled";
static const char __pyx_k_exc_info[] = "exc_info";
static const char __pyx_k_overflow[] = "overflow";
static const char __pyx_k_override[] = "override";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_stringer[] = "stringer";
static const char __pyx_k_tab_stop[] = "tab_stop";
static const char __pyx_k_tty_code[] = "tty_code";
static const char __pyx_k_DARK_GRAY[] = "DARK GRAY";
static const char __pyx_k_LIGHT_RED[] = "LIGHT RED";
static const char __pyx_k_dark_gray[] = "dark gray";
static const char __pyx_k_data_type[] = "data_type";
static const char __pyx_k_flextable[] = "flextable";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_starts_on[] = "starts_on";
static const char __pyx_k_tab_width[] = "tab_width";
static const char __pyx_k_use_color[] = "use_color";
static const char __pyx_k_LIGHT_BLUE[] = "LIGHT BLUE";
static const char __pyx_k_LIGHT_CYAN[] = "LIGHT CYAN";
static const char __pyx_k_LIGHT_GRAY[] = "LIGHT GRAY";
static const char __pyx_k_UNDERLINED[] = "UNDERLINED";
static const char __pyx_k_WHITESPACE[] = "WHITESPACE";
static const char __pyx_k_attributes[] = "attributes";
static const char __pyx_k_background[] = "background";
static const char __pyx_k_build_rows[] = "build_rows";
static const char __pyx_k_char_walls[] = "char_walls";
static const char __pyx_k_characters[] = "characters";
static const char __pyx_k_column_pad[] = "column_pad";
static const char __pyx_k_foreground[] = "foreground";
static const char __pyx_k_light_gray[] = "light gray";
static const char __pyx_k_mid_header[] = "mid_header";
static const char __pyx_k_replacment[] = "replacment";
static const char __pyx_k_row_height[] = "row_height";
static const char __pyx_k_subprocess[] = "subprocess";
static const char __pyx_k_wall_color[] = "wall_color";
static const char __pyx_k_whitespace[] = "whitespace";
static const char __pyx_k_DARK_GRAY_2[] = "DARK_GRAY";
static const char __pyx_k_LIGHT_GREEN[] = "LIGHT GREEN";
static const char __pyx_k_LIGHT_RED_2[] = "LIGHT_RED";
static const char __pyx_k_char_bottom[] = "char_bottom";
static const char __pyx_k_char_center[] = "char_center";
static const char __pyx_k_char_footer[] = "char_footer";
static const char __pyx_k_char_header[] = "char_header";
static const char __pyx_k_hide_errors[] = "hide_errors";
static const char __pyx_k_line_ending[] = "line_ending";
static const char __pyx_k_total_width[] = "total_width";
static const char __pyx_k_LIGHT_BLUE_2[] = "LIGHT_BLUE";
static const char __pyx_k_LIGHT_CYAN_2[] = "LIGHT_CYAN";
static const char __pyx_k_LIGHT_GRAY_2[] = "LIGHT_GRAY";
static const char __pyx_k_LIGHT_YELLOW[] = "LIGHT YELLOW";
static const char __pyx_k_build_header[] = "build_header";
static const char __pyx_k_column_count[] = "column_count";
static const char __pyx_k_column_width[] = "column_width";
static const char __pyx_k_header_every[] = "header_every";
static const char __pyx_k_is_temp_file[] = "is_temp_file";
static const char __pyx_k_mprint_ERROR[] = "mprint:  ERROR";
static const char __pyx_k_print_errors[] = "print_errors";
static const char __pyx_k_render_color[] = "render_color";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_version_info[] = "version_info";
static const char __pyx_k_LIGHT_GREEN_2[] = "LIGHT_GREEN";
static const char __pyx_k_LIGHT_MAGENTA[] = "LIGHT MAGENTA";
static const char __pyx_k_display_style[] = "display_style";
static const char __pyx_k_encode_target[] = "encode_target";
static const char __pyx_k_hide_comments[] = "hide_comments";
static const char __pyx_k_output_stream[] = "output_stream";
static const char __pyx_k_row_seperator[] = "row_seperator";
static const char __pyx_k_LIGHT_YELLOW_2[] = "LIGHT_YELLOW";
static const char __pyx_k_column_display[] = "column_display";
static const char __pyx_k_fill_character[] = "fill_character";
static const char __pyx_k_tty_code_reset[] = "tty_code.reset";
static const char __pyx_k_LIGHT_MAGENTA_2[] = "LIGHT_MAGENTA";
static const char __pyx_k_char_mid_header[] = "char_mid_header";
static const char __pyx_k_flextable_color[] = "flextable.color";
static const char __pyx_k_flextable_modes[] = "flextable.modes";
static const char __pyx_k_flextable_style[] = "flextable_style";
static const char __pyx_k_hide_whitespace[] = "hide_whitespace";
static const char __pyx_k_calculate_limits[] = "calculate_limits";
static const char __pyx_k_flextable___init[] = "flextable.__init__";
static const char __pyx_k_flextable_colors[] = "flextable.colors";
static const char __pyx_k_flextable_format[] = "flextable.format";
static const char __pyx_k_data_column_count[] = "data_column_count";
static const char __pyx_k_data_is_invalid_0[] = "data is invalid: -> {0}";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_output_destination[] = "output_destination";
static const char __pyx_k_build_row_seperator[] = "build_row_seperator";
static const char __pyx_k_flextable_data_type[] = "flextable.data_type";
static const char __pyx_k_stty_F_dev_tty_size[] = "stty -F /dev/tty size";
static const char __pyx_k_tty_code_attributes[] = "tty_code.attributes";
static const char __pyx_k_tty_code_background[] = "tty_code.background";
static const char __pyx_k_tty_code_foreground[] = "tty_code.foreground";
static const char __pyx_k_flextable_build_rows[] = "flextable.build_rows";
static const char __pyx_k_flextable_characters[] = "flextable.characters";
static const char __pyx_k_row_header_seperator[] = "row_header_seperator";
static const char __pyx_k_tty_min_column_width[] = "tty_min_column_width";
static const char __pyx_k_column_character_width[] = "column_character_width";
static const char __pyx_k_flextable_build_header[] = "flextable.build_header";
static const char __pyx_k_flextable_color___init[] = "flextable.color.__init__";
static const char __pyx_k_flextable_color_render[] = "flextable.color.render";
static const char __pyx_k_flextable_modes___init[] = "flextable.modes.__init__";
static const char __pyx_k_flextable_print_errors[] = "flextable.print_errors";
static const char __pyx_k_ddb_output_factory_term[] = "ddb.output.factory_term";
static const char __pyx_k_flextable_flextable_style[] = "flextable.flextable_style";
static const char __pyx_k_ddb_output_factory_term_py[] = "ddb/output/factory_term.py";
static const char __pyx_k_flextable_calculate_limits[] = "flextable.calculate_limits";
static const char __pyx_k_flextable_characters___init[] = "flextable.characters.__init__";
static const char __pyx_k_flextable_build_row_seperator[] = "flextable.build_row_seperator";
static const char __pyx_k_flextable_characters_char_rst[] = "flextable.characters.char_rst";
static const char __pyx_k_flextable_characters_char_top[] = "flextable.characters.char_top";
static const char __pyx_k_flextable_characters_char_rst_2[] = "flextable.characters.char_rst.__init__";
static const char __pyx_k_flextable_characters_char_top_2[] = "flextable.characters.char_top.__init__";
static const char __pyx_k_flextable_characters_char_walls[] = "flextable.characters.char_walls";
static const char __pyx_k_flextable_characters_char_bottom[] = "flextable.characters.char_bottom";
static const char __pyx_k_flextable_characters_char_center[] = "flextable.characters.char_center";
static const char __pyx_k_flextable_characters_char_footer[] = "flextable.characters.char_footer";
static const char __pyx_k_flextable_characters_char_header[] = "flextable.characters.char_header";
static const char __pyx_k_flextable_characters_char_mid_he[] = "flextable.characters.char_mid_header";
static const char __pyx_k_flextable_flextable_style___init[] = "flextable.flextable_style.__init__";
static const char __pyx_k_flextable_characters_char_walls_2[] = "flextable.characters.char_walls.__init__";
static const char __pyx_k_flextable_characters_char_bottom_2[] = "flextable.characters.char_bottom.__init__";
static const char __pyx_k_flextable_characters_char_center_2[] = "flextable.characters.char_center.__init__";
static const char __pyx_k_flextable_characters_char_footer_2[] = "flextable.characters.char_footer.__init__";
static const char __pyx_k_flextable_characters_char_header_2[] = "flextable.characters.char_header.__init__";
static const char __pyx_k_flextable_characters_char_mid_he_2[] = "flextable.characters.char_mid_header.__init__";
static PyObject *__pyx_kp_s_0;
static PyObject *__pyx_kp_u_0_1;
static PyObject *__pyx_kp_u_0_1_2;
static PyObject *__pyx_kp_s_0_m;
static PyObject *__pyx_n_s_ALL;
static PyObject *__pyx_n_s_BLACK;
static PyObject *__pyx_n_s_BLINK;
static PyObject *__pyx_n_s_BLUE;
static PyObject *__pyx_n_s_BOLD;
static PyObject *__pyx_n_s_COMMENT;
static PyObject *__pyx_n_s_CYAN;
static PyObject *__pyx_kp_s_DARK_GRAY;
static PyObject *__pyx_n_s_DARK_GRAY_2;
static PyObject *__pyx_n_s_DATA;
static PyObject *__pyx_n_s_DEFAULT;
static PyObject *__pyx_n_s_DIM;
static PyObject *__pyx_n_s_ERROR;
static PyObject *__pyx_n_s_GREEN;
static PyObject *__pyx_n_s_HIDDEN;
static PyObject *__pyx_kp_s_LIGHT_BLUE;
static PyObject *__pyx_n_s_LIGHT_BLUE_2;
static PyObject *__pyx_kp_s_LIGHT_CYAN;
static PyObject *__pyx_n_s_LIGHT_CYAN_2;
static PyObject *__pyx_kp_s_LIGHT_GRAY;
static PyObject *__pyx_n_s_LIGHT_GRAY_2;
static PyObject *__pyx_kp_s_LIGHT_GREEN;
static PyObject *__pyx_n_s_LIGHT_GREEN_2;
static PyObject *__pyx_kp_s_LIGHT_MAGENTA;
static PyObject *__pyx_n_s_LIGHT_MAGENTA_2;
static PyObject *__pyx_kp_s_LIGHT_RED;
static PyObject *__pyx_n_s_LIGHT_RED_2;
static PyObject *__pyx_kp_s_LIGHT_YELLOW;
static PyObject *__pyx_n_s_LIGHT_YELLOW_2;
static PyObject *__pyx_n_s_LRCF;
static PyObject *__pyx_n_s_MAGENTA;
static PyObject *__pyx_n_s_Popen;
static PyObject *__pyx_n_s_RED;
static PyObject *__pyx_n_s_REVERSE;
static PyObject *__pyx_n_s_STDIO;
static PyObject *__pyx_n_s_STRING;
static PyObject *__pyx_n_s_UNDERLINED;
static PyObject *__pyx_n_s_WHITE;
static PyObject *__pyx_n_s_WHITESPACE;
static PyObject *__pyx_n_s_White;
static PyObject *__pyx_n_s_YELLOW;
static PyObject *__pyx_kp_s__10;
static PyObject *__pyx_kp_u__10;
static PyObject *__pyx_kp_s__12;
static PyObject *__pyx_kp_s__13;
static PyObject *__pyx_kp_u__2;
static PyObject *__pyx_kp_u__23;
static PyObject *__pyx_kp_u__24;
static PyObject *__pyx_kp_u__25;
static PyObject *__pyx_kp_u__26;
static PyObject *__pyx_kp_u__27;
static PyObject *__pyx_kp_s__28;
static PyObject *__pyx_kp_u__28;
static PyObject *__pyx_kp_s__3;
static PyObject *__pyx_kp_u__30;
static PyObject *__pyx_kp_u__31;
static PyObject *__pyx_kp_u__32;
static PyObject *__pyx_kp_u__33;
static PyObject *__pyx_kp_u__34;
static PyObject *__pyx_kp_u__35;
static PyObject *__pyx_kp_s__37;
static PyObject *__pyx_kp_u__37;
static PyObject *__pyx_kp_s__38;
static PyObject *__pyx_kp_u__40;
static PyObject *__pyx_kp_u__41;
static PyObject *__pyx_kp_u__42;
static PyObject *__pyx_kp_u__43;
static PyObject *__pyx_kp_u__44;
static PyObject *__pyx_kp_u__45;
static PyObject *__pyx_kp_u__47;
static PyObject *__pyx_kp_u__48;
static PyObject *__pyx_kp_u__49;
static PyObject *__pyx_kp_s__5;
static PyObject *__pyx_kp_u__50;
static PyObject *__pyx_kp_u__51;
static PyObject *__pyx_kp_u__52;
static PyObject *__pyx_kp_u__54;
static PyObject *__pyx_kp_u__55;
static PyObject *__pyx_kp_u__58;
static PyObject *__pyx_kp_u__59;
static PyObject *__pyx_kp_s__7;
static PyObject *__pyx_kp_u__7;
static PyObject *__pyx_n_s_active;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_arg;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_ascii;
static PyObject *__pyx_n_s_attributes;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_n_s_background;
static PyObject *__pyx_n_s_base;
static PyObject *__pyx_n_s_blue;
static PyObject *__pyx_n_s_bold;
static PyObject *__pyx_n_s_bottom;
static PyObject *__pyx_n_s_buffer;
static PyObject *__pyx_n_s_build_header;
static PyObject *__pyx_n_s_build_row_seperator;
static PyObject *__pyx_n_s_build_rows;
static PyObject *__pyx_n_s_c;
static PyObject *__pyx_n_s_calculate_limits;
static PyObject *__pyx_n_s_center;
static PyObject *__pyx_n_s_char;
static PyObject *__pyx_n_s_char_bottom;
static PyObject *__pyx_n_s_char_center;
static PyObject *__pyx_n_s_char_footer;
static PyObject *__pyx_n_s_char_header;
static PyObject *__pyx_n_s_char_mid_header;
static PyObject *__pyx_n_s_char_rst;
static PyObject *__pyx_n_s_char_top;
static PyObject *__pyx_n_s_char_walls;
static PyObject *__pyx_n_s_characters;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_color;
static PyObject *__pyx_n_s_colors;
static PyObject *__pyx_n_s_column;
static PyObject *__pyx_kp_s_column_0;
static PyObject *__pyx_n_s_column_character_width;
static PyObject *__pyx_n_s_column_count;
static PyObject *__pyx_n_s_column_display;
static PyObject *__pyx_n_s_column_pad;
static PyObject *__pyx_n_s_column_width;
static PyObject *__pyx_n_s_columns;
static PyObject *__pyx_n_s_comment;
static PyObject *__pyx_n_s_cyan;
static PyObject *__pyx_kp_u_d;
static PyObject *__pyx_kp_s_dark_gray;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_data_column_count;
static PyObject *__pyx_kp_s_data_is_invalid_0;
static PyObject *__pyx_n_s_data_len;
static PyObject *__pyx_n_s_data_type;
static PyObject *__pyx_n_s_ddb_output_factory_term;
static PyObject *__pyx_kp_s_ddb_output_factory_term_py;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_s_dim;
static PyObject *__pyx_n_s_disabled;
static PyObject *__pyx_n_s_display_style;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_double;
static PyObject *__pyx_n_s_e;
static PyObject *__pyx_n_s_edge;
static PyObject *__pyx_n_s_edit;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_encode_target;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_n_s_errors;
static PyObject *__pyx_n_s_exc_info;
static PyObject *__pyx_kp_u_f;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_s_fill_character;
static PyObject *__pyx_n_s_find;
static PyObject *__pyx_n_s_flextable;
static PyObject *__pyx_n_s_flextable___init;
static PyObject *__pyx_n_s_flextable_build_header;
static PyObject *__pyx_n_s_flextable_build_row_seperator;
static PyObject *__pyx_n_s_flextable_build_rows;
static PyObject *__pyx_n_s_flextable_calculate_limits;
static PyObject *__pyx_n_s_flextable_characters;
static PyObject *__pyx_n_s_flextable_characters___init;
static PyObject *__pyx_n_s_flextable_characters_char_bottom;
static PyObject *__pyx_n_s_flextable_characters_char_bottom_2;
static PyObject *__pyx_n_s_flextable_characters_char_center;
static PyObject *__pyx_n_s_flextable_characters_char_center_2;
static PyObject *__pyx_n_s_flextable_characters_char_footer;
static PyObject *__pyx_n_s_flextable_characters_char_footer_2;
static PyObject *__pyx_n_s_flextable_characters_char_header;
static PyObject *__pyx_n_s_flextable_characters_char_header_2;
static PyObject *__pyx_n_s_flextable_characters_char_mid_he;
static PyObject *__pyx_n_s_flextable_characters_char_mid_he_2;
static PyObject *__pyx_n_s_flextable_characters_char_rst;
static PyObject *__pyx_n_s_flextable_characters_char_rst_2;
static PyObject *__pyx_n_s_flextable_characters_char_top;
static PyObject *__pyx_n_s_flextable_characters_char_top_2;
static PyObject *__pyx_n_s_flextable_characters_char_walls;
static PyObject *__pyx_n_s_flextable_characters_char_walls_2;
static PyObject *__pyx_n_s_flextable_color;
static PyObject *__pyx_n_s_flextable_color___init;
static PyObject *__pyx_n_s_flextable_color_render;
static PyObject *__pyx_n_s_flextable_colors;
static PyObject *__pyx_n_s_flextable_data_type;
static PyObject *__pyx_n_s_flextable_flextable_style;
static PyObject *__pyx_n_s_flextable_flextable_style___init;
static PyObject *__pyx_n_s_flextable_format;
static PyObject *__pyx_n_s_flextable_modes;
static PyObject *__pyx_n_s_flextable_modes___init;
static PyObject *__pyx_n_s_flextable_print_errors;
static PyObject *__pyx_n_s_flextable_style;
static PyObject *__pyx_n_s_footer;
static PyObject *__pyx_n_s_foreground;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_green;
static PyObject *__pyx_n_s_header;
static PyObject *__pyx_n_s_header_every;
static PyObject *__pyx_n_s_hide_comments;
static PyObject *__pyx_n_s_hide_errors;
static PyObject *__pyx_n_s_hide_whitespace;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_is_temp_file;
static PyObject *__pyx_n_s_isspace;
static PyObject *__pyx_n_s_l;
static PyObject *__pyx_n_s_left;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_kp_s_light_gray;
static PyObject *__pyx_n_s_line;
static PyObject *__pyx_n_s_line_ending;
static PyObject *__pyx_n_s_ljust;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_major;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_mid;
static PyObject *__pyx_n_s_mid_header;
static PyObject *__pyx_n_s_modes;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_mprint;
static PyObject *__pyx_kp_s_mprint_ERROR;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_o;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_output_destination;
static PyObject *__pyx_n_s_output_stream;
static PyObject *__pyx_n_s_overflow;
static PyObject *__pyx_n_s_override;
static PyObject *__pyx_n_s_pad;
static PyObject *__pyx_n_s_page;
static PyObject *__pyx_n_s_popen;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_print_errors;
static PyObject *__pyx_n_s_pro;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_r;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_raw;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_red;
static PyObject *__pyx_n_s_render;
static PyObject *__pyx_n_s_render_color;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_n_s_replacment;
static PyObject *__pyx_n_s_reset;
static PyObject *__pyx_n_s_results;
static PyObject *__pyx_n_s_right;
static PyObject *__pyx_n_s_row;
static PyObject *__pyx_n_s_row_header_seperator;
static PyObject *__pyx_n_s_row_height;
static PyObject *__pyx_n_s_row_seperator;
static PyObject *__pyx_n_s_rows;
static PyObject *__pyx_n_s_rst;
static PyObject *__pyx_n_s_rstrip;
static PyObject *__pyx_kp_u_s;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_single;
static PyObject *__pyx_n_s_space;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_starts_on;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_stdout;
static PyObject *__pyx_n_s_stringer;
static PyObject *__pyx_kp_s_stty_F_dev_tty_size;
static PyObject *__pyx_n_s_style;
static PyObject *__pyx_n_s_subprocess;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_tab_stop;
static PyObject *__pyx_n_s_tab_width;
static PyObject *__pyx_n_s_table;
static PyObject *__pyx_n_s_term;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_text;
static PyObject *__pyx_n_s_top;
static PyObject *__pyx_n_s_total_width;
static PyObject *__pyx_n_s_tty_code;
static PyObject *__pyx_n_s_tty_code_attributes;
static PyObject *__pyx_n_s_tty_code_background;
static PyObject *__pyx_n_s_tty_code_foreground;
static PyObject *__pyx_n_s_tty_code_reset;
static PyObject *__pyx_n_s_tty_min_column_width;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_upper;
static PyObject *__pyx_n_s_use_color;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_version_info;
static PyObject *__pyx_n_s_wall_color;
static PyObject *__pyx_n_s_walls;
static PyObject *__pyx_n_s_white;
static PyObject *__pyx_n_s_whitespace;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_yellow;
static PyObject *__pyx_pf_3ddb_6output_12factory_term_stringer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_base, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_2mprint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_text); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_colors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_foreground, PyObject *__pyx_v_background, PyObject *__pyx_v_dim, PyObject *__pyx_v_bold); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_15flextable_style___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_5color___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_foreground, PyObject *__pyx_v_background, PyObject *__pyx_v_text, PyObject *__pyx_v_dim, PyObject *__pyx_v_bold, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_5color_2render(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_text, PyObject *__pyx_v_length, PyObject *__pyx_v_fill_character, PyObject *__pyx_v_override, PyObject *__pyx_v_use_color); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_5modes___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_10char_walls___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_11char_center___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_8char_rst___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_11char_bottom___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_8char_top___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_11char_header___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_15char_mid_header___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_11char_footer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_10characters___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_display_style, PyObject *__pyx_v_column_count, PyObject *__pyx_v_hide_comments, PyObject *__pyx_v_hide_errors, PyObject *__pyx_v_hide_whitespace, PyObject *__pyx_v_columns, PyObject *__pyx_v_length, PyObject *__pyx_v_line, PyObject *__pyx_v_page, PyObject *__pyx_v_header, PyObject *__pyx_v_footer, PyObject *__pyx_v_header_every, PyObject *__pyx_v_tab_width, PyObject *__pyx_v_tab_stop, PyObject *__pyx_v_row_height, PyObject *__pyx_v_column_width, PyObject *__pyx_v_render_color, PyObject *__pyx_v_output_stream); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_4calculate_limits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_6build_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_footer, PyObject *__pyx_v_mid); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_8build_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_10build_row_seperator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_header); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_12print_errors(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_table); /* proto */
static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_14format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_7;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_21;
static PyObject *__pyx_int_22;
static PyObject *__pyx_int_24;
static PyObject *__pyx_int_25;
static PyObject *__pyx_int_27;
static PyObject *__pyx_int_28;
static PyObject *__pyx_int_30;
static PyObject *__pyx_int_31;
static PyObject *__pyx_int_32;
static PyObject *__pyx_int_33;
static PyObject *__pyx_int_34;
static PyObject *__pyx_int_35;
static PyObject *__pyx_int_36;
static PyObject *__pyx_int_37;
static PyObject *__pyx_int_39;
static PyObject *__pyx_int_40;
static PyObject *__pyx_int_41;
static PyObject *__pyx_int_42;
static PyObject *__pyx_int_43;
static PyObject *__pyx_int_44;
static PyObject *__pyx_int_45;
static PyObject *__pyx_int_46;
static PyObject *__pyx_int_47;
static PyObject *__pyx_int_49;
static PyObject *__pyx_int_80;
static PyObject *__pyx_int_90;
static PyObject *__pyx_int_91;
static PyObject *__pyx_int_92;
static PyObject *__pyx_int_93;
static PyObject *__pyx_int_94;
static PyObject *__pyx_int_95;
static PyObject *__pyx_int_96;
static PyObject *__pyx_int_97;
static PyObject *__pyx_int_100;
static PyObject *__pyx_int_101;
static PyObject *__pyx_int_102;
static PyObject *__pyx_int_103;
static PyObject *__pyx_int_104;
static PyObject *__pyx_int_105;
static PyObject *__pyx_int_106;
static PyObject *__pyx_int_107;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_codeobj_;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_codeobj__6;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_codeobj__9;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_codeobj__11;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__36;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__46;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__61;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__64;
static PyObject *__pyx_codeobj__65;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__68;
static PyObject *__pyx_codeobj__69;
/* Late includes */

/* "ddb/output/factory_term.py":8
 * from  subprocess import Popen
 * 
 * def stringer(base,*args):             # <<<<<<<<<<<<<<
 *     index=0
 *     o=base
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_1stringer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_1stringer = {"stringer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_1stringer, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_1stringer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_base = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stringer (wrapper)", 0);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_base,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "stringer") < 0)) __PYX_ERR(0, 8, __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_base = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("stringer", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("ddb.output.factory_term.stringer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_stringer(__pyx_self, __pyx_v_base, __pyx_v_args);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_stringer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_base, PyObject *__pyx_v_args) {
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_o = NULL;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_v_term = NULL;
  PyObject *__pyx_v_replacment = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  __Pyx_TraceFrameInit(__pyx_codeobj_)
  __Pyx_RefNannySetupContext("stringer", 0);
  __Pyx_TraceCall("stringer", __pyx_f[0], 8, 0, __PYX_ERR(0, 8, __pyx_L1_error));

  /* "ddb/output/factory_term.py":9
 * 
 * def stringer(base,*args):
 *     index=0             # <<<<<<<<<<<<<<
 *     o=base
 *     for arg in args:
 */
  __Pyx_TraceLine(9,0,__PYX_ERR(0, 9, __pyx_L1_error))
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_index = __pyx_int_0;

  /* "ddb/output/factory_term.py":10
 * def stringer(base,*args):
 *     index=0
 *     o=base             # <<<<<<<<<<<<<<
 *     for arg in args:
 *         term=u"{"+str(index)+"}"
 */
  __Pyx_TraceLine(10,0,__PYX_ERR(0, 10, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_base);
  __pyx_v_o = __pyx_v_base;

  /* "ddb/output/factory_term.py":11
 *     index=0
 *     o=base
 *     for arg in args:             # <<<<<<<<<<<<<<
 *         term=u"{"+str(index)+"}"
 *         if isinstance(arg,float)==True:
 */
  __Pyx_TraceLine(11,0,__PYX_ERR(0, 11, __pyx_L1_error))
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 11, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "ddb/output/factory_term.py":12
 *     o=base
 *     for arg in args:
 *         term=u"{"+str(index)+"}"             # <<<<<<<<<<<<<<
 *         if isinstance(arg,float)==True:
 *             replacment=u"%f" % arg
 */
    __Pyx_TraceLine(12,0,__PYX_ERR(0, 12, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Add(__pyx_kp_u__2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_term, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "ddb/output/factory_term.py":13
 *     for arg in args:
 *         term=u"{"+str(index)+"}"
 *         if isinstance(arg,float)==True:             # <<<<<<<<<<<<<<
 *             replacment=u"%f" % arg
 *         elif isinstance(arg,int)==True:
 */
    __Pyx_TraceLine(13,0,__PYX_ERR(0, 13, __pyx_L1_error))
    __pyx_t_5 = PyFloat_Check(__pyx_v_arg); 
    __pyx_t_6 = ((__pyx_t_5 == 1) != 0);
    if (__pyx_t_6) {

      /* "ddb/output/factory_term.py":14
 *         term=u"{"+str(index)+"}"
 *         if isinstance(arg,float)==True:
 *             replacment=u"%f" % arg             # <<<<<<<<<<<<<<
 *         elif isinstance(arg,int)==True:
 *             replacment=u"%d" % arg
 */
      __Pyx_TraceLine(14,0,__PYX_ERR(0, 14, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_f, __pyx_v_arg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_replacment, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":13
 *     for arg in args:
 *         term=u"{"+str(index)+"}"
 *         if isinstance(arg,float)==True:             # <<<<<<<<<<<<<<
 *             replacment=u"%f" % arg
 *         elif isinstance(arg,int)==True:
 */
      goto __pyx_L5;
    }

    /* "ddb/output/factory_term.py":15
 *         if isinstance(arg,float)==True:
 *             replacment=u"%f" % arg
 *         elif isinstance(arg,int)==True:             # <<<<<<<<<<<<<<
 *             replacment=u"%d" % arg
 *         else:
 */
    __Pyx_TraceLine(15,0,__PYX_ERR(0, 15, __pyx_L1_error))
    __pyx_t_6 = PyInt_Check(__pyx_v_arg); 
    __pyx_t_5 = ((__pyx_t_6 == 1) != 0);
    if (__pyx_t_5) {

      /* "ddb/output/factory_term.py":16
 *             replacment=u"%f" % arg
 *         elif isinstance(arg,int)==True:
 *             replacment=u"%d" % arg             # <<<<<<<<<<<<<<
 *         else:
 *             try:
 */
      __Pyx_TraceLine(16,0,__PYX_ERR(0, 16, __pyx_L1_error))
      __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_d, __pyx_v_arg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_replacment, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":15
 *         if isinstance(arg,float)==True:
 *             replacment=u"%f" % arg
 *         elif isinstance(arg,int)==True:             # <<<<<<<<<<<<<<
 *             replacment=u"%d" % arg
 *         else:
 */
      goto __pyx_L5;
    }

    /* "ddb/output/factory_term.py":18
 *             replacment=u"%d" % arg
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 replacment=u"%s" % arg.decode("utf-8")
 *             except:
 */
    __Pyx_TraceLine(18,0,__PYX_ERR(0, 18, __pyx_L1_error))
    /*else*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {

          /* "ddb/output/factory_term.py":19
 *         else:
 *             try:
 *                 replacment=u"%s" % arg.decode("utf-8")             # <<<<<<<<<<<<<<
 *             except:
 *                 replacment=u"%s" % arg
 */
          __Pyx_TraceLine(19,0,__PYX_ERR(0, 19, __pyx_L6_error))
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_10 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_utf_8);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF_SET(__pyx_v_replacment, ((PyObject*)__pyx_t_4));
          __pyx_t_4 = 0;

          /* "ddb/output/factory_term.py":18
 *             replacment=u"%d" % arg
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 replacment=u"%s" % arg.decode("utf-8")
 *             except:
 */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L13_try_end;
        __pyx_L6_error:;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "ddb/output/factory_term.py":20
 *             try:
 *                 replacment=u"%s" % arg.decode("utf-8")
 *             except:             # <<<<<<<<<<<<<<
 *                 replacment=u"%s" % arg
 * 
 */
        __Pyx_TraceLine(20,0,__PYX_ERR(0, 20, __pyx_L8_except_error))
        /*except:*/ {
          __Pyx_AddTraceback("ddb.output.factory_term.stringer", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_10) < 0) __PYX_ERR(0, 20, __pyx_L8_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_10);

          /* "ddb/output/factory_term.py":21
 *                 replacment=u"%s" % arg.decode("utf-8")
 *             except:
 *                 replacment=u"%s" % arg             # <<<<<<<<<<<<<<
 * 
 * 
 */
          __Pyx_TraceLine(21,0,__PYX_ERR(0, 21, __pyx_L8_except_error))
          __pyx_t_11 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s, __pyx_v_arg); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 21, __pyx_L8_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_XDECREF_SET(__pyx_v_replacment, ((PyObject*)__pyx_t_11));
          __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L7_exception_handled;
        }
        __pyx_L8_except_error:;

        /* "ddb/output/factory_term.py":18
 *             replacment=u"%d" % arg
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 replacment=u"%s" % arg.decode("utf-8")
 *             except:
 */
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L7_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        __pyx_L13_try_end:;
      }
    }
    __pyx_L5:;

    /* "ddb/output/factory_term.py":24
 * 
 * 
 *         o=o.replace(term,replacment)             # <<<<<<<<<<<<<<
 *         index+=1
 *     return o
 */
    __Pyx_TraceLine(24,0,__PYX_ERR(0, 24, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_12 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_term, __pyx_v_replacment};
      __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 24, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_10);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_term, __pyx_v_replacment};
      __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 24, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_10);
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 24, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_term);
      __Pyx_GIVEREF(__pyx_v_term);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_term);
      __Pyx_INCREF(__pyx_v_replacment);
      __Pyx_GIVEREF(__pyx_v_replacment);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_v_replacment);
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 24, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "ddb/output/factory_term.py":25
 * 
 *         o=o.replace(term,replacment)
 *         index+=1             # <<<<<<<<<<<<<<
 *     return o
 * 
 */
    __Pyx_TraceLine(25,0,__PYX_ERR(0, 25, __pyx_L1_error))
    __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 25, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "ddb/output/factory_term.py":11
 *     index=0
 *     o=base
 *     for arg in args:             # <<<<<<<<<<<<<<
 *         term=u"{"+str(index)+"}"
 *         if isinstance(arg,float)==True:
 */
    __Pyx_TraceLine(11,0,__PYX_ERR(0, 11, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":26
 *         o=o.replace(term,replacment)
 *         index+=1
 *     return o             # <<<<<<<<<<<<<<
 * 
 * def mprint(text):
 */
  __Pyx_TraceLine(26,0,__PYX_ERR(0, 26, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "ddb/output/factory_term.py":8
 * from  subprocess import Popen
 * 
 * def stringer(base,*args):             # <<<<<<<<<<<<<<
 *     index=0
 *     o=base
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("ddb.output.factory_term.stringer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_term);
  __Pyx_XDECREF(__pyx_v_replacment);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":28
 *     return o
 * 
 * def mprint(text):             # <<<<<<<<<<<<<<
 *     encode_target='utf-8'
 *     try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_3mprint(PyObject *__pyx_self, PyObject *__pyx_v_text); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_3mprint = {"mprint", (PyCFunction)__pyx_pw_3ddb_6output_12factory_term_3mprint, METH_O, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_3mprint(PyObject *__pyx_self, PyObject *__pyx_v_text) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mprint (wrapper)", 0);
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_2mprint(__pyx_self, ((PyObject *)__pyx_v_text));

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_2mprint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_text) {
  PyObject *__pyx_v_encode_target = NULL;
  PyObject *__pyx_v_major = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__4)
  __Pyx_RefNannySetupContext("mprint", 0);
  __Pyx_TraceCall("mprint", __pyx_f[0], 28, 0, __PYX_ERR(0, 28, __pyx_L1_error));

  /* "ddb/output/factory_term.py":29
 * 
 * def mprint(text):
 *     encode_target='utf-8'             # <<<<<<<<<<<<<<
 *     try:
 *         #pprint.pprint(sys.version_info)
 */
  __Pyx_TraceLine(29,0,__PYX_ERR(0, 29, __pyx_L1_error))
  __Pyx_INCREF(__pyx_kp_s_utf_8);
  __pyx_v_encode_target = __pyx_kp_s_utf_8;

  /* "ddb/output/factory_term.py":30
 * def mprint(text):
 *     encode_target='utf-8'
 *     try:             # <<<<<<<<<<<<<<
 *         #pprint.pprint(sys.version_info)
 *         try:
 */
  __Pyx_TraceLine(30,0,__PYX_ERR(0, 30, __pyx_L1_error))
  {
    __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:*/ {

      /* "ddb/output/factory_term.py":32
 *     try:
 *         #pprint.pprint(sys.version_info)
 *         try:             # <<<<<<<<<<<<<<
 *             major=sys.version_info.major
 *         except:
 */
      __Pyx_TraceLine(32,0,__PYX_ERR(0, 32, __pyx_L3_error))
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_6);
        /*try:*/ {

          /* "ddb/output/factory_term.py":33
 *         #pprint.pprint(sys.version_info)
 *         try:
 *             major=sys.version_info.major             # <<<<<<<<<<<<<<
 *         except:
 *             major=sys.version_info[0]
 */
          __Pyx_TraceLine(33,0,__PYX_ERR(0, 33, __pyx_L9_error))
          __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 33, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_major); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_v_major = __pyx_t_7;
          __pyx_t_7 = 0;

          /* "ddb/output/factory_term.py":32
 *     try:
 *         #pprint.pprint(sys.version_info)
 *         try:             # <<<<<<<<<<<<<<
 *             major=sys.version_info.major
 *         except:
 */
        }
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L14_try_end;
        __pyx_L9_error:;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "ddb/output/factory_term.py":34
 *         try:
 *             major=sys.version_info.major
 *         except:             # <<<<<<<<<<<<<<
 *             major=sys.version_info[0]
 * 
 */
        __Pyx_TraceLine(34,0,__PYX_ERR(0, 34, __pyx_L11_except_error))
        /*except:*/ {
          __Pyx_AddTraceback("ddb.output.factory_term.mprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 34, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GOTREF(__pyx_t_9);

          /* "ddb/output/factory_term.py":35
 *             major=sys.version_info.major
 *         except:
 *             major=sys.version_info[0]             # <<<<<<<<<<<<<<
 * 
 *         if major==2:
 */
          __Pyx_TraceLine(35,0,__PYX_ERR(0, 35, __pyx_L11_except_error))
          __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_sys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 35, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_version_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 35, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 35, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF_SET(__pyx_v_major, __pyx_t_10);
          __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L10_exception_handled;
        }
        __pyx_L11_except_error:;

        /* "ddb/output/factory_term.py":32
 *     try:
 *         #pprint.pprint(sys.version_info)
 *         try:             # <<<<<<<<<<<<<<
 *             major=sys.version_info.major
 *         except:
 */
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        goto __pyx_L3_error;
        __pyx_L10_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        __pyx_L14_try_end:;
      }

      /* "ddb/output/factory_term.py":37
 *             major=sys.version_info[0]
 * 
 *         if major==2:             # <<<<<<<<<<<<<<
 *             sys.stdout.write(text.encode(encode_target))
 *             sys.stdout.write("\n".encode(encode_target))
 */
      __Pyx_TraceLine(37,0,__PYX_ERR(0, 37, __pyx_L3_error))
      __pyx_t_9 = __Pyx_PyInt_EqObjC(__pyx_v_major, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 37, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 37, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_12) {

        /* "ddb/output/factory_term.py":38
 * 
 *         if major==2:
 *             sys.stdout.write(text.encode(encode_target))             # <<<<<<<<<<<<<<
 *             sys.stdout.write("\n".encode(encode_target))
 *         elif major==3:
 */
        __Pyx_TraceLine(38,0,__PYX_ERR(0, 38, __pyx_L3_error))
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 38, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_stdout); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 38, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 38, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 38, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        __pyx_t_7 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_v_encode_target) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_encode_target);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 38, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 38, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "ddb/output/factory_term.py":39
 *         if major==2:
 *             sys.stdout.write(text.encode(encode_target))
 *             sys.stdout.write("\n".encode(encode_target))             # <<<<<<<<<<<<<<
 *         elif major==3:
 *             # DIRECT BUFFER, std out wont let you do this
 */
        __Pyx_TraceLine(39,0,__PYX_ERR(0, 39, __pyx_L3_error))
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 39, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_stdout); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 39, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 39, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s__5, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 39, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        __pyx_t_7 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_v_encode_target) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_encode_target);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 39, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 39, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "ddb/output/factory_term.py":37
 *             major=sys.version_info[0]
 * 
 *         if major==2:             # <<<<<<<<<<<<<<
 *             sys.stdout.write(text.encode(encode_target))
 *             sys.stdout.write("\n".encode(encode_target))
 */
        goto __pyx_L17;
      }

      /* "ddb/output/factory_term.py":40
 *             sys.stdout.write(text.encode(encode_target))
 *             sys.stdout.write("\n".encode(encode_target))
 *         elif major==3:             # <<<<<<<<<<<<<<
 *             # DIRECT BUFFER, std out wont let you do this
 *             # the buffer takes direct byte, like writing to the screen directly
 */
      __Pyx_TraceLine(40,0,__PYX_ERR(0, 40, __pyx_L3_error))
      __pyx_t_9 = __Pyx_PyInt_EqObjC(__pyx_v_major, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 40, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 40, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_12) {

        /* "ddb/output/factory_term.py":43
 *             # DIRECT BUFFER, std out wont let you do this
 *             # the buffer takes direct byte, like writing to the screen directly
 *             sys.stdout.buffer.write(text.encode(encode_target))             # <<<<<<<<<<<<<<
 *             sys.stdout.buffer.write("\n".encode(encode_target))
 *     except:
 */
        __Pyx_TraceLine(43,0,__PYX_ERR(0, 43, __pyx_L3_error))
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 43, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_stdout); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 43, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_buffer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 43, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_write); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 43, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 43, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_v_encode_target) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_encode_target);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 43, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 43, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "ddb/output/factory_term.py":44
 *             # the buffer takes direct byte, like writing to the screen directly
 *             sys.stdout.buffer.write(text.encode(encode_target))
 *             sys.stdout.buffer.write("\n".encode(encode_target))             # <<<<<<<<<<<<<<
 *     except:
 *         print ("mprint:  ERROR")
 */
        __Pyx_TraceLine(44,0,__PYX_ERR(0, 44, __pyx_L3_error))
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_stdout); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 44, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_buffer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 44, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s__5, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 44, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        __pyx_t_7 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_v_encode_target) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_encode_target);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 44, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "ddb/output/factory_term.py":40
 *             sys.stdout.write(text.encode(encode_target))
 *             sys.stdout.write("\n".encode(encode_target))
 *         elif major==3:             # <<<<<<<<<<<<<<
 *             # DIRECT BUFFER, std out wont let you do this
 *             # the buffer takes direct byte, like writing to the screen directly
 */
      }
      __pyx_L17:;

      /* "ddb/output/factory_term.py":30
 * def mprint(text):
 *     encode_target='utf-8'
 *     try:             # <<<<<<<<<<<<<<
 *         #pprint.pprint(sys.version_info)
 *         try:
 */
    }
    __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_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "ddb/output/factory_term.py":45
 *             sys.stdout.buffer.write(text.encode(encode_target))
 *             sys.stdout.buffer.write("\n".encode(encode_target))
 *     except:             # <<<<<<<<<<<<<<
 *         print ("mprint:  ERROR")
 *         print (sys.exc_info()[1])
 */
    __Pyx_TraceLine(45,0,__PYX_ERR(0, 45, __pyx_L5_except_error))
    /*except:*/ {
      __Pyx_AddTraceback("ddb.output.factory_term.mprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 45, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);

      /* "ddb/output/factory_term.py":46
 *             sys.stdout.buffer.write("\n".encode(encode_target))
 *     except:
 *         print ("mprint:  ERROR")             # <<<<<<<<<<<<<<
 *         print (sys.exc_info()[1])
 * 
 */
      __Pyx_TraceLine(46,0,__PYX_ERR(0, 46, __pyx_L5_except_error))
      if (__Pyx_PrintOne(0, __pyx_kp_s_mprint_ERROR) < 0) __PYX_ERR(0, 46, __pyx_L5_except_error)

      /* "ddb/output/factory_term.py":47
 *     except:
 *         print ("mprint:  ERROR")
 *         print (sys.exc_info()[1])             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_TraceLine(47,0,__PYX_ERR(0, 47, __pyx_L5_except_error))
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_sys); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 47, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 47, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
        }
      }
      __pyx_t_10 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 47, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_10, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 47, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (__Pyx_PrintOne(0, __pyx_t_13) < 0) __PYX_ERR(0, 47, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;

    /* "ddb/output/factory_term.py":30
 * def mprint(text):
 *     encode_target='utf-8'
 *     try:             # <<<<<<<<<<<<<<
 *         #pprint.pprint(sys.version_info)
 *         try:
 */
    __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_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);
    __pyx_L8_try_end:;
  }

  /* "ddb/output/factory_term.py":28
 *     return o
 * 
 * def mprint(text):             # <<<<<<<<<<<<<<
 *     encode_target='utf-8'
 *     try:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("ddb.output.factory_term.mprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_encode_target);
  __Pyx_XDECREF(__pyx_v_major);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":113
 * 
 *     @staticmethod
 *     def colors(foreground,background,dim=None,bold=None):             # <<<<<<<<<<<<<<
 *         color=''
 *         if dim !=None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_1colors(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_9flextable_1colors = {"colors", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_9flextable_1colors, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_1colors(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_foreground = 0;
  PyObject *__pyx_v_background = 0;
  PyObject *__pyx_v_dim = 0;
  PyObject *__pyx_v_bold = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("colors (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_foreground,&__pyx_n_s_background,&__pyx_n_s_dim,&__pyx_n_s_bold,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_foreground)) != 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_background)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("colors", 0, 2, 4, 1); __PYX_ERR(0, 113, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bold);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "colors") < 0)) __PYX_ERR(0, 113, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_foreground = values[0];
    __pyx_v_background = values[1];
    __pyx_v_dim = values[2];
    __pyx_v_bold = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("colors", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 113, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.colors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_9flextable_colors(__pyx_self, __pyx_v_foreground, __pyx_v_background, __pyx_v_dim, __pyx_v_bold);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_colors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_foreground, PyObject *__pyx_v_background, PyObject *__pyx_v_dim, PyObject *__pyx_v_bold) {
  PyObject *__pyx_v_color = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__6)
  __Pyx_RefNannySetupContext("colors", 0);
  __Pyx_TraceCall("colors", __pyx_f[0], 113, 0, __PYX_ERR(0, 113, __pyx_L1_error));

  /* "ddb/output/factory_term.py":114
 *     @staticmethod
 *     def colors(foreground,background,dim=None,bold=None):
 *         color=''             # <<<<<<<<<<<<<<
 *         if dim !=None:
 *             color+=tty_code.attributes.DIM
 */
  __Pyx_TraceLine(114,0,__PYX_ERR(0, 114, __pyx_L1_error))
  __Pyx_INCREF(__pyx_kp_s__7);
  __pyx_v_color = __pyx_kp_s__7;

  /* "ddb/output/factory_term.py":115
 *     def colors(foreground,background,dim=None,bold=None):
 *         color=''
 *         if dim !=None:             # <<<<<<<<<<<<<<
 *             color+=tty_code.attributes.DIM
 *         if bold !=None:
 */
  __Pyx_TraceLine(115,0,__PYX_ERR(0, 115, __pyx_L1_error))
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_dim, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":116
 *         color=''
 *         if dim !=None:
 *             color+=tty_code.attributes.DIM             # <<<<<<<<<<<<<<
 *         if bold !=None:
 *             color+=tty_code.attributes.BOLD
 */
    __Pyx_TraceLine(116,0,__PYX_ERR(0, 116, __pyx_L1_error))
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DIM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "ddb/output/factory_term.py":115
 *     def colors(foreground,background,dim=None,bold=None):
 *         color=''
 *         if dim !=None:             # <<<<<<<<<<<<<<
 *             color+=tty_code.attributes.DIM
 *         if bold !=None:
 */
  }

  /* "ddb/output/factory_term.py":117
 *         if dim !=None:
 *             color+=tty_code.attributes.DIM
 *         if bold !=None:             # <<<<<<<<<<<<<<
 *             color+=tty_code.attributes.BOLD
 * 
 */
  __Pyx_TraceLine(117,0,__PYX_ERR(0, 117, __pyx_L1_error))
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_bold, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":118
 *             color+=tty_code.attributes.DIM
 *         if bold !=None:
 *             color+=tty_code.attributes.BOLD             # <<<<<<<<<<<<<<
 * 
 *         if None != foreground:
 */
    __Pyx_TraceLine(118,0,__PYX_ERR(0, 118, __pyx_L1_error))
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BOLD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":117
 *         if dim !=None:
 *             color+=tty_code.attributes.DIM
 *         if bold !=None:             # <<<<<<<<<<<<<<
 *             color+=tty_code.attributes.BOLD
 * 
 */
  }

  /* "ddb/output/factory_term.py":120
 *             color+=tty_code.attributes.BOLD
 * 
 *         if None != foreground:             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'DEFAULT' :
 *                 color+=tty_code.foreground.DEFAULT
 */
  __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error))
  __pyx_t_1 = PyObject_RichCompare(Py_None, __pyx_v_foreground, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":121
 * 
 *         if None != foreground:
 *             if foreground.upper() == 'DEFAULT' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.DEFAULT
 *             if foreground.upper() == 'BLACK' :
 */
    __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_DEFAULT, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 121, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":122
 *         if None != foreground:
 *             if foreground.upper() == 'DEFAULT' :
 *                 color+=tty_code.foreground.DEFAULT             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'BLACK' :
 *                 color+=tty_code.foreground.BLACK
 */
      __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_foreground); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DEFAULT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":121
 * 
 *         if None != foreground:
 *             if foreground.upper() == 'DEFAULT' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.DEFAULT
 *             if foreground.upper() == 'BLACK' :
 */
    }

    /* "ddb/output/factory_term.py":123
 *             if foreground.upper() == 'DEFAULT' :
 *                 color+=tty_code.foreground.DEFAULT
 *             if foreground.upper() == 'BLACK' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.BLACK
 *             if foreground.upper() == 'RED' :
 */
    __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_BLACK, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":124
 *                 color+=tty_code.foreground.DEFAULT
 *             if foreground.upper() == 'BLACK' :
 *                 color+=tty_code.foreground.BLACK             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'RED' :
 *                 color+=tty_code.foreground.RED
 */
      __Pyx_TraceLine(124,0,__PYX_ERR(0, 124, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_foreground); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BLACK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":123
 *             if foreground.upper() == 'DEFAULT' :
 *                 color+=tty_code.foreground.DEFAULT
 *             if foreground.upper() == 'BLACK' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.BLACK
 *             if foreground.upper() == 'RED' :
 */
    }

    /* "ddb/output/factory_term.py":125
 *             if foreground.upper() == 'BLACK' :
 *                 color+=tty_code.foreground.BLACK
 *             if foreground.upper() == 'RED' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.RED
 *             if foreground.upper() == 'GREEN' :
 */
    __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_RED, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":126
 *                 color+=tty_code.foreground.BLACK
 *             if foreground.upper() == 'RED' :
 *                 color+=tty_code.foreground.RED             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'GREEN' :
 *                 color+=tty_code.foreground.GREEN
 */
      __Pyx_TraceLine(126,0,__PYX_ERR(0, 126, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_foreground); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_RED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":125
 *             if foreground.upper() == 'BLACK' :
 *                 color+=tty_code.foreground.BLACK
 *             if foreground.upper() == 'RED' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.RED
 *             if foreground.upper() == 'GREEN' :
 */
    }

    /* "ddb/output/factory_term.py":127
 *             if foreground.upper() == 'RED' :
 *                 color+=tty_code.foreground.RED
 *             if foreground.upper() == 'GREEN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.GREEN
 *             if foreground.upper() == 'YELLOW' :
 */
    __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_GREEN, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":128
 *                 color+=tty_code.foreground.RED
 *             if foreground.upper() == 'GREEN' :
 *                 color+=tty_code.foreground.GREEN             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'YELLOW' :
 *                 color+=tty_code.foreground.YELLOW
 */
      __Pyx_TraceLine(128,0,__PYX_ERR(0, 128, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_foreground); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_GREEN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":127
 *             if foreground.upper() == 'RED' :
 *                 color+=tty_code.foreground.RED
 *             if foreground.upper() == 'GREEN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.GREEN
 *             if foreground.upper() == 'YELLOW' :
 */
    }

    /* "ddb/output/factory_term.py":129
 *             if foreground.upper() == 'GREEN' :
 *                 color+=tty_code.foreground.GREEN
 *             if foreground.upper() == 'YELLOW' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.YELLOW
 *             if foreground.upper() == 'BLUE' :
 */
    __Pyx_TraceLine(129,0,__PYX_ERR(0, 129, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_YELLOW, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":130
 *                 color+=tty_code.foreground.GREEN
 *             if foreground.upper() == 'YELLOW' :
 *                 color+=tty_code.foreground.YELLOW             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'BLUE' :
 *                 color+=tty_code.foreground.BLUE
 */
      __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_foreground); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_YELLOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":129
 *             if foreground.upper() == 'GREEN' :
 *                 color+=tty_code.foreground.GREEN
 *             if foreground.upper() == 'YELLOW' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.YELLOW
 *             if foreground.upper() == 'BLUE' :
 */
    }

    /* "ddb/output/factory_term.py":131
 *             if foreground.upper() == 'YELLOW' :
 *                 color+=tty_code.foreground.YELLOW
 *             if foreground.upper() == 'BLUE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.BLUE
 *             if foreground.upper() == 'MAGENTA' :
 */
    __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_BLUE, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":132
 *                 color+=tty_code.foreground.YELLOW
 *             if foreground.upper() == 'BLUE' :
 *                 color+=tty_code.foreground.BLUE             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'MAGENTA' :
 *                 color+=tty_code.foreground.MAGENTA
 */
      __Pyx_TraceLine(132,0,__PYX_ERR(0, 132, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_foreground); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BLUE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":131
 *             if foreground.upper() == 'YELLOW' :
 *                 color+=tty_code.foreground.YELLOW
 *             if foreground.upper() == 'BLUE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.BLUE
 *             if foreground.upper() == 'MAGENTA' :
 */
    }

    /* "ddb/output/factory_term.py":133
 *             if foreground.upper() == 'BLUE' :
 *                 color+=tty_code.foreground.BLUE
 *             if foreground.upper() == 'MAGENTA' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.MAGENTA
 *             if foreground.upper() == 'CYAN' :
 */
    __Pyx_TraceLine(133,0,__PYX_ERR(0, 133, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_MAGENTA, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":134
 *                 color+=tty_code.foreground.BLUE
 *             if foreground.upper() == 'MAGENTA' :
 *                 color+=tty_code.foreground.MAGENTA             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'CYAN' :
 *                 color+=tty_code.foreground.CYAN
 */
      __Pyx_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_foreground); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_MAGENTA); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":133
 *             if foreground.upper() == 'BLUE' :
 *                 color+=tty_code.foreground.BLUE
 *             if foreground.upper() == 'MAGENTA' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.MAGENTA
 *             if foreground.upper() == 'CYAN' :
 */
    }

    /* "ddb/output/factory_term.py":135
 *             if foreground.upper() == 'MAGENTA' :
 *                 color+=tty_code.foreground.MAGENTA
 *             if foreground.upper() == 'CYAN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.CYAN
 *             if foreground.upper() == 'LIGHT GRAY' :
 */
    __Pyx_TraceLine(135,0,__PYX_ERR(0, 135, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_CYAN, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":136
 *                 color+=tty_code.foreground.MAGENTA
 *             if foreground.upper() == 'CYAN' :
 *                 color+=tty_code.foreground.CYAN             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'LIGHT GRAY' :
 *                 color+=tty_code.foreground.LIGHT_GRAY
 */
      __Pyx_TraceLine(136,0,__PYX_ERR(0, 136, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_foreground); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CYAN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":135
 *             if foreground.upper() == 'MAGENTA' :
 *                 color+=tty_code.foreground.MAGENTA
 *             if foreground.upper() == 'CYAN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.CYAN
 *             if foreground.upper() == 'LIGHT GRAY' :
 */
    }

    /* "ddb/output/factory_term.py":137
 *             if foreground.upper() == 'CYAN' :
 *                 color+=tty_code.foreground.CYAN
 *             if foreground.upper() == 'LIGHT GRAY' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_GRAY
 *             if foreground.upper() == 'DARK GRAY' :
 */
    __Pyx_TraceLine(137,0,__PYX_ERR(0, 137, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_LIGHT_GRAY, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 137, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":138
 *                 color+=tty_code.foreground.CYAN
 *             if foreground.upper() == 'LIGHT GRAY' :
 *                 color+=tty_code.foreground.LIGHT_GRAY             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'DARK GRAY' :
 *                 color+=tty_code.foreground.DARK_GRAY
 */
      __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_foreground); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LIGHT_GRAY_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":137
 *             if foreground.upper() == 'CYAN' :
 *                 color+=tty_code.foreground.CYAN
 *             if foreground.upper() == 'LIGHT GRAY' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_GRAY
 *             if foreground.upper() == 'DARK GRAY' :
 */
    }

    /* "ddb/output/factory_term.py":139
 *             if foreground.upper() == 'LIGHT GRAY' :
 *                 color+=tty_code.foreground.LIGHT_GRAY
 *             if foreground.upper() == 'DARK GRAY' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.DARK_GRAY
 *             if foreground.upper() == 'LIGHT RED' :
 */
    __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_DARK_GRAY, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":140
 *                 color+=tty_code.foreground.LIGHT_GRAY
 *             if foreground.upper() == 'DARK GRAY' :
 *                 color+=tty_code.foreground.DARK_GRAY             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'LIGHT RED' :
 *                 color+=tty_code.foreground.LIGHT_RED
 */
      __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_foreground); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DARK_GRAY_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":139
 *             if foreground.upper() == 'LIGHT GRAY' :
 *                 color+=tty_code.foreground.LIGHT_GRAY
 *             if foreground.upper() == 'DARK GRAY' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.DARK_GRAY
 *             if foreground.upper() == 'LIGHT RED' :
 */
    }

    /* "ddb/output/factory_term.py":141
 *             if foreground.upper() == 'DARK GRAY' :
 *                 color+=tty_code.foreground.DARK_GRAY
 *             if foreground.upper() == 'LIGHT RED' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_RED
 *             if foreground.upper() == 'LIGHT GREEN' :
 */
    __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_LIGHT_RED, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":142
 *                 color+=tty_code.foreground.DARK_GRAY
 *             if foreground.upper() == 'LIGHT RED' :
 *                 color+=tty_code.foreground.LIGHT_RED             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'LIGHT GREEN' :
 *                 color+=tty_code.foreground.LIGHT_GREEN
 */
      __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_foreground); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LIGHT_RED_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":141
 *             if foreground.upper() == 'DARK GRAY' :
 *                 color+=tty_code.foreground.DARK_GRAY
 *             if foreground.upper() == 'LIGHT RED' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_RED
 *             if foreground.upper() == 'LIGHT GREEN' :
 */
    }

    /* "ddb/output/factory_term.py":143
 *             if foreground.upper() == 'LIGHT RED' :
 *                 color+=tty_code.foreground.LIGHT_RED
 *             if foreground.upper() == 'LIGHT GREEN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_GREEN
 *             if foreground.upper() == 'LIGHT YELLOW' :
 */
    __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_LIGHT_GREEN, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":144
 *                 color+=tty_code.foreground.LIGHT_RED
 *             if foreground.upper() == 'LIGHT GREEN' :
 *                 color+=tty_code.foreground.LIGHT_GREEN             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'LIGHT YELLOW' :
 *                 color+=tty_code.foreground.LIGHT_YELLOW
 */
      __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_foreground); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LIGHT_GREEN_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":143
 *             if foreground.upper() == 'LIGHT RED' :
 *                 color+=tty_code.foreground.LIGHT_RED
 *             if foreground.upper() == 'LIGHT GREEN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_GREEN
 *             if foreground.upper() == 'LIGHT YELLOW' :
 */
    }

    /* "ddb/output/factory_term.py":145
 *             if foreground.upper() == 'LIGHT GREEN' :
 *                 color+=tty_code.foreground.LIGHT_GREEN
 *             if foreground.upper() == 'LIGHT YELLOW' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_YELLOW
 *             if foreground.upper() == 'LIGHT BLUE' :
 */
    __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_LIGHT_YELLOW, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":146
 *                 color+=tty_code.foreground.LIGHT_GREEN
 *             if foreground.upper() == 'LIGHT YELLOW' :
 *                 color+=tty_code.foreground.LIGHT_YELLOW             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'LIGHT BLUE' :
 *                 color+=tty_code.foreground.LIGHT_BLUE
 */
      __Pyx_TraceLine(146,0,__PYX_ERR(0, 146, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_foreground); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LIGHT_YELLOW_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":145
 *             if foreground.upper() == 'LIGHT GREEN' :
 *                 color+=tty_code.foreground.LIGHT_GREEN
 *             if foreground.upper() == 'LIGHT YELLOW' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_YELLOW
 *             if foreground.upper() == 'LIGHT BLUE' :
 */
    }

    /* "ddb/output/factory_term.py":147
 *             if foreground.upper() == 'LIGHT YELLOW' :
 *                 color+=tty_code.foreground.LIGHT_YELLOW
 *             if foreground.upper() == 'LIGHT BLUE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_BLUE
 *             if foreground.upper() == 'LIGHT MAGENTA' :
 */
    __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_LIGHT_BLUE, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":148
 *                 color+=tty_code.foreground.LIGHT_YELLOW
 *             if foreground.upper() == 'LIGHT BLUE' :
 *                 color+=tty_code.foreground.LIGHT_BLUE             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'LIGHT MAGENTA' :
 *                 color+=tty_code.foreground.LIGHT_MAGENTA
 */
      __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_foreground); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LIGHT_BLUE_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":147
 *             if foreground.upper() == 'LIGHT YELLOW' :
 *                 color+=tty_code.foreground.LIGHT_YELLOW
 *             if foreground.upper() == 'LIGHT BLUE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_BLUE
 *             if foreground.upper() == 'LIGHT MAGENTA' :
 */
    }

    /* "ddb/output/factory_term.py":149
 *             if foreground.upper() == 'LIGHT BLUE' :
 *                 color+=tty_code.foreground.LIGHT_BLUE
 *             if foreground.upper() == 'LIGHT MAGENTA' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_MAGENTA
 *             if foreground.upper() == 'LIGHT CYAN' :
 */
    __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_LIGHT_MAGENTA, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":150
 *                 color+=tty_code.foreground.LIGHT_BLUE
 *             if foreground.upper() == 'LIGHT MAGENTA' :
 *                 color+=tty_code.foreground.LIGHT_MAGENTA             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'LIGHT CYAN' :
 *                 color+=tty_code.foreground.LIGHT_CYAN
 */
      __Pyx_TraceLine(150,0,__PYX_ERR(0, 150, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_foreground); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LIGHT_MAGENTA_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":149
 *             if foreground.upper() == 'LIGHT BLUE' :
 *                 color+=tty_code.foreground.LIGHT_BLUE
 *             if foreground.upper() == 'LIGHT MAGENTA' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_MAGENTA
 *             if foreground.upper() == 'LIGHT CYAN' :
 */
    }

    /* "ddb/output/factory_term.py":151
 *             if foreground.upper() == 'LIGHT MAGENTA' :
 *                 color+=tty_code.foreground.LIGHT_MAGENTA
 *             if foreground.upper() == 'LIGHT CYAN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_CYAN
 *             if foreground.upper() == 'WHITE' :
 */
    __Pyx_TraceLine(151,0,__PYX_ERR(0, 151, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_LIGHT_CYAN, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":152
 *                 color+=tty_code.foreground.LIGHT_MAGENTA
 *             if foreground.upper() == 'LIGHT CYAN' :
 *                 color+=tty_code.foreground.LIGHT_CYAN             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'WHITE' :
 *                 color+=tty_code.foreground.WHITE
 */
      __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_foreground); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LIGHT_CYAN_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":151
 *             if foreground.upper() == 'LIGHT MAGENTA' :
 *                 color+=tty_code.foreground.LIGHT_MAGENTA
 *             if foreground.upper() == 'LIGHT CYAN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.LIGHT_CYAN
 *             if foreground.upper() == 'WHITE' :
 */
    }

    /* "ddb/output/factory_term.py":153
 *             if foreground.upper() == 'LIGHT CYAN' :
 *                 color+=tty_code.foreground.LIGHT_CYAN
 *             if foreground.upper() == 'WHITE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.WHITE
 *         if None != background:
 */
    __Pyx_TraceLine(153,0,__PYX_ERR(0, 153, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_foreground, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_WHITE, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":154
 *                 color+=tty_code.foreground.LIGHT_CYAN
 *             if foreground.upper() == 'WHITE' :
 *                 color+=tty_code.foreground.WHITE             # <<<<<<<<<<<<<<
 *         if None != background:
 *             if  background.upper() == 'DEFAULT' :
 */
      __Pyx_TraceLine(154,0,__PYX_ERR(0, 154, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_foreground); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_WHITE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":153
 *             if foreground.upper() == 'LIGHT CYAN' :
 *                 color+=tty_code.foreground.LIGHT_CYAN
 *             if foreground.upper() == 'WHITE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.foreground.WHITE
 *         if None != background:
 */
    }

    /* "ddb/output/factory_term.py":120
 *             color+=tty_code.attributes.BOLD
 * 
 *         if None != foreground:             # <<<<<<<<<<<<<<
 *             if foreground.upper() == 'DEFAULT' :
 *                 color+=tty_code.foreground.DEFAULT
 */
  }

  /* "ddb/output/factory_term.py":155
 *             if foreground.upper() == 'WHITE' :
 *                 color+=tty_code.foreground.WHITE
 *         if None != background:             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'DEFAULT' :
 *                 color+=tty_code.background.DEFAULT
 */
  __Pyx_TraceLine(155,0,__PYX_ERR(0, 155, __pyx_L1_error))
  __pyx_t_3 = PyObject_RichCompare(Py_None, __pyx_v_background, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":156
 *                 color+=tty_code.foreground.WHITE
 *         if None != background:
 *             if  background.upper() == 'DEFAULT' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.DEFAULT
 *             if  background.upper() == 'BLACK' :
 */
    __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_DEFAULT, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":157
 *         if None != background:
 *             if  background.upper() == 'DEFAULT' :
 *                 color+=tty_code.background.DEFAULT             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'BLACK' :
 *                 color+=tty_code.background.BLACK
 */
      __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DEFAULT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":156
 *                 color+=tty_code.foreground.WHITE
 *         if None != background:
 *             if  background.upper() == 'DEFAULT' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.DEFAULT
 *             if  background.upper() == 'BLACK' :
 */
    }

    /* "ddb/output/factory_term.py":158
 *             if  background.upper() == 'DEFAULT' :
 *                 color+=tty_code.background.DEFAULT
 *             if  background.upper() == 'BLACK' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.BLACK
 *             if  background.upper() == 'RED' :
 */
    __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_BLACK, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":159
 *                 color+=tty_code.background.DEFAULT
 *             if  background.upper() == 'BLACK' :
 *                 color+=tty_code.background.BLACK             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'RED' :
 *                 color+=tty_code.background.RED
 */
      __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_background); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_BLACK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":158
 *             if  background.upper() == 'DEFAULT' :
 *                 color+=tty_code.background.DEFAULT
 *             if  background.upper() == 'BLACK' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.BLACK
 *             if  background.upper() == 'RED' :
 */
    }

    /* "ddb/output/factory_term.py":160
 *             if  background.upper() == 'BLACK' :
 *                 color+=tty_code.background.BLACK
 *             if  background.upper() == 'RED' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.RED
 *             if  background.upper() == 'GREEN' :
 */
    __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_RED, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":161
 *                 color+=tty_code.background.BLACK
 *             if  background.upper() == 'RED' :
 *                 color+=tty_code.background.RED             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'GREEN' :
 *                 color+=tty_code.background.GREEN
 */
      __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":160
 *             if  background.upper() == 'BLACK' :
 *                 color+=tty_code.background.BLACK
 *             if  background.upper() == 'RED' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.RED
 *             if  background.upper() == 'GREEN' :
 */
    }

    /* "ddb/output/factory_term.py":162
 *             if  background.upper() == 'RED' :
 *                 color+=tty_code.background.RED
 *             if  background.upper() == 'GREEN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.GREEN
 *             if  background.upper() == 'YELLOW' :
 */
    __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_GREEN, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":163
 *                 color+=tty_code.background.RED
 *             if  background.upper() == 'GREEN' :
 *                 color+=tty_code.background.GREEN             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'YELLOW' :
 *                 color+=tty_code.background.YELLOW
 */
      __Pyx_TraceLine(163,0,__PYX_ERR(0, 163, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_background); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GREEN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":162
 *             if  background.upper() == 'RED' :
 *                 color+=tty_code.background.RED
 *             if  background.upper() == 'GREEN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.GREEN
 *             if  background.upper() == 'YELLOW' :
 */
    }

    /* "ddb/output/factory_term.py":164
 *             if  background.upper() == 'GREEN' :
 *                 color+=tty_code.background.GREEN
 *             if  background.upper() == 'YELLOW' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.YELLOW
 *             if  background.upper() == 'BLUE' :
 */
    __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_YELLOW, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":165
 *                 color+=tty_code.background.GREEN
 *             if  background.upper() == 'YELLOW' :
 *                 color+=tty_code.background.YELLOW             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'BLUE' :
 *                 color+=tty_code.background.BLUE
 */
      __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_YELLOW); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":164
 *             if  background.upper() == 'GREEN' :
 *                 color+=tty_code.background.GREEN
 *             if  background.upper() == 'YELLOW' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.YELLOW
 *             if  background.upper() == 'BLUE' :
 */
    }

    /* "ddb/output/factory_term.py":166
 *             if  background.upper() == 'YELLOW' :
 *                 color+=tty_code.background.YELLOW
 *             if  background.upper() == 'BLUE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.BLUE
 *             if  background.upper() == 'MAGENTA' :
 */
    __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_BLUE, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":167
 *                 color+=tty_code.background.YELLOW
 *             if  background.upper() == 'BLUE' :
 *                 color+=tty_code.background.BLUE             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'MAGENTA' :
 *                 color+=tty_code.background.MAGENTA
 */
      __Pyx_TraceLine(167,0,__PYX_ERR(0, 167, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_background); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_BLUE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":166
 *             if  background.upper() == 'YELLOW' :
 *                 color+=tty_code.background.YELLOW
 *             if  background.upper() == 'BLUE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.BLUE
 *             if  background.upper() == 'MAGENTA' :
 */
    }

    /* "ddb/output/factory_term.py":168
 *             if  background.upper() == 'BLUE' :
 *                 color+=tty_code.background.BLUE
 *             if  background.upper() == 'MAGENTA' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.MAGENTA
 *             if  background.upper() == 'CYAN' :
 */
    __Pyx_TraceLine(168,0,__PYX_ERR(0, 168, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_MAGENTA, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 168, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":169
 *                 color+=tty_code.background.BLUE
 *             if  background.upper() == 'MAGENTA' :
 *                 color+=tty_code.background.MAGENTA             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'CYAN' :
 *                 color+=tty_code.background.CYAN
 */
      __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MAGENTA); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":168
 *             if  background.upper() == 'BLUE' :
 *                 color+=tty_code.background.BLUE
 *             if  background.upper() == 'MAGENTA' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.MAGENTA
 *             if  background.upper() == 'CYAN' :
 */
    }

    /* "ddb/output/factory_term.py":170
 *             if  background.upper() == 'MAGENTA' :
 *                 color+=tty_code.background.MAGENTA
 *             if  background.upper() == 'CYAN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.CYAN
 *             if  background.upper() == 'LIGHT GRAY' :
 */
    __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_CYAN, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":171
 *                 color+=tty_code.background.MAGENTA
 *             if  background.upper() == 'CYAN' :
 *                 color+=tty_code.background.CYAN             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'LIGHT GRAY' :
 *                 color+=tty_code.background.LIGHT_GRAY
 */
      __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_background); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CYAN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":170
 *             if  background.upper() == 'MAGENTA' :
 *                 color+=tty_code.background.MAGENTA
 *             if  background.upper() == 'CYAN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.CYAN
 *             if  background.upper() == 'LIGHT GRAY' :
 */
    }

    /* "ddb/output/factory_term.py":172
 *             if  background.upper() == 'CYAN' :
 *                 color+=tty_code.background.CYAN
 *             if  background.upper() == 'LIGHT GRAY' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_GRAY
 *             if  background.upper() == 'DARK GRAY' :
 */
    __Pyx_TraceLine(172,0,__PYX_ERR(0, 172, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_LIGHT_GRAY, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 172, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":173
 *                 color+=tty_code.background.CYAN
 *             if  background.upper() == 'LIGHT GRAY' :
 *                 color+=tty_code.background.LIGHT_GRAY             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'DARK GRAY' :
 *                 color+=tty_code.background.DARK_GRAY
 */
      __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LIGHT_GRAY_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":172
 *             if  background.upper() == 'CYAN' :
 *                 color+=tty_code.background.CYAN
 *             if  background.upper() == 'LIGHT GRAY' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_GRAY
 *             if  background.upper() == 'DARK GRAY' :
 */
    }

    /* "ddb/output/factory_term.py":174
 *             if  background.upper() == 'LIGHT GRAY' :
 *                 color+=tty_code.background.LIGHT_GRAY
 *             if  background.upper() == 'DARK GRAY' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.DARK_GRAY
 *             if  background.upper() == 'LIGHT RED' :
 */
    __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_DARK_GRAY, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":175
 *                 color+=tty_code.background.LIGHT_GRAY
 *             if  background.upper() == 'DARK GRAY' :
 *                 color+=tty_code.background.DARK_GRAY             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'LIGHT RED' :
 *                 color+=tty_code.background.LIGHT_RED
 */
      __Pyx_TraceLine(175,0,__PYX_ERR(0, 175, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_background); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DARK_GRAY_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":174
 *             if  background.upper() == 'LIGHT GRAY' :
 *                 color+=tty_code.background.LIGHT_GRAY
 *             if  background.upper() == 'DARK GRAY' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.DARK_GRAY
 *             if  background.upper() == 'LIGHT RED' :
 */
    }

    /* "ddb/output/factory_term.py":176
 *             if  background.upper() == 'DARK GRAY' :
 *                 color+=tty_code.background.DARK_GRAY
 *             if  background.upper() == 'LIGHT RED' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_RED
 *             if  background.upper() == 'LIGHT GREEN' :
 */
    __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_LIGHT_RED, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":177
 *                 color+=tty_code.background.DARK_GRAY
 *             if  background.upper() == 'LIGHT RED' :
 *                 color+=tty_code.background.LIGHT_RED             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'LIGHT GREEN' :
 *                 color+=tty_code.background.LIGHT_GREEN
 */
      __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LIGHT_RED_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":176
 *             if  background.upper() == 'DARK GRAY' :
 *                 color+=tty_code.background.DARK_GRAY
 *             if  background.upper() == 'LIGHT RED' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_RED
 *             if  background.upper() == 'LIGHT GREEN' :
 */
    }

    /* "ddb/output/factory_term.py":178
 *             if  background.upper() == 'LIGHT RED' :
 *                 color+=tty_code.background.LIGHT_RED
 *             if  background.upper() == 'LIGHT GREEN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_GREEN
 *             if  background.upper() == 'LIGHT YELLOW' :
 */
    __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_LIGHT_GREEN, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":179
 *                 color+=tty_code.background.LIGHT_RED
 *             if  background.upper() == 'LIGHT GREEN' :
 *                 color+=tty_code.background.LIGHT_GREEN             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'LIGHT YELLOW' :
 *                 color+=tty_code.background.LIGHT_YELLOW
 */
      __Pyx_TraceLine(179,0,__PYX_ERR(0, 179, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_background); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LIGHT_GREEN_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":178
 *             if  background.upper() == 'LIGHT RED' :
 *                 color+=tty_code.background.LIGHT_RED
 *             if  background.upper() == 'LIGHT GREEN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_GREEN
 *             if  background.upper() == 'LIGHT YELLOW' :
 */
    }

    /* "ddb/output/factory_term.py":180
 *             if  background.upper() == 'LIGHT GREEN' :
 *                 color+=tty_code.background.LIGHT_GREEN
 *             if  background.upper() == 'LIGHT YELLOW' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_YELLOW
 *             if  background.upper() == 'LIGHT BLUE' :
 */
    __Pyx_TraceLine(180,0,__PYX_ERR(0, 180, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_LIGHT_YELLOW, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 180, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":181
 *                 color+=tty_code.background.LIGHT_GREEN
 *             if  background.upper() == 'LIGHT YELLOW' :
 *                 color+=tty_code.background.LIGHT_YELLOW             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'LIGHT BLUE' :
 *                 color+=tty_code.background.LIGHT_BLUE
 */
      __Pyx_TraceLine(181,0,__PYX_ERR(0, 181, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LIGHT_YELLOW_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":180
 *             if  background.upper() == 'LIGHT GREEN' :
 *                 color+=tty_code.background.LIGHT_GREEN
 *             if  background.upper() == 'LIGHT YELLOW' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_YELLOW
 *             if  background.upper() == 'LIGHT BLUE' :
 */
    }

    /* "ddb/output/factory_term.py":182
 *             if  background.upper() == 'LIGHT YELLOW' :
 *                 color+=tty_code.background.LIGHT_YELLOW
 *             if  background.upper() == 'LIGHT BLUE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_BLUE
 *             if  background.upper() == 'LIGHT MAGENTA' :
 */
    __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_LIGHT_BLUE, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":183
 *                 color+=tty_code.background.LIGHT_YELLOW
 *             if  background.upper() == 'LIGHT BLUE' :
 *                 color+=tty_code.background.LIGHT_BLUE             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'LIGHT MAGENTA' :
 *                 color+=tty_code.background.LIGHT_MAGENTA
 */
      __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_background); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LIGHT_BLUE_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":182
 *             if  background.upper() == 'LIGHT YELLOW' :
 *                 color+=tty_code.background.LIGHT_YELLOW
 *             if  background.upper() == 'LIGHT BLUE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_BLUE
 *             if  background.upper() == 'LIGHT MAGENTA' :
 */
    }

    /* "ddb/output/factory_term.py":184
 *             if  background.upper() == 'LIGHT BLUE' :
 *                 color+=tty_code.background.LIGHT_BLUE
 *             if  background.upper() == 'LIGHT MAGENTA' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_MAGENTA
 *             if  background.upper() == 'LIGHT CYAN' :
 */
    __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_LIGHT_MAGENTA, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 184, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":185
 *                 color+=tty_code.background.LIGHT_BLUE
 *             if  background.upper() == 'LIGHT MAGENTA' :
 *                 color+=tty_code.background.LIGHT_MAGENTA             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'LIGHT CYAN' :
 *                 color+=tty_code.background.LIGHT_CYAN
 */
      __Pyx_TraceLine(185,0,__PYX_ERR(0, 185, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LIGHT_MAGENTA_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":184
 *             if  background.upper() == 'LIGHT BLUE' :
 *                 color+=tty_code.background.LIGHT_BLUE
 *             if  background.upper() == 'LIGHT MAGENTA' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_MAGENTA
 *             if  background.upper() == 'LIGHT CYAN' :
 */
    }

    /* "ddb/output/factory_term.py":186
 *             if  background.upper() == 'LIGHT MAGENTA' :
 *                 color+=tty_code.background.LIGHT_MAGENTA
 *             if  background.upper() == 'LIGHT CYAN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_CYAN
 *             if  background.upper() == 'WHITE' :
 */
    __Pyx_TraceLine(186,0,__PYX_ERR(0, 186, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_LIGHT_CYAN, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":187
 *                 color+=tty_code.background.LIGHT_MAGENTA
 *             if  background.upper() == 'LIGHT CYAN' :
 *                 color+=tty_code.background.LIGHT_CYAN             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'WHITE' :
 *                 color+=tty_code.background.WHITE
 */
      __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_background); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LIGHT_CYAN_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":186
 *             if  background.upper() == 'LIGHT MAGENTA' :
 *                 color+=tty_code.background.LIGHT_MAGENTA
 *             if  background.upper() == 'LIGHT CYAN' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.LIGHT_CYAN
 *             if  background.upper() == 'WHITE' :
 */
    }

    /* "ddb/output/factory_term.py":188
 *             if  background.upper() == 'LIGHT CYAN' :
 *                 color+=tty_code.background.LIGHT_CYAN
 *             if  background.upper() == 'WHITE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.WHITE
 *         return color
 */
    __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_background, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_WHITE, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "ddb/output/factory_term.py":189
 *                 color+=tty_code.background.LIGHT_CYAN
 *             if  background.upper() == 'WHITE' :
 *                 color+=tty_code.background.WHITE             # <<<<<<<<<<<<<<
 *         return color
 * 
 */
      __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_WHITE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_color, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_color, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":188
 *             if  background.upper() == 'LIGHT CYAN' :
 *                 color+=tty_code.background.LIGHT_CYAN
 *             if  background.upper() == 'WHITE' :             # <<<<<<<<<<<<<<
 *                 color+=tty_code.background.WHITE
 *         return color
 */
    }

    /* "ddb/output/factory_term.py":155
 *             if foreground.upper() == 'WHITE' :
 *                 color+=tty_code.foreground.WHITE
 *         if None != background:             # <<<<<<<<<<<<<<
 *             if  background.upper() == 'DEFAULT' :
 *                 color+=tty_code.background.DEFAULT
 */
  }

  /* "ddb/output/factory_term.py":190
 *             if  background.upper() == 'WHITE' :
 *                 color+=tty_code.background.WHITE
 *         return color             # <<<<<<<<<<<<<<
 * 
 *     class flextable_style:
 */
  __Pyx_TraceLine(190,0,__PYX_ERR(0, 190, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_color);
  __pyx_r = __pyx_v_color;
  goto __pyx_L0;

  /* "ddb/output/factory_term.py":113
 * 
 *     @staticmethod
 *     def colors(foreground,background,dim=None,bold=None):             # <<<<<<<<<<<<<<
 *         color=''
 *         if dim !=None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.colors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_color);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":193
 * 
 *     class flextable_style:
 *         def __init__(self,style='rst'):             # <<<<<<<<<<<<<<
 *             self.whitespace=''
 *             self.line_ending='LRCF'
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_15flextable_style_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_15flextable_style_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_15flextable_style_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_15flextable_style_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_style,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject*)__pyx_n_s_rst));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 193, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_style = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 193, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.flextable_style.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_15flextable_style___init__(__pyx_self, __pyx_v_self, __pyx_v_style);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_15flextable_style___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_style) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  __Pyx_TraceFrameInit(__pyx_codeobj__8)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 193, 0, __PYX_ERR(0, 193, __pyx_L1_error));

  /* "ddb/output/factory_term.py":194
 *     class flextable_style:
 *         def __init__(self,style='rst'):
 *             self.whitespace=''             # <<<<<<<<<<<<<<
 *             self.line_ending='LRCF'
 *             self.color=flextable.modes()
 */
  __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_whitespace, __pyx_kp_s__7) < 0) __PYX_ERR(0, 194, __pyx_L1_error)

  /* "ddb/output/factory_term.py":195
 *         def __init__(self,style='rst'):
 *             self.whitespace=''
 *             self.line_ending='LRCF'             # <<<<<<<<<<<<<<
 *             self.color=flextable.modes()
 *             self.characters=flextable.characters(self.color.default,style)
 */
  __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_line_ending, __pyx_n_s_LRCF) < 0) __PYX_ERR(0, 195, __pyx_L1_error)

  /* "ddb/output/factory_term.py":196
 *             self.whitespace=''
 *             self.line_ending='LRCF'
 *             self.color=flextable.modes()             # <<<<<<<<<<<<<<
 *             self.characters=flextable.characters(self.color.default,style)
 * 
 */
  __Pyx_TraceLine(196,0,__PYX_ERR(0, 196, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_modes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __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_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_color, __pyx_t_1) < 0) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":197
 *             self.line_ending='LRCF'
 *             self.color=flextable.modes()
 *             self.characters=flextable.characters(self.color.default,style)             # <<<<<<<<<<<<<<
 * 
 *         # Helper classes
 */
  __Pyx_TraceLine(197,0,__PYX_ERR(0, 197, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_characters); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && 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_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_style};
    __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, 197, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_style};
    __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, 197, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_style);
    __Pyx_GIVEREF(__pyx_v_style);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_style);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __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;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_characters, __pyx_t_1) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":193
 * 
 *     class flextable_style:
 *         def __init__(self,style='rst'):             # <<<<<<<<<<<<<<
 *             self.whitespace=''
 *             self.line_ending='LRCF'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("ddb.output.factory_term.flextable_style.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":201
 *         # Helper classes
 *     class color:
 *         def __init__(self,foreground=None,background=None,text=None,dim=None,bold=None,default=None):             # <<<<<<<<<<<<<<
 *             self.foreground=foreground
 *             self.background=background
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_5color_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_5color_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_5color_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_5color_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_foreground = 0;
  PyObject *__pyx_v_background = 0;
  PyObject *__pyx_v_text = 0;
  PyObject *__pyx_v_dim = 0;
  PyObject *__pyx_v_bold = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_foreground,&__pyx_n_s_background,&__pyx_n_s_text,&__pyx_n_s_dim,&__pyx_n_s_bold,&__pyx_n_s_default,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)Py_None));
    values[6] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_foreground);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_background);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_text);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim);
          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_bold);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 201, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_foreground = values[1];
    __pyx_v_background = values[2];
    __pyx_v_text = values[3];
    __pyx_v_dim = values[4];
    __pyx_v_bold = values[5];
    __pyx_v_default = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 201, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.color.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_5color___init__(__pyx_self, __pyx_v_self, __pyx_v_foreground, __pyx_v_background, __pyx_v_text, __pyx_v_dim, __pyx_v_bold, __pyx_v_default);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_5color___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_foreground, PyObject *__pyx_v_background, PyObject *__pyx_v_text, PyObject *__pyx_v_dim, PyObject *__pyx_v_bold, PyObject *__pyx_v_default) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__9)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 201, 0, __PYX_ERR(0, 201, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_foreground);
  __Pyx_INCREF(__pyx_v_background);
  __Pyx_INCREF(__pyx_v_text);
  __Pyx_INCREF(__pyx_v_dim);
  __Pyx_INCREF(__pyx_v_bold);

  /* "ddb/output/factory_term.py":202
 *     class color:
 *         def __init__(self,foreground=None,background=None,text=None,dim=None,bold=None,default=None):
 *             self.foreground=foreground             # <<<<<<<<<<<<<<
 *             self.background=background
 *             self.dim=dim
 */
  __Pyx_TraceLine(202,0,__PYX_ERR(0, 202, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_foreground, __pyx_v_foreground) < 0) __PYX_ERR(0, 202, __pyx_L1_error)

  /* "ddb/output/factory_term.py":203
 *         def __init__(self,foreground=None,background=None,text=None,dim=None,bold=None,default=None):
 *             self.foreground=foreground
 *             self.background=background             # <<<<<<<<<<<<<<
 *             self.dim=dim
 *             self.bold=bold
 */
  __Pyx_TraceLine(203,0,__PYX_ERR(0, 203, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_background, __pyx_v_background) < 0) __PYX_ERR(0, 203, __pyx_L1_error)

  /* "ddb/output/factory_term.py":204
 *             self.foreground=foreground
 *             self.background=background
 *             self.dim=dim             # <<<<<<<<<<<<<<
 *             self.bold=bold
 *             self.reset=tty_code.reset.ALL
 */
  __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dim, __pyx_v_dim) < 0) __PYX_ERR(0, 204, __pyx_L1_error)

  /* "ddb/output/factory_term.py":205
 *             self.background=background
 *             self.dim=dim
 *             self.bold=bold             # <<<<<<<<<<<<<<
 *             self.reset=tty_code.reset.ALL
 *             #override missing colors
 */
  __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bold, __pyx_v_bold) < 0) __PYX_ERR(0, 205, __pyx_L1_error)

  /* "ddb/output/factory_term.py":206
 *             self.dim=dim
 *             self.bold=bold
 *             self.reset=tty_code.reset.ALL             # <<<<<<<<<<<<<<
 *             #override missing colors
 *             if None != default :
 */
  __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ALL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reset, __pyx_t_1) < 0) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":208
 *             self.reset=tty_code.reset.ALL
 *             #override missing colors
 *             if None != default :             # <<<<<<<<<<<<<<
 *                 if None== foreground:
 *                     foreground=default.foreground
 */
  __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __pyx_L1_error))
  __pyx_t_1 = PyObject_RichCompare(Py_None, __pyx_v_default, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":209
 *             #override missing colors
 *             if None != default :
 *                 if None== foreground:             # <<<<<<<<<<<<<<
 *                     foreground=default.foreground
 *                 if None== background:
 */
    __Pyx_TraceLine(209,0,__PYX_ERR(0, 209, __pyx_L1_error))
    __pyx_t_1 = PyObject_RichCompare(Py_None, __pyx_v_foreground, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 209, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "ddb/output/factory_term.py":210
 *             if None != default :
 *                 if None== foreground:
 *                     foreground=default.foreground             # <<<<<<<<<<<<<<
 *                 if None== background:
 *                     background=default.background
 */
      __Pyx_TraceLine(210,0,__PYX_ERR(0, 210, __pyx_L1_error))
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_default, __pyx_n_s_foreground); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_foreground, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":209
 *             #override missing colors
 *             if None != default :
 *                 if None== foreground:             # <<<<<<<<<<<<<<
 *                     foreground=default.foreground
 *                 if None== background:
 */
    }

    /* "ddb/output/factory_term.py":211
 *                 if None== foreground:
 *                     foreground=default.foreground
 *                 if None== background:             # <<<<<<<<<<<<<<
 *                     background=default.background
 *                 if None== dim:
 */
    __Pyx_TraceLine(211,0,__PYX_ERR(0, 211, __pyx_L1_error))
    __pyx_t_1 = PyObject_RichCompare(Py_None, __pyx_v_background, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "ddb/output/factory_term.py":212
 *                     foreground=default.foreground
 *                 if None== background:
 *                     background=default.background             # <<<<<<<<<<<<<<
 *                 if None== dim:
 *                     dim=default.dim
 */
      __Pyx_TraceLine(212,0,__PYX_ERR(0, 212, __pyx_L1_error))
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_default, __pyx_n_s_background); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_background, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":211
 *                 if None== foreground:
 *                     foreground=default.foreground
 *                 if None== background:             # <<<<<<<<<<<<<<
 *                     background=default.background
 *                 if None== dim:
 */
    }

    /* "ddb/output/factory_term.py":213
 *                 if None== background:
 *                     background=default.background
 *                 if None== dim:             # <<<<<<<<<<<<<<
 *                     dim=default.dim
 *                 if None == bold:
 */
    __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error))
    __pyx_t_1 = PyObject_RichCompare(Py_None, __pyx_v_dim, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "ddb/output/factory_term.py":214
 *                     background=default.background
 *                 if None== dim:
 *                     dim=default.dim             # <<<<<<<<<<<<<<
 *                 if None == bold:
 *                     bold=default.bold
 */
      __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __pyx_L1_error))
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_default, __pyx_n_s_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_dim, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":213
 *                 if None== background:
 *                     background=default.background
 *                 if None== dim:             # <<<<<<<<<<<<<<
 *                     dim=default.dim
 *                 if None == bold:
 */
    }

    /* "ddb/output/factory_term.py":215
 *                 if None== dim:
 *                     dim=default.dim
 *                 if None == bold:             # <<<<<<<<<<<<<<
 *                     bold=default.bold
 * 
 */
    __Pyx_TraceLine(215,0,__PYX_ERR(0, 215, __pyx_L1_error))
    __pyx_t_1 = PyObject_RichCompare(Py_None, __pyx_v_bold, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "ddb/output/factory_term.py":216
 *                     dim=default.dim
 *                 if None == bold:
 *                     bold=default.bold             # <<<<<<<<<<<<<<
 * 
 *             #print foreground,background,dim,bold
 */
      __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error))
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_default, __pyx_n_s_bold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_bold, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":215
 *                 if None== dim:
 *                     dim=default.dim
 *                 if None == bold:             # <<<<<<<<<<<<<<
 *                     bold=default.bold
 * 
 */
    }

    /* "ddb/output/factory_term.py":208
 *             self.reset=tty_code.reset.ALL
 *             #override missing colors
 *             if None != default :             # <<<<<<<<<<<<<<
 *                 if None== foreground:
 *                     foreground=default.foreground
 */
  }

  /* "ddb/output/factory_term.py":219
 * 
 *             #print foreground,background,dim,bold
 *             self.color=flextable.colors(foreground=foreground,background=background,dim=dim,bold=bold)             # <<<<<<<<<<<<<<
 *             if None !=text:
 *                 if text.isspace():
 */
  __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_flextable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_colors); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_foreground, __pyx_v_foreground) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_background, __pyx_v_background) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dim, __pyx_v_dim) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bold, __pyx_v_bold) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_color, __pyx_t_4) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":220
 *             #print foreground,background,dim,bold
 *             self.color=flextable.colors(foreground=foreground,background=background,dim=dim,bold=bold)
 *             if None !=text:             # <<<<<<<<<<<<<<
 *                 if text.isspace():
 *                     text=None
 */
  __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error))
  __pyx_t_4 = PyObject_RichCompare(Py_None, __pyx_v_text, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":221
 *             self.color=flextable.colors(foreground=foreground,background=background,dim=dim,bold=bold)
 *             if None !=text:
 *                 if text.isspace():             # <<<<<<<<<<<<<<
 *                     text=None
 *             self.text=text
 */
    __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_isspace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "ddb/output/factory_term.py":222
 *             if None !=text:
 *                 if text.isspace():
 *                     text=None             # <<<<<<<<<<<<<<
 *             self.text=text
 * 
 */
      __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error))
      __Pyx_INCREF(Py_None);
      __Pyx_DECREF_SET(__pyx_v_text, Py_None);

      /* "ddb/output/factory_term.py":221
 *             self.color=flextable.colors(foreground=foreground,background=background,dim=dim,bold=bold)
 *             if None !=text:
 *                 if text.isspace():             # <<<<<<<<<<<<<<
 *                     text=None
 *             self.text=text
 */
    }

    /* "ddb/output/factory_term.py":220
 *             #print foreground,background,dim,bold
 *             self.color=flextable.colors(foreground=foreground,background=background,dim=dim,bold=bold)
 *             if None !=text:             # <<<<<<<<<<<<<<
 *                 if text.isspace():
 *                     text=None
 */
  }

  /* "ddb/output/factory_term.py":223
 *                 if text.isspace():
 *                     text=None
 *             self.text=text             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_text, __pyx_v_text) < 0) __PYX_ERR(0, 223, __pyx_L1_error)

  /* "ddb/output/factory_term.py":201
 *         # Helper classes
 *     class color:
 *         def __init__(self,foreground=None,background=None,text=None,dim=None,bold=None,default=None):             # <<<<<<<<<<<<<<
 *             self.foreground=foreground
 *             self.background=background
 */

  /* 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("ddb.output.factory_term.color.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_foreground);
  __Pyx_XDECREF(__pyx_v_background);
  __Pyx_XDECREF(__pyx_v_text);
  __Pyx_XDECREF(__pyx_v_dim);
  __Pyx_XDECREF(__pyx_v_bold);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":226
 * 
 * 
 *         def render(self,text=None, length=None,fill_character=' ',override=None,use_color=True):             # <<<<<<<<<<<<<<
 *             if text==None:
 *                 text=self.text
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_5color_3render(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_5color_3render = {"render", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_5color_3render, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_5color_3render(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_text = 0;
  PyObject *__pyx_v_length = 0;
  PyObject *__pyx_v_fill_character = 0;
  PyObject *__pyx_v_override = 0;
  PyObject *__pyx_v_use_color = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_text,&__pyx_n_s_length,&__pyx_n_s_fill_character,&__pyx_n_s_override,&__pyx_n_s_use_color,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__10));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_text);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill_character);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_override);
          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_use_color);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 226, __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);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_text = values[1];
    __pyx_v_length = values[2];
    __pyx_v_fill_character = values[3];
    __pyx_v_override = values[4];
    __pyx_v_use_color = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("render", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 226, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.color.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_5color_2render(__pyx_self, __pyx_v_self, __pyx_v_text, __pyx_v_length, __pyx_v_fill_character, __pyx_v_override, __pyx_v_use_color);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_5color_2render(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_text, PyObject *__pyx_v_length, PyObject *__pyx_v_fill_character, PyObject *__pyx_v_override, PyObject *__pyx_v_use_color) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__11)
  __Pyx_RefNannySetupContext("render", 0);
  __Pyx_TraceCall("render", __pyx_f[0], 226, 0, __PYX_ERR(0, 226, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_text);
  __Pyx_INCREF(__pyx_v_length);

  /* "ddb/output/factory_term.py":227
 * 
 *         def render(self,text=None, length=None,fill_character=' ',override=None,use_color=True):
 *             if text==None:             # <<<<<<<<<<<<<<
 *                 text=self.text
 * 
 */
  __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error))
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":228
 *         def render(self,text=None, length=None,fill_character=' ',override=None,use_color=True):
 *             if text==None:
 *                 text=self.text             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":227
 * 
 *         def render(self,text=None, length=None,fill_character=' ',override=None,use_color=True):
 *             if text==None:             # <<<<<<<<<<<<<<
 *                 text=self.text
 * 
 */
  }

  /* "ddb/output/factory_term.py":231
 * 
 * 
 *             if None == text:             # <<<<<<<<<<<<<<
 *                 text=''
 *                 #TODO tabstop/tab
 */
  __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error))
  __pyx_t_1 = PyObject_RichCompare(Py_None, __pyx_v_text, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":232
 * 
 *             if None == text:
 *                 text=''             # <<<<<<<<<<<<<<
 *                 #TODO tabstop/tab
 * 
 */
    __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_s__7);
    __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_s__7);

    /* "ddb/output/factory_term.py":231
 * 
 * 
 *             if None == text:             # <<<<<<<<<<<<<<
 *                 text=''
 *                 #TODO tabstop/tab
 */
  }

  /* "ddb/output/factory_term.py":238
 *             #text='{0}'.format(text)
 *             # make sure its a string
 *             try:             # <<<<<<<<<<<<<<
 *                 if isinstance(text,bool)==True:
 *                     text=str(text)
 */
  __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error))
  {
    __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:*/ {

      /* "ddb/output/factory_term.py":239
 *             # make sure its a string
 *             try:
 *                 if isinstance(text,bool)==True:             # <<<<<<<<<<<<<<
 *                     text=str(text)
 *                 elif isinstance(text,int)==True:
 */
      __Pyx_TraceLine(239,0,__PYX_ERR(0, 239, __pyx_L5_error))
      __pyx_t_1 = ((PyObject*)&PyBool_Type);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = PyObject_IsInstance(__pyx_v_text, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 239, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = ((__pyx_t_2 == 1) != 0);
      if (__pyx_t_6) {

        /* "ddb/output/factory_term.py":240
 *             try:
 *                 if isinstance(text,bool)==True:
 *                     text=str(text)             # <<<<<<<<<<<<<<
 *                 elif isinstance(text,int)==True:
 *                     text=str(text)
 */
        __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L5_error))
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "ddb/output/factory_term.py":239
 *             # make sure its a string
 *             try:
 *                 if isinstance(text,bool)==True:             # <<<<<<<<<<<<<<
 *                     text=str(text)
 *                 elif isinstance(text,int)==True:
 */
        goto __pyx_L11;
      }

      /* "ddb/output/factory_term.py":241
 *                 if isinstance(text,bool)==True:
 *                     text=str(text)
 *                 elif isinstance(text,int)==True:             # <<<<<<<<<<<<<<
 *                     text=str(text)
 *                 elif isinstance(text,float)==True:
 */
      __Pyx_TraceLine(241,0,__PYX_ERR(0, 241, __pyx_L5_error))
      __pyx_t_6 = PyInt_Check(__pyx_v_text); 
      __pyx_t_2 = ((__pyx_t_6 == 1) != 0);
      if (__pyx_t_2) {

        /* "ddb/output/factory_term.py":242
 *                     text=str(text)
 *                 elif isinstance(text,int)==True:
 *                     text=str(text)             # <<<<<<<<<<<<<<
 *                 elif isinstance(text,float)==True:
 *                     text=str(text)
 */
        __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __pyx_L5_error))
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "ddb/output/factory_term.py":241
 *                 if isinstance(text,bool)==True:
 *                     text=str(text)
 *                 elif isinstance(text,int)==True:             # <<<<<<<<<<<<<<
 *                     text=str(text)
 *                 elif isinstance(text,float)==True:
 */
        goto __pyx_L11;
      }

      /* "ddb/output/factory_term.py":243
 *                 elif isinstance(text,int)==True:
 *                     text=str(text)
 *                 elif isinstance(text,float)==True:             # <<<<<<<<<<<<<<
 *                     text=str(text)
 *                 elif isinstance(text,str)==False:
 */
      __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L5_error))
      __pyx_t_2 = PyFloat_Check(__pyx_v_text); 
      __pyx_t_6 = ((__pyx_t_2 == 1) != 0);
      if (__pyx_t_6) {

        /* "ddb/output/factory_term.py":244
 *                     text=str(text)
 *                 elif isinstance(text,float)==True:
 *                     text=str(text)             # <<<<<<<<<<<<<<
 *                 elif isinstance(text,str)==False:
 *                     text=str(text)
 */
        __Pyx_TraceLine(244,0,__PYX_ERR(0, 244, __pyx_L5_error))
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "ddb/output/factory_term.py":243
 *                 elif isinstance(text,int)==True:
 *                     text=str(text)
 *                 elif isinstance(text,float)==True:             # <<<<<<<<<<<<<<
 *                     text=str(text)
 *                 elif isinstance(text,str)==False:
 */
        goto __pyx_L11;
      }

      /* "ddb/output/factory_term.py":245
 *                 elif isinstance(text,float)==True:
 *                     text=str(text)
 *                 elif isinstance(text,str)==False:             # <<<<<<<<<<<<<<
 *                     text=str(text)
 *             except:
 */
      __Pyx_TraceLine(245,0,__PYX_ERR(0, 245, __pyx_L5_error))
      __pyx_t_6 = PyString_Check(__pyx_v_text); 
      __pyx_t_2 = ((__pyx_t_6 == 0) != 0);
      if (__pyx_t_2) {

        /* "ddb/output/factory_term.py":246
 *                     text=str(text)
 *                 elif isinstance(text,str)==False:
 *                     text=str(text)             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
        __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L5_error))
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "ddb/output/factory_term.py":245
 *                 elif isinstance(text,float)==True:
 *                     text=str(text)
 *                 elif isinstance(text,str)==False:             # <<<<<<<<<<<<<<
 *                     text=str(text)
 *             except:
 */
      }
      __pyx_L11:;

      /* "ddb/output/factory_term.py":238
 *             #text='{0}'.format(text)
 *             # make sure its a string
 *             try:             # <<<<<<<<<<<<<<
 *                 if isinstance(text,bool)==True:
 *                     text=str(text)
 */
    }
    __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_1); __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":247
 *                 elif isinstance(text,str)==False:
 *                     text=str(text)
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 * 
 */
    __Pyx_TraceLine(247,0,__PYX_ERR(0, 247, __pyx_L7_except_error))
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;

    /* "ddb/output/factory_term.py":238
 *             #text='{0}'.format(text)
 *             # make sure its a string
 *             try:             # <<<<<<<<<<<<<<
 *                 if isinstance(text,bool)==True:
 *                     text=str(text)
 */
    __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_L6_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_L10_try_end:;
  }

  /* "ddb/output/factory_term.py":250
 *                 pass
 * 
 *             if text.find('\t')>-1:             # <<<<<<<<<<<<<<
 *                 text=text.replace('\t','    ')
 * 
 */
  __Pyx_TraceLine(250,0,__PYX_ERR(0, 250, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_find); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_kp_s__12) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s__12);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_int_neg_1, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":251
 * 
 *             if text.find('\t')>-1:
 *                 text=text.replace('\t','    ')             # <<<<<<<<<<<<<<
 * 
 *             text=text.rstrip()
 */
    __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __pyx_L1_error))
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_replace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":250
 *                 pass
 * 
 *             if text.find('\t')>-1:             # <<<<<<<<<<<<<<
 *                 text=text.replace('\t','    ')
 * 
 */
  }

  /* "ddb/output/factory_term.py":253
 *                 text=text.replace('\t','    ')
 * 
 *             text=text.rstrip()             # <<<<<<<<<<<<<<
 *             if length!=None:
 *                 # because python data storage differes in 2&3 (float vs int)
 */
  __Pyx_TraceLine(253,0,__PYX_ERR(0, 253, __pyx_L1_error))
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":254
 * 
 *             text=text.rstrip()
 *             if length!=None:             # <<<<<<<<<<<<<<
 *                 # because python data storage differes in 2&3 (float vs int)
 *                 length=int(length)
 */
  __Pyx_TraceLine(254,0,__PYX_ERR(0, 254, __pyx_L1_error))
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_length, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":256
 *             if length!=None:
 *                 # because python data storage differes in 2&3 (float vs int)
 *                 length=int(length)             # <<<<<<<<<<<<<<
 *                 text=text[:length].ljust(length,fill_character)
 *             if use_color is False or use_color is None:
 */
    __Pyx_TraceLine(256,0,__PYX_ERR(0, 256, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_length, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":257
 *                 # because python data storage differes in 2&3 (float vs int)
 *                 length=int(length)
 *                 text=text[:length].ljust(length,fill_character)             # <<<<<<<<<<<<<<
 *             if use_color is False or use_color is None:
 *                 return text
 */
    __Pyx_TraceLine(257,0,__PYX_ERR(0, 257, __pyx_L1_error))
    __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, NULL, &__pyx_v_length, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ljust); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_length, __pyx_v_fill_character};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_length, __pyx_v_fill_character};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_length);
      __Pyx_GIVEREF(__pyx_v_length);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_length);
      __Pyx_INCREF(__pyx_v_fill_character);
      __Pyx_GIVEREF(__pyx_v_fill_character);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_fill_character);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":254
 * 
 *             text=text.rstrip()
 *             if length!=None:             # <<<<<<<<<<<<<<
 *                 # because python data storage differes in 2&3 (float vs int)
 *                 length=int(length)
 */
  }

  /* "ddb/output/factory_term.py":258
 *                 length=int(length)
 *                 text=text[:length].ljust(length,fill_character)
 *             if use_color is False or use_color is None:             # <<<<<<<<<<<<<<
 *                 return text
 *             if None!=override:
 */
  __Pyx_TraceLine(258,0,__PYX_ERR(0, 258, __pyx_L1_error))
  __pyx_t_6 = (__pyx_v_use_color == Py_False);
  __pyx_t_11 = (__pyx_t_6 != 0);
  if (!__pyx_t_11) {
  } else {
    __pyx_t_2 = __pyx_t_11;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_11 = (__pyx_v_use_color == Py_None);
  __pyx_t_6 = (__pyx_t_11 != 0);
  __pyx_t_2 = __pyx_t_6;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":259
 *                 text=text[:length].ljust(length,fill_character)
 *             if use_color is False or use_color is None:
 *                 return text             # <<<<<<<<<<<<<<
 *             if None!=override:
 *                 return u"{0}{1}".format(override.color,text)
 */
    __Pyx_TraceLine(259,0,__PYX_ERR(0, 259, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_text);
    __pyx_r = __pyx_v_text;
    goto __pyx_L0;

    /* "ddb/output/factory_term.py":258
 *                 length=int(length)
 *                 text=text[:length].ljust(length,fill_character)
 *             if use_color is False or use_color is None:             # <<<<<<<<<<<<<<
 *                 return text
 *             if None!=override:
 */
  }

  /* "ddb/output/factory_term.py":260
 *             if use_color is False or use_color is None:
 *                 return text
 *             if None!=override:             # <<<<<<<<<<<<<<
 *                 return u"{0}{1}".format(override.color,text)
 *             return u"{0}{1}{2}".format(self.color,text,self.reset)
 */
  __Pyx_TraceLine(260,0,__PYX_ERR(0, 260, __pyx_L1_error))
  __pyx_t_1 = PyObject_RichCompare(Py_None, __pyx_v_override, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":261
 *                 return text
 *             if None!=override:
 *                 return u"{0}{1}".format(override.color,text)             # <<<<<<<<<<<<<<
 *             return u"{0}{1}{2}".format(self.color,text,self.reset)
 * 
 */
    __Pyx_TraceLine(261,0,__PYX_ERR(0, 261, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_override, __pyx_n_s_color); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_7 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_v_text};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_v_text};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_9, __pyx_t_10);
      __Pyx_INCREF(__pyx_v_text);
      __Pyx_GIVEREF(__pyx_v_text);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_9, __pyx_v_text);
      __pyx_t_10 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "ddb/output/factory_term.py":260
 *             if use_color is False or use_color is None:
 *                 return text
 *             if None!=override:             # <<<<<<<<<<<<<<
 *                 return u"{0}{1}".format(override.color,text)
 *             return u"{0}{1}{2}".format(self.color,text,self.reset)
 */
  }

  /* "ddb/output/factory_term.py":262
 *             if None!=override:
 *                 return u"{0}{1}".format(override.color,text)
 *             return u"{0}{1}{2}".format(self.color,text,self.reset)             # <<<<<<<<<<<<<<
 * 
 *     class modes:
 */
  __Pyx_TraceLine(262,0,__PYX_ERR(0, 262, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_color); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_12, __pyx_v_text, __pyx_t_10};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_12, __pyx_v_text, __pyx_t_10};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  {
    __pyx_t_13 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_t_12);
    __Pyx_INCREF(__pyx_v_text);
    __Pyx_GIVEREF(__pyx_v_text);
    PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_v_text);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_9, __pyx_t_10);
    __pyx_t_12 = 0;
    __pyx_t_10 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "ddb/output/factory_term.py":226
 * 
 * 
 *         def render(self,text=None, length=None,fill_character=' ',override=None,use_color=True):             # <<<<<<<<<<<<<<
 *             if text==None:
 *                 text=self.text
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("ddb.output.factory_term.color.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_text);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":265
 * 
 *     class modes:
 *         def __init__(self):             # <<<<<<<<<<<<<<
 *             self.default  =flextable.color('blue'      )
 *             self.error    =flextable.color('red'        ,bold=True,default=self.default)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_5modes_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_5modes_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ddb_6output_12factory_term_5modes_1__init__, METH_O, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_5modes_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_5modes___init__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_5modes___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__15)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 265, 0, __PYX_ERR(0, 265, __pyx_L1_error));

  /* "ddb/output/factory_term.py":266
 *     class modes:
 *         def __init__(self):
 *             self.default  =flextable.color('blue'      )             # <<<<<<<<<<<<<<
 *             self.error    =flextable.color('red'        ,bold=True,default=self.default)
 *             self.overflow =flextable.color('yellow'     ,default=self.default)
 */
  __Pyx_TraceLine(266,0,__PYX_ERR(0, 266, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __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_n_s_blue) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_blue);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_default, __pyx_t_1) < 0) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":267
 *         def __init__(self):
 *             self.default  =flextable.color('blue'      )
 *             self.error    =flextable.color('red'        ,bold=True,default=self.default)             # <<<<<<<<<<<<<<
 *             self.overflow =flextable.color('yellow'     ,default=self.default)
 *             self.comment  =flextable.color('yellow'     ,default=self.default)
 */
  __Pyx_TraceLine(267,0,__PYX_ERR(0, 267, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_flextable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_bold, Py_True) < 0) __PYX_ERR(0, 267, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_default, __pyx_t_2) < 0) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__16, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_error, __pyx_t_2) < 0) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":268
 *             self.default  =flextable.color('blue'      )
 *             self.error    =flextable.color('red'        ,bold=True,default=self.default)
 *             self.overflow =flextable.color('yellow'     ,default=self.default)             # <<<<<<<<<<<<<<
 *             self.comment  =flextable.color('yellow'     ,default=self.default)
 *             self.data     =flextable.color('light gray' ,default=self.default)
 */
  __Pyx_TraceLine(268,0,__PYX_ERR(0, 268, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_t_3) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__17, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_overflow, __pyx_t_3) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":269
 *             self.error    =flextable.color('red'        ,bold=True,default=self.default)
 *             self.overflow =flextable.color('yellow'     ,default=self.default)
 *             self.comment  =flextable.color('yellow'     ,default=self.default)             # <<<<<<<<<<<<<<
 *             self.data     =flextable.color('light gray' ,default=self.default)
 *             self.active   =flextable.color('white'      ,default=self.default)
 */
  __Pyx_TraceLine(269,0,__PYX_ERR(0, 269, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_t_1) < 0) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__17, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comment, __pyx_t_1) < 0) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":270
 *             self.overflow =flextable.color('yellow'     ,default=self.default)
 *             self.comment  =flextable.color('yellow'     ,default=self.default)
 *             self.data     =flextable.color('light gray' ,default=self.default)             # <<<<<<<<<<<<<<
 *             self.active   =flextable.color('white'      ,default=self.default)
 *             self.edit     =flextable.color('cyan'       ,default=self.default)
 */
  __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_flextable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_default, __pyx_t_2) < 0) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__18, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_t_2) < 0) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":271
 *             self.comment  =flextable.color('yellow'     ,default=self.default)
 *             self.data     =flextable.color('light gray' ,default=self.default)
 *             self.active   =flextable.color('white'      ,default=self.default)             # <<<<<<<<<<<<<<
 *             self.edit     =flextable.color('cyan'       ,default=self.default)
 *             self.disabled =flextable.color('dark gray'  ,default=self.default)
 */
  __Pyx_TraceLine(271,0,__PYX_ERR(0, 271, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_t_3) < 0) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__19, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_active, __pyx_t_3) < 0) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":272
 *             self.data     =flextable.color('light gray' ,default=self.default)
 *             self.active   =flextable.color('white'      ,default=self.default)
 *             self.edit     =flextable.color('cyan'       ,default=self.default)             # <<<<<<<<<<<<<<
 *             self.disabled =flextable.color('dark gray'  ,default=self.default)
 * 
 */
  __Pyx_TraceLine(272,0,__PYX_ERR(0, 272, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_t_1) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_edit, __pyx_t_1) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":273
 *             self.active   =flextable.color('white'      ,default=self.default)
 *             self.edit     =flextable.color('cyan'       ,default=self.default)
 *             self.disabled =flextable.color('dark gray'  ,default=self.default)             # <<<<<<<<<<<<<<
 * 
 *     class characters:
 */
  __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_flextable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_default, __pyx_t_2) < 0) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__21, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_disabled, __pyx_t_2) < 0) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":265
 * 
 *     class modes:
 *         def __init__(self):             # <<<<<<<<<<<<<<
 *             self.default  =flextable.color('blue'      )
 *             self.error    =flextable.color('red'        ,bold=True,default=self.default)
 */

  /* 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("ddb.output.factory_term.modes.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":278
 *         class char_walls:
 * 
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_10char_walls_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_10char_walls_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_10char_walls_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_10char_walls_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_default,&__pyx_n_s_style,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject*)__pyx_n_s_rst));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 278, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_default = values[1];
    __pyx_v_style = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 278, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.char_walls.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_10char_walls___init__(__pyx_self, __pyx_v_self, __pyx_v_default, __pyx_v_style);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_10char_walls___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__22)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 278, 0, __PYX_ERR(0, 278, __pyx_L1_error));

  /* "ddb/output/factory_term.py":279
 * 
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     r=u''
 */
  __Pyx_TraceLine(279,0,__PYX_ERR(0, 279, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_single, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 279, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":280
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     r=u''
 *                     t=u''
 */
    __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__23);
    __pyx_v_l = __pyx_kp_u__23;

    /* "ddb/output/factory_term.py":281
 *                 if style=='single':
 *                     l=u''
 *                     r=u''             # <<<<<<<<<<<<<<
 *                     t=u''
 *                     b=u''
 */
    __Pyx_TraceLine(281,0,__PYX_ERR(0, 281, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__23);
    __pyx_v_r = __pyx_kp_u__23;

    /* "ddb/output/factory_term.py":282
 *                     l=u''
 *                     r=u''
 *                     t=u''             # <<<<<<<<<<<<<<
 *                     b=u''
 *                 elif style=='double':
 */
    __Pyx_TraceLine(282,0,__PYX_ERR(0, 282, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__24);
    __pyx_v_t = __pyx_kp_u__24;

    /* "ddb/output/factory_term.py":283
 *                     r=u''
 *                     t=u''
 *                     b=u''             # <<<<<<<<<<<<<<
 *                 elif style=='double':
 *                     l=u''
 */
    __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__24);
    __pyx_v_b = __pyx_kp_u__24;

    /* "ddb/output/factory_term.py":279
 * 
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     r=u''
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":284
 *                     t=u''
 *                     b=u''
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     r=u''
 */
  __Pyx_TraceLine(284,0,__PYX_ERR(0, 284, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_double, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 284, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":285
 *                     b=u''
 *                 elif style=='double':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     r=u''
 *                     t=u''
 */
    __Pyx_TraceLine(285,0,__PYX_ERR(0, 285, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__25);
    __pyx_v_l = __pyx_kp_u__25;

    /* "ddb/output/factory_term.py":286
 *                 elif style=='double':
 *                     l=u''
 *                     r=u''             # <<<<<<<<<<<<<<
 *                     t=u''
 *                     b=u''
 */
    __Pyx_TraceLine(286,0,__PYX_ERR(0, 286, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__25);
    __pyx_v_r = __pyx_kp_u__25;

    /* "ddb/output/factory_term.py":287
 *                     l=u''
 *                     r=u''
 *                     t=u''             # <<<<<<<<<<<<<<
 *                     b=u''
 *                 elif style=='rst':
 */
    __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__26);
    __pyx_v_t = __pyx_kp_u__26;

    /* "ddb/output/factory_term.py":288
 *                     r=u''
 *                     t=u''
 *                     b=u''             # <<<<<<<<<<<<<<
 *                 elif style=='rst':
 *                     l=u'|'
 */
    __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__26);
    __pyx_v_b = __pyx_kp_u__26;

    /* "ddb/output/factory_term.py":284
 *                     t=u''
 *                     b=u''
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     r=u''
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":289
 *                     t=u''
 *                     b=u''
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u'|'
 *                     r=u'|'
 */
  __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 289, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":290
 *                     b=u''
 *                 elif style=='rst':
 *                     l=u'|'             # <<<<<<<<<<<<<<
 *                     r=u'|'
 *                     t=u'-'
 */
    __Pyx_TraceLine(290,0,__PYX_ERR(0, 290, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_l = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":291
 *                 elif style=='rst':
 *                     l=u'|'
 *                     r=u'|'             # <<<<<<<<<<<<<<
 *                     t=u'-'
 *                     b=u'-'
 */
    __Pyx_TraceLine(291,0,__PYX_ERR(0, 291, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_r = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":292
 *                     l=u'|'
 *                     r=u'|'
 *                     t=u'-'             # <<<<<<<<<<<<<<
 *                     b=u'-'
 *                 elif style=='ascii':
 */
    __Pyx_TraceLine(292,0,__PYX_ERR(0, 292, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_t = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":293
 *                     r=u'|'
 *                     t=u'-'
 *                     b=u'-'             # <<<<<<<<<<<<<<
 *                 elif style=='ascii':
 *                     l=u'|'
 */
    __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_b = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":289
 *                     t=u''
 *                     b=u''
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u'|'
 *                     r=u'|'
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":294
 *                     t=u'-'
 *                     b=u'-'
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u'|'
 *                     r=u'|'
 */
  __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_ascii, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 294, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":295
 *                     b=u'-'
 *                 elif style=='ascii':
 *                     l=u'|'             # <<<<<<<<<<<<<<
 *                     r=u'|'
 *                     t=u'-'
 */
    __Pyx_TraceLine(295,0,__PYX_ERR(0, 295, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_l = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":296
 *                 elif style=='ascii':
 *                     l=u'|'
 *                     r=u'|'             # <<<<<<<<<<<<<<
 *                     t=u'-'
 *                     b=u'-'
 */
    __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_r = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":297
 *                     l=u'|'
 *                     r=u'|'
 *                     t=u'-'             # <<<<<<<<<<<<<<
 *                     b=u'-'
 * 
 */
    __Pyx_TraceLine(297,0,__PYX_ERR(0, 297, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_t = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":298
 *                     r=u'|'
 *                     t=u'-'
 *                     b=u'-'             # <<<<<<<<<<<<<<
 * 
 *                 self.left   =flextable.color(text=l,default=default)
 */
    __Pyx_TraceLine(298,0,__PYX_ERR(0, 298, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_b = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":294
 *                     t=u'-'
 *                     b=u'-'
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u'|'
 *                     r=u'|'
 */
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":300
 *                     b=u'-'
 * 
 *                 self.left   =flextable.color(text=l,default=default)             # <<<<<<<<<<<<<<
 *                 self.right  =flextable.color(text=r,default=default)
 *                 self.top    =flextable.color(text=t,default=default)
 */
  __Pyx_TraceLine(300,0,__PYX_ERR(0, 300, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_v_l)) { __Pyx_RaiseUnboundLocalError("l"); __PYX_ERR(0, 300, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_v_l) < 0) __PYX_ERR(0, 300, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 300, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_left, __pyx_t_4) < 0) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":301
 * 
 *                 self.left   =flextable.color(text=l,default=default)
 *                 self.right  =flextable.color(text=r,default=default)             # <<<<<<<<<<<<<<
 *                 self.top    =flextable.color(text=t,default=default)
 *                 self.bottom =flextable.color(text=b,default=default)
 */
  __Pyx_TraceLine(301,0,__PYX_ERR(0, 301, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_flextable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_v_r)) { __Pyx_RaiseUnboundLocalError("r"); __PYX_ERR(0, 301, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_text, __pyx_v_r) < 0) __PYX_ERR(0, 301, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 301, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_right, __pyx_t_3) < 0) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":302
 *                 self.left   =flextable.color(text=l,default=default)
 *                 self.right  =flextable.color(text=r,default=default)
 *                 self.top    =flextable.color(text=t,default=default)             # <<<<<<<<<<<<<<
 *                 self.bottom =flextable.color(text=b,default=default)
 *         class char_center:
 */
  __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_v_t)) { __Pyx_RaiseUnboundLocalError("t"); __PYX_ERR(0, 302, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_v_t) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_top, __pyx_t_2) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":303
 *                 self.right  =flextable.color(text=r,default=default)
 *                 self.top    =flextable.color(text=t,default=default)
 *                 self.bottom =flextable.color(text=b,default=default)             # <<<<<<<<<<<<<<
 *         class char_center:
 *             def __init__(self,default=None,style='rst'):
 */
  __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_v_b)) { __Pyx_RaiseUnboundLocalError("b"); __PYX_ERR(0, 303, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_v_b) < 0) __PYX_ERR(0, 303, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 303, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bottom, __pyx_t_4) < 0) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":278
 *         class char_walls:
 * 
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */

  /* 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_AddTraceback("ddb.output.factory_term.char_walls.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":305
 *                 self.bottom =flextable.color(text=b,default=default)
 *         class char_center:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_11char_center_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_11char_center_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_11char_center_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_11char_center_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_default,&__pyx_n_s_style,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject*)__pyx_n_s_rst));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 305, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_default = values[1];
    __pyx_v_style = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 305, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.char_center.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_11char_center___init__(__pyx_self, __pyx_v_self, __pyx_v_default, __pyx_v_style);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_11char_center___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__29)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 305, 0, __PYX_ERR(0, 305, __pyx_L1_error));

  /* "ddb/output/factory_term.py":306
 *         class char_center:
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
  __Pyx_TraceLine(306,0,__PYX_ERR(0, 306, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_single, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 306, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":307
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     c=u''
 *                     r=u''
 */
    __Pyx_TraceLine(307,0,__PYX_ERR(0, 307, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__30);
    __pyx_v_l = __pyx_kp_u__30;

    /* "ddb/output/factory_term.py":308
 *                 if style=='single':
 *                     l=u''
 *                     c=u''             # <<<<<<<<<<<<<<
 *                     r=u''
 *                 elif style=='double':
 */
    __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__31);
    __pyx_v_c = __pyx_kp_u__31;

    /* "ddb/output/factory_term.py":309
 *                     l=u''
 *                     c=u''
 *                     r=u''             # <<<<<<<<<<<<<<
 *                 elif style=='double':
 *                     l=u''
 */
    __Pyx_TraceLine(309,0,__PYX_ERR(0, 309, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__32);
    __pyx_v_r = __pyx_kp_u__32;

    /* "ddb/output/factory_term.py":306
 *         class char_center:
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":310
 *                     c=u''
 *                     r=u''
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
  __Pyx_TraceLine(310,0,__PYX_ERR(0, 310, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_double, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":311
 *                     r=u''
 *                 elif style=='double':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     c=u''
 *                     r=u''
 */
    __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__33);
    __pyx_v_l = __pyx_kp_u__33;

    /* "ddb/output/factory_term.py":312
 *                 elif style=='double':
 *                     l=u''
 *                     c=u''             # <<<<<<<<<<<<<<
 *                     r=u''
 *                 elif style=='rst':
 */
    __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__34);
    __pyx_v_c = __pyx_kp_u__34;

    /* "ddb/output/factory_term.py":313
 *                     l=u''
 *                     c=u''
 *                     r=u''             # <<<<<<<<<<<<<<
 *                 elif style=='rst':
 *                     l=u'|'
 */
    __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__35);
    __pyx_v_r = __pyx_kp_u__35;

    /* "ddb/output/factory_term.py":310
 *                     c=u''
 *                     r=u''
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":314
 *                     c=u''
 *                     r=u''
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u'|'
 *                     c=u'|'
 */
  __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 314, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":315
 *                     r=u''
 *                 elif style=='rst':
 *                     l=u'|'             # <<<<<<<<<<<<<<
 *                     c=u'|'
 *                     r=u'|'
 */
    __Pyx_TraceLine(315,0,__PYX_ERR(0, 315, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_l = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":316
 *                 elif style=='rst':
 *                     l=u'|'
 *                     c=u'|'             # <<<<<<<<<<<<<<
 *                     r=u'|'
 *                 elif style=='ascii':
 */
    __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_c = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":317
 *                     l=u'|'
 *                     c=u'|'
 *                     r=u'|'             # <<<<<<<<<<<<<<
 *                 elif style=='ascii':
 *                     l=u'|'
 */
    __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_r = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":314
 *                     c=u''
 *                     r=u''
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u'|'
 *                     c=u'|'
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":318
 *                     c=u'|'
 *                     r=u'|'
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u'|'
 *                     c=u'|'
 */
  __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_ascii, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 318, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":319
 *                     r=u'|'
 *                 elif style=='ascii':
 *                     l=u'|'             # <<<<<<<<<<<<<<
 *                     c=u'|'
 *                     r=u'|'
 */
    __Pyx_TraceLine(319,0,__PYX_ERR(0, 319, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_l = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":320
 *                 elif style=='ascii':
 *                     l=u'|'
 *                     c=u'|'             # <<<<<<<<<<<<<<
 *                     r=u'|'
 * 
 */
    __Pyx_TraceLine(320,0,__PYX_ERR(0, 320, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_c = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":321
 *                     l=u'|'
 *                     c=u'|'
 *                     r=u'|'             # <<<<<<<<<<<<<<
 * 
 *                 self.center = flextable.color(text=c,default=default)
 */
    __Pyx_TraceLine(321,0,__PYX_ERR(0, 321, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_r = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":318
 *                     c=u'|'
 *                     r=u'|'
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u'|'
 *                     c=u'|'
 */
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":323
 *                     r=u'|'
 * 
 *                 self.center = flextable.color(text=c,default=default)             # <<<<<<<<<<<<<<
 *                 self.left   = flextable.color(text=l,default=default)
 *                 self.right  = flextable.color(text=r,default=default)
 */
  __Pyx_TraceLine(323,0,__PYX_ERR(0, 323, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_v_c)) { __Pyx_RaiseUnboundLocalError("c"); __PYX_ERR(0, 323, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_v_c) < 0) __PYX_ERR(0, 323, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 323, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_center, __pyx_t_4) < 0) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":324
 * 
 *                 self.center = flextable.color(text=c,default=default)
 *                 self.left   = flextable.color(text=l,default=default)             # <<<<<<<<<<<<<<
 *                 self.right  = flextable.color(text=r,default=default)
 * 
 */
  __Pyx_TraceLine(324,0,__PYX_ERR(0, 324, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_flextable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_v_l)) { __Pyx_RaiseUnboundLocalError("l"); __PYX_ERR(0, 324, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_text, __pyx_v_l) < 0) __PYX_ERR(0, 324, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 324, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_left, __pyx_t_3) < 0) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":325
 *                 self.center = flextable.color(text=c,default=default)
 *                 self.left   = flextable.color(text=l,default=default)
 *                 self.right  = flextable.color(text=r,default=default)             # <<<<<<<<<<<<<<
 * 
 *         class char_rst:
 */
  __Pyx_TraceLine(325,0,__PYX_ERR(0, 325, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_v_r)) { __Pyx_RaiseUnboundLocalError("r"); __PYX_ERR(0, 325, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_v_r) < 0) __PYX_ERR(0, 325, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 325, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_right, __pyx_t_2) < 0) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":305
 *                 self.bottom =flextable.color(text=b,default=default)
 *         class char_center:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */

  /* 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_AddTraceback("ddb.output.factory_term.char_center.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":328
 * 
 *         class char_rst:
 *             def __init__(self,default=None):             # <<<<<<<<<<<<<<
 *                 self.edge   =flextable.color(text='+',default=default)
 *                 self.space  =flextable.color(text=' ',default=default)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_8char_rst_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_8char_rst_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_8char_rst_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_8char_rst_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_default,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_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, "__init__") < 0)) __PYX_ERR(0, 328, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_default = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 328, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.char_rst.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_8char_rst___init__(__pyx_self, __pyx_v_self, __pyx_v_default);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_8char_rst___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__36)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 328, 0, __PYX_ERR(0, 328, __pyx_L1_error));

  /* "ddb/output/factory_term.py":329
 *         class char_rst:
 *             def __init__(self,default=None):
 *                 self.edge   =flextable.color(text='+',default=default)             # <<<<<<<<<<<<<<
 *                 self.space  =flextable.color(text=' ',default=default)
 *                 self.header =flextable.color(text='=',default=default)
 */
  __Pyx_TraceLine(329,0,__PYX_ERR(0, 329, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_flextable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_text, __pyx_kp_s__37) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_edge, __pyx_t_3) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":330
 *             def __init__(self,default=None):
 *                 self.edge   =flextable.color(text='+',default=default)
 *                 self.space  =flextable.color(text=' ',default=default)             # <<<<<<<<<<<<<<
 *                 self.header =flextable.color(text='=',default=default)
 *                 self.row    =flextable.color(text='-',default=default)
 */
  __Pyx_TraceLine(330,0,__PYX_ERR(0, 330, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_kp_s__10) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_space, __pyx_t_2) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":331
 *                 self.edge   =flextable.color(text='+',default=default)
 *                 self.space  =flextable.color(text=' ',default=default)
 *                 self.header =flextable.color(text='=',default=default)             # <<<<<<<<<<<<<<
 *                 self.row    =flextable.color(text='-',default=default)
 * 
 */
  __Pyx_TraceLine(331,0,__PYX_ERR(0, 331, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_kp_s__38) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_t_1) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":332
 *                 self.space  =flextable.color(text=' ',default=default)
 *                 self.header =flextable.color(text='=',default=default)
 *                 self.row    =flextable.color(text='-',default=default)             # <<<<<<<<<<<<<<
 * 
 *         class char_bottom:
 */
  __Pyx_TraceLine(332,0,__PYX_ERR(0, 332, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_flextable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_text, __pyx_kp_s__28) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_row, __pyx_t_3) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":328
 * 
 *         class char_rst:
 *             def __init__(self,default=None):             # <<<<<<<<<<<<<<
 *                 self.edge   =flextable.color(text='+',default=default)
 *                 self.space  =flextable.color(text=' ',default=default)
 */

  /* 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("ddb.output.factory_term.char_rst.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":335
 * 
 *         class char_bottom:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_11char_bottom_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_11char_bottom_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_11char_bottom_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_11char_bottom_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_default,&__pyx_n_s_style,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject*)__pyx_n_s_rst));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 335, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_default = values[1];
    __pyx_v_style = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 335, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.char_bottom.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_11char_bottom___init__(__pyx_self, __pyx_v_self, __pyx_v_default, __pyx_v_style);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_11char_bottom___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__39)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 335, 0, __PYX_ERR(0, 335, __pyx_L1_error));

  /* "ddb/output/factory_term.py":336
 *         class char_bottom:
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
  __Pyx_TraceLine(336,0,__PYX_ERR(0, 336, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_single, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 336, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":337
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     c=u''
 *                     r=u''
 */
    __Pyx_TraceLine(337,0,__PYX_ERR(0, 337, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__40);
    __pyx_v_l = __pyx_kp_u__40;

    /* "ddb/output/factory_term.py":338
 *                 if style=='single':
 *                     l=u''
 *                     c=u''             # <<<<<<<<<<<<<<
 *                     r=u''
 *                 elif style=='double':
 */
    __Pyx_TraceLine(338,0,__PYX_ERR(0, 338, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__41);
    __pyx_v_c = __pyx_kp_u__41;

    /* "ddb/output/factory_term.py":339
 *                     l=u''
 *                     c=u''
 *                     r=u''             # <<<<<<<<<<<<<<
 *                 elif style=='double':
 *                     l=u''
 */
    __Pyx_TraceLine(339,0,__PYX_ERR(0, 339, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__42);
    __pyx_v_r = __pyx_kp_u__42;

    /* "ddb/output/factory_term.py":336
 *         class char_bottom:
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":340
 *                     c=u''
 *                     r=u''
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
  __Pyx_TraceLine(340,0,__PYX_ERR(0, 340, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_double, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 340, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":341
 *                     r=u''
 *                 elif style=='double':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     c=u''
 *                     r=u''
 */
    __Pyx_TraceLine(341,0,__PYX_ERR(0, 341, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__43);
    __pyx_v_l = __pyx_kp_u__43;

    /* "ddb/output/factory_term.py":342
 *                 elif style=='double':
 *                     l=u''
 *                     c=u''             # <<<<<<<<<<<<<<
 *                     r=u''
 *                 elif style=='rst':
 */
    __Pyx_TraceLine(342,0,__PYX_ERR(0, 342, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__44);
    __pyx_v_c = __pyx_kp_u__44;

    /* "ddb/output/factory_term.py":343
 *                     l=u''
 *                     c=u''
 *                     r=u''             # <<<<<<<<<<<<<<
 *                 elif style=='rst':
 *                     l=u'+'
 */
    __Pyx_TraceLine(343,0,__PYX_ERR(0, 343, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__45);
    __pyx_v_r = __pyx_kp_u__45;

    /* "ddb/output/factory_term.py":340
 *                     c=u''
 *                     r=u''
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":344
 *                     c=u''
 *                     r=u''
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u'+'
 *                     c=u'+'
 */
  __Pyx_TraceLine(344,0,__PYX_ERR(0, 344, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 344, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":345
 *                     r=u''
 *                 elif style=='rst':
 *                     l=u'+'             # <<<<<<<<<<<<<<
 *                     c=u'+'
 *                     r=u'+'
 */
    __Pyx_TraceLine(345,0,__PYX_ERR(0, 345, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__37);
    __pyx_v_l = __pyx_kp_u__37;

    /* "ddb/output/factory_term.py":346
 *                 elif style=='rst':
 *                     l=u'+'
 *                     c=u'+'             # <<<<<<<<<<<<<<
 *                     r=u'+'
 *                 elif style=='ascii':
 */
    __Pyx_TraceLine(346,0,__PYX_ERR(0, 346, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__37);
    __pyx_v_c = __pyx_kp_u__37;

    /* "ddb/output/factory_term.py":347
 *                     l=u'+'
 *                     c=u'+'
 *                     r=u'+'             # <<<<<<<<<<<<<<
 *                 elif style=='ascii':
 *                     l=u'-'
 */
    __Pyx_TraceLine(347,0,__PYX_ERR(0, 347, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__37);
    __pyx_v_r = __pyx_kp_u__37;

    /* "ddb/output/factory_term.py":344
 *                     c=u''
 *                     r=u''
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u'+'
 *                     c=u'+'
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":348
 *                     c=u'+'
 *                     r=u'+'
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u'-'
 */
  __Pyx_TraceLine(348,0,__PYX_ERR(0, 348, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_ascii, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 348, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":349
 *                     r=u'+'
 *                 elif style=='ascii':
 *                     l=u'-'             # <<<<<<<<<<<<<<
 *                     c=u'-'
 *                     r=u'-'
 */
    __Pyx_TraceLine(349,0,__PYX_ERR(0, 349, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_l = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":350
 *                 elif style=='ascii':
 *                     l=u'-'
 *                     c=u'-'             # <<<<<<<<<<<<<<
 *                     r=u'-'
 * 
 */
    __Pyx_TraceLine(350,0,__PYX_ERR(0, 350, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_c = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":351
 *                     l=u'-'
 *                     c=u'-'
 *                     r=u'-'             # <<<<<<<<<<<<<<
 * 
 *                 self.left   = flextable.color(text=l,default=default)
 */
    __Pyx_TraceLine(351,0,__PYX_ERR(0, 351, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_r = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":348
 *                     c=u'+'
 *                     r=u'+'
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u'-'
 */
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":353
 *                     r=u'-'
 * 
 *                 self.left   = flextable.color(text=l,default=default)             # <<<<<<<<<<<<<<
 *                 self.center = flextable.color(text=c,default=default)
 *                 self.right  = flextable.color(text=r,default=default)
 */
  __Pyx_TraceLine(353,0,__PYX_ERR(0, 353, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_v_l)) { __Pyx_RaiseUnboundLocalError("l"); __PYX_ERR(0, 353, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_v_l) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_left, __pyx_t_4) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":354
 * 
 *                 self.left   = flextable.color(text=l,default=default)
 *                 self.center = flextable.color(text=c,default=default)             # <<<<<<<<<<<<<<
 *                 self.right  = flextable.color(text=r,default=default)
 *         class char_top:
 */
  __Pyx_TraceLine(354,0,__PYX_ERR(0, 354, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_flextable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_v_c)) { __Pyx_RaiseUnboundLocalError("c"); __PYX_ERR(0, 354, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_text, __pyx_v_c) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_center, __pyx_t_3) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":355
 *                 self.left   = flextable.color(text=l,default=default)
 *                 self.center = flextable.color(text=c,default=default)
 *                 self.right  = flextable.color(text=r,default=default)             # <<<<<<<<<<<<<<
 *         class char_top:
 *             def __init__(self,default=None,style='rst'):
 */
  __Pyx_TraceLine(355,0,__PYX_ERR(0, 355, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_v_r)) { __Pyx_RaiseUnboundLocalError("r"); __PYX_ERR(0, 355, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_v_r) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_right, __pyx_t_2) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":335
 * 
 *         class char_bottom:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */

  /* 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_AddTraceback("ddb.output.factory_term.char_bottom.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":357
 *                 self.right  = flextable.color(text=r,default=default)
 *         class char_top:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style == 'single':
 *                     l=u''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_8char_top_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_8char_top_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_8char_top_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_8char_top_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_default,&__pyx_n_s_style,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject*)__pyx_n_s_rst));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 357, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_default = values[1];
    __pyx_v_style = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 357, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.char_top.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_8char_top___init__(__pyx_self, __pyx_v_self, __pyx_v_default, __pyx_v_style);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_8char_top___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__46)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 357, 0, __PYX_ERR(0, 357, __pyx_L1_error));

  /* "ddb/output/factory_term.py":358
 *         class char_top:
 *             def __init__(self,default=None,style='rst'):
 *                 if style == 'single':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
  __Pyx_TraceLine(358,0,__PYX_ERR(0, 358, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_single, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 358, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":359
 *             def __init__(self,default=None,style='rst'):
 *                 if style == 'single':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     c=u''
 *                     r=u''
 */
    __Pyx_TraceLine(359,0,__PYX_ERR(0, 359, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__47);
    __pyx_v_l = __pyx_kp_u__47;

    /* "ddb/output/factory_term.py":360
 *                 if style == 'single':
 *                     l=u''
 *                     c=u''             # <<<<<<<<<<<<<<
 *                     r=u''
 *                 elif style=='double':
 */
    __Pyx_TraceLine(360,0,__PYX_ERR(0, 360, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__48);
    __pyx_v_c = __pyx_kp_u__48;

    /* "ddb/output/factory_term.py":361
 *                     l=u''
 *                     c=u''
 *                     r=u''             # <<<<<<<<<<<<<<
 *                 elif style=='double':
 *                     l=u''
 */
    __Pyx_TraceLine(361,0,__PYX_ERR(0, 361, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__49);
    __pyx_v_r = __pyx_kp_u__49;

    /* "ddb/output/factory_term.py":358
 *         class char_top:
 *             def __init__(self,default=None,style='rst'):
 *                 if style == 'single':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":362
 *                     c=u''
 *                     r=u''
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
  __Pyx_TraceLine(362,0,__PYX_ERR(0, 362, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_double, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 362, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":363
 *                     r=u''
 *                 elif style=='double':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     c=u''
 *                     r=u''
 */
    __Pyx_TraceLine(363,0,__PYX_ERR(0, 363, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__50);
    __pyx_v_l = __pyx_kp_u__50;

    /* "ddb/output/factory_term.py":364
 *                 elif style=='double':
 *                     l=u''
 *                     c=u''             # <<<<<<<<<<<<<<
 *                     r=u''
 *                 elif style=='rst':
 */
    __Pyx_TraceLine(364,0,__PYX_ERR(0, 364, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__51);
    __pyx_v_c = __pyx_kp_u__51;

    /* "ddb/output/factory_term.py":365
 *                     l=u''
 *                     c=u''
 *                     r=u''             # <<<<<<<<<<<<<<
 *                 elif style=='rst':
 *                     l=u'|'
 */
    __Pyx_TraceLine(365,0,__PYX_ERR(0, 365, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__52);
    __pyx_v_r = __pyx_kp_u__52;

    /* "ddb/output/factory_term.py":362
 *                     c=u''
 *                     r=u''
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u''
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":366
 *                     c=u''
 *                     r=u''
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u'|'
 *                     c=u'|'
 */
  __Pyx_TraceLine(366,0,__PYX_ERR(0, 366, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 366, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":367
 *                     r=u''
 *                 elif style=='rst':
 *                     l=u'|'             # <<<<<<<<<<<<<<
 *                     c=u'|'
 *                     r=u'|'
 */
    __Pyx_TraceLine(367,0,__PYX_ERR(0, 367, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_l = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":368
 *                 elif style=='rst':
 *                     l=u'|'
 *                     c=u'|'             # <<<<<<<<<<<<<<
 *                     r=u'|'
 *                 elif style=='ascii':
 */
    __Pyx_TraceLine(368,0,__PYX_ERR(0, 368, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_c = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":369
 *                     l=u'|'
 *                     c=u'|'
 *                     r=u'|'             # <<<<<<<<<<<<<<
 *                 elif style=='ascii':
 *                     l=u'-'
 */
    __Pyx_TraceLine(369,0,__PYX_ERR(0, 369, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__27);
    __pyx_v_r = __pyx_kp_u__27;

    /* "ddb/output/factory_term.py":366
 *                     c=u''
 *                     r=u''
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u'|'
 *                     c=u'|'
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":370
 *                     c=u'|'
 *                     r=u'|'
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u'-'
 */
  __Pyx_TraceLine(370,0,__PYX_ERR(0, 370, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_ascii, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 370, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":371
 *                     r=u'|'
 *                 elif style=='ascii':
 *                     l=u'-'             # <<<<<<<<<<<<<<
 *                     c=u'-'
 *                     r=u'-'
 */
    __Pyx_TraceLine(371,0,__PYX_ERR(0, 371, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_l = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":372
 *                 elif style=='ascii':
 *                     l=u'-'
 *                     c=u'-'             # <<<<<<<<<<<<<<
 *                     r=u'-'
 * 
 */
    __Pyx_TraceLine(372,0,__PYX_ERR(0, 372, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_c = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":373
 *                     l=u'-'
 *                     c=u'-'
 *                     r=u'-'             # <<<<<<<<<<<<<<
 * 
 *                 self.left   = flextable.color(text=l,default=default)
 */
    __Pyx_TraceLine(373,0,__PYX_ERR(0, 373, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_r = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":370
 *                     c=u'|'
 *                     r=u'|'
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u'-'
 */
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":375
 *                     r=u'-'
 * 
 *                 self.left   = flextable.color(text=l,default=default)             # <<<<<<<<<<<<<<
 *                 self.right  = flextable.color(text=r,default=default)
 *                 self.center = flextable.color(text=c,default=default)
 */
  __Pyx_TraceLine(375,0,__PYX_ERR(0, 375, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_v_l)) { __Pyx_RaiseUnboundLocalError("l"); __PYX_ERR(0, 375, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_v_l) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_left, __pyx_t_4) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":376
 * 
 *                 self.left   = flextable.color(text=l,default=default)
 *                 self.right  = flextable.color(text=r,default=default)             # <<<<<<<<<<<<<<
 *                 self.center = flextable.color(text=c,default=default)
 *         class char_header:
 */
  __Pyx_TraceLine(376,0,__PYX_ERR(0, 376, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_flextable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_v_r)) { __Pyx_RaiseUnboundLocalError("r"); __PYX_ERR(0, 376, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_text, __pyx_v_r) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_right, __pyx_t_3) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":377
 *                 self.left   = flextable.color(text=l,default=default)
 *                 self.right  = flextable.color(text=r,default=default)
 *                 self.center = flextable.color(text=c,default=default)             # <<<<<<<<<<<<<<
 *         class char_header:
 *             def __init__(self,default=None,style='rst'):
 */
  __Pyx_TraceLine(377,0,__PYX_ERR(0, 377, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_v_c)) { __Pyx_RaiseUnboundLocalError("c"); __PYX_ERR(0, 377, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_v_c) < 0) __PYX_ERR(0, 377, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 377, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_center, __pyx_t_2) < 0) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":357
 *                 self.right  = flextable.color(text=r,default=default)
 *         class char_top:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style == 'single':
 *                     l=u''
 */

  /* 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_AddTraceback("ddb.output.factory_term.char_top.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":379
 *                 self.center = flextable.color(text=c,default=default)
 *         class char_header:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_11char_header_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_11char_header_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_11char_header_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_11char_header_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_default,&__pyx_n_s_style,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject*)__pyx_n_s_rst));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 379, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_default = values[1];
    __pyx_v_style = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 379, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.char_header.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_11char_header___init__(__pyx_self, __pyx_v_self, __pyx_v_default, __pyx_v_style);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_11char_header___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__53)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 379, 0, __PYX_ERR(0, 379, __pyx_L1_error));

  /* "ddb/output/factory_term.py":380
 *         class char_header:
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u' '
 */
  __Pyx_TraceLine(380,0,__PYX_ERR(0, 380, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_single, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 380, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":381
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=u''
 */
    __Pyx_TraceLine(381,0,__PYX_ERR(0, 381, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__32);
    __pyx_v_l = __pyx_kp_u__32;

    /* "ddb/output/factory_term.py":382
 *                 if style=='single':
 *                     l=u''
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=u''
 *                 elif style=='double':
 */
    __Pyx_TraceLine(382,0,__PYX_ERR(0, 382, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":383
 *                     l=u''
 *                     c=u' '
 *                     r=u''             # <<<<<<<<<<<<<<
 *                 elif style=='double':
 *                     l=u''
 */
    __Pyx_TraceLine(383,0,__PYX_ERR(0, 383, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__30);
    __pyx_v_r = __pyx_kp_u__30;

    /* "ddb/output/factory_term.py":380
 *         class char_header:
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u' '
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":384
 *                     c=u' '
 *                     r=u''
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u' '
 */
  __Pyx_TraceLine(384,0,__PYX_ERR(0, 384, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_double, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 384, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":385
 *                     r=u''
 *                 elif style=='double':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=u''
 */
    __Pyx_TraceLine(385,0,__PYX_ERR(0, 385, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__54);
    __pyx_v_l = __pyx_kp_u__54;

    /* "ddb/output/factory_term.py":386
 *                 elif style=='double':
 *                     l=u''
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=u''
 *                 elif style=='rst':
 */
    __Pyx_TraceLine(386,0,__PYX_ERR(0, 386, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":387
 *                     l=u''
 *                     c=u' '
 *                     r=u''             # <<<<<<<<<<<<<<
 *                 elif style=='rst':
 *                     l=u''
 */
    __Pyx_TraceLine(387,0,__PYX_ERR(0, 387, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__55);
    __pyx_v_r = __pyx_kp_u__55;

    /* "ddb/output/factory_term.py":384
 *                     c=u' '
 *                     r=u''
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u' '
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":388
 *                     c=u' '
 *                     r=u''
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u' '
 */
  __Pyx_TraceLine(388,0,__PYX_ERR(0, 388, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 388, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":389
 *                     r=u''
 *                 elif style=='rst':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=u''
 */
    __Pyx_TraceLine(389,0,__PYX_ERR(0, 389, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__7);
    __pyx_v_l = __pyx_kp_u__7;

    /* "ddb/output/factory_term.py":390
 *                 elif style=='rst':
 *                     l=u''
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=u''
 *                 elif style=='ascii':
 */
    __Pyx_TraceLine(390,0,__PYX_ERR(0, 390, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":391
 *                     l=u''
 *                     c=u' '
 *                     r=u''             # <<<<<<<<<<<<<<
 *                 elif style=='ascii':
 *                     l=u''
 */
    __Pyx_TraceLine(391,0,__PYX_ERR(0, 391, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__7);
    __pyx_v_r = __pyx_kp_u__7;

    /* "ddb/output/factory_term.py":388
 *                     c=u' '
 *                     r=u''
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u' '
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":392
 *                     c=u' '
 *                     r=u''
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u' '
 */
  __Pyx_TraceLine(392,0,__PYX_ERR(0, 392, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_ascii, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 392, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":393
 *                     r=u''
 *                 elif style=='ascii':
 *                     l=u''             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=u''
 */
    __Pyx_TraceLine(393,0,__PYX_ERR(0, 393, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__7);
    __pyx_v_l = __pyx_kp_u__7;

    /* "ddb/output/factory_term.py":394
 *                 elif style=='ascii':
 *                     l=u''
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=u''
 * 
 */
    __Pyx_TraceLine(394,0,__PYX_ERR(0, 394, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":395
 *                     l=u''
 *                     c=u' '
 *                     r=u''             # <<<<<<<<<<<<<<
 * 
 *                 self.left   = flextable.color(text=l,default=default,foreground='White')
 */
    __Pyx_TraceLine(395,0,__PYX_ERR(0, 395, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__7);
    __pyx_v_r = __pyx_kp_u__7;

    /* "ddb/output/factory_term.py":392
 *                     c=u' '
 *                     r=u''
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u''
 *                     c=u' '
 */
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":397
 *                     r=u''
 * 
 *                 self.left   = flextable.color(text=l,default=default,foreground='White')             # <<<<<<<<<<<<<<
 *                 self.right  = flextable.color(text=r,default=default,foreground='White')
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 */
  __Pyx_TraceLine(397,0,__PYX_ERR(0, 397, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_v_l)) { __Pyx_RaiseUnboundLocalError("l"); __PYX_ERR(0, 397, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_v_l) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_foreground, __pyx_n_s_White) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_left, __pyx_t_4) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":398
 * 
 *                 self.left   = flextable.color(text=l,default=default,foreground='White')
 *                 self.right  = flextable.color(text=r,default=default,foreground='White')             # <<<<<<<<<<<<<<
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_mid_header:
 */
  __Pyx_TraceLine(398,0,__PYX_ERR(0, 398, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_flextable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_v_r)) { __Pyx_RaiseUnboundLocalError("r"); __PYX_ERR(0, 398, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_text, __pyx_v_r) < 0) __PYX_ERR(0, 398, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 398, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_foreground, __pyx_n_s_White) < 0) __PYX_ERR(0, 398, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_right, __pyx_t_3) < 0) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":399
 *                 self.left   = flextable.color(text=l,default=default,foreground='White')
 *                 self.right  = flextable.color(text=r,default=default,foreground='White')
 *                 self.center = flextable.color(text=c,default=default,foreground='green')             # <<<<<<<<<<<<<<
 *         class char_mid_header:
 *             def __init__(self,default=None,style='rst'):
 */
  __Pyx_TraceLine(399,0,__PYX_ERR(0, 399, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_v_c)) { __Pyx_RaiseUnboundLocalError("c"); __PYX_ERR(0, 399, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_v_c) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_foreground, __pyx_n_s_green) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_center, __pyx_t_2) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":379
 *                 self.center = flextable.color(text=c,default=default)
 *         class char_header:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */

  /* 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_AddTraceback("ddb.output.factory_term.char_header.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":401
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_mid_header:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style == 'single':
 *                     l=u'-'
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_15char_mid_header_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_15char_mid_header_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_15char_mid_header_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_15char_mid_header_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_default,&__pyx_n_s_style,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject*)__pyx_n_s_rst));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 401, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_default = values[1];
    __pyx_v_style = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 401, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.char_mid_header.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_15char_mid_header___init__(__pyx_self, __pyx_v_self, __pyx_v_default, __pyx_v_style);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_15char_mid_header___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__56)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 401, 0, __PYX_ERR(0, 401, __pyx_L1_error));

  /* "ddb/output/factory_term.py":402
 *         class char_mid_header:
 *             def __init__(self,default=None,style='rst'):
 *                 if style == 'single':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u' '
 */
  __Pyx_TraceLine(402,0,__PYX_ERR(0, 402, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_single, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 402, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":403
 *             def __init__(self,default=None,style='rst'):
 *                 if style == 'single':
 *                     l=u'-'             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=u'-'
 */
    __Pyx_TraceLine(403,0,__PYX_ERR(0, 403, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_l = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":404
 *                 if style == 'single':
 *                     l=u'-'
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=u'-'
 *                 elif style== 'double':
 */
    __Pyx_TraceLine(404,0,__PYX_ERR(0, 404, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":405
 *                     l=u'-'
 *                     c=u' '
 *                     r=u'-'             # <<<<<<<<<<<<<<
 *                 elif style== 'double':
 *                     l=u'-'
 */
    __Pyx_TraceLine(405,0,__PYX_ERR(0, 405, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_r = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":402
 *         class char_mid_header:
 *             def __init__(self,default=None,style='rst'):
 *                 if style == 'single':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u' '
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":406
 *                     c=u' '
 *                     r=u'-'
 *                 elif style== 'double':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u' '
 */
  __Pyx_TraceLine(406,0,__PYX_ERR(0, 406, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_double, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 406, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":407
 *                     r=u'-'
 *                 elif style== 'double':
 *                     l=u'-'             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=u'-'
 */
    __Pyx_TraceLine(407,0,__PYX_ERR(0, 407, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_l = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":408
 *                 elif style== 'double':
 *                     l=u'-'
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=u'-'
 *                 elif style=='rst':
 */
    __Pyx_TraceLine(408,0,__PYX_ERR(0, 408, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":409
 *                     l=u'-'
 *                     c=u' '
 *                     r=u'-'             # <<<<<<<<<<<<<<
 *                 elif style=='rst':
 *                     l=u'-'
 */
    __Pyx_TraceLine(409,0,__PYX_ERR(0, 409, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_r = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":406
 *                     c=u' '
 *                     r=u'-'
 *                 elif style== 'double':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u' '
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":410
 *                     c=u' '
 *                     r=u'-'
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u' '
 */
  __Pyx_TraceLine(410,0,__PYX_ERR(0, 410, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 410, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":411
 *                     r=u'-'
 *                 elif style=='rst':
 *                     l=u'-'             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=u'-'
 */
    __Pyx_TraceLine(411,0,__PYX_ERR(0, 411, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_l = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":412
 *                 elif style=='rst':
 *                     l=u'-'
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=u'-'
 *                 elif style=='ascii':
 */
    __Pyx_TraceLine(412,0,__PYX_ERR(0, 412, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":413
 *                     l=u'-'
 *                     c=u' '
 *                     r=u'-'             # <<<<<<<<<<<<<<
 *                 elif style=='ascii':
 *                     l=u'-'
 */
    __Pyx_TraceLine(413,0,__PYX_ERR(0, 413, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_r = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":410
 *                     c=u' '
 *                     r=u'-'
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u' '
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":414
 *                     c=u' '
 *                     r=u'-'
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u' '
 */
  __Pyx_TraceLine(414,0,__PYX_ERR(0, 414, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_ascii, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 414, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":415
 *                     r=u'-'
 *                 elif style=='ascii':
 *                     l=u'-'             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=u'-'
 */
    __Pyx_TraceLine(415,0,__PYX_ERR(0, 415, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_l = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":416
 *                 elif style=='ascii':
 *                     l=u'-'
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=u'-'
 * 
 */
    __Pyx_TraceLine(416,0,__PYX_ERR(0, 416, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":417
 *                     l=u'-'
 *                     c=u' '
 *                     r=u'-'             # <<<<<<<<<<<<<<
 * 
 *                 self.left   = flextable.color(text=l,default=default,foreground='White')
 */
    __Pyx_TraceLine(417,0,__PYX_ERR(0, 417, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__28);
    __pyx_v_r = __pyx_kp_u__28;

    /* "ddb/output/factory_term.py":414
 *                     c=u' '
 *                     r=u'-'
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=u'-'
 *                     c=u' '
 */
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":419
 *                     r=u'-'
 * 
 *                 self.left   = flextable.color(text=l,default=default,foreground='White')             # <<<<<<<<<<<<<<
 *                 self.right  = flextable.color(text=r,default=default,foreground='White')
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 */
  __Pyx_TraceLine(419,0,__PYX_ERR(0, 419, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_v_l)) { __Pyx_RaiseUnboundLocalError("l"); __PYX_ERR(0, 419, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_v_l) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_foreground, __pyx_n_s_White) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_left, __pyx_t_4) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":420
 * 
 *                 self.left   = flextable.color(text=l,default=default,foreground='White')
 *                 self.right  = flextable.color(text=r,default=default,foreground='White')             # <<<<<<<<<<<<<<
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_footer:
 */
  __Pyx_TraceLine(420,0,__PYX_ERR(0, 420, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_flextable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_v_r)) { __Pyx_RaiseUnboundLocalError("r"); __PYX_ERR(0, 420, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_text, __pyx_v_r) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_foreground, __pyx_n_s_White) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_right, __pyx_t_3) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":421
 *                 self.left   = flextable.color(text=l,default=default,foreground='White')
 *                 self.right  = flextable.color(text=r,default=default,foreground='White')
 *                 self.center = flextable.color(text=c,default=default,foreground='green')             # <<<<<<<<<<<<<<
 *         class char_footer:
 *             def __init__(self,default=None,style='rst'):
 */
  __Pyx_TraceLine(421,0,__PYX_ERR(0, 421, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_v_c)) { __Pyx_RaiseUnboundLocalError("c"); __PYX_ERR(0, 421, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_v_c) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_foreground, __pyx_n_s_green) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_center, __pyx_t_2) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":401
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_mid_header:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style == 'single':
 *                     l=u'-'
 */

  /* 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_AddTraceback("ddb.output.factory_term.char_mid_header.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":423
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_footer:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 * 
 *                 if style=='single':
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_11char_footer_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_11char_footer_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_11char_footer_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_11char_footer_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_default,&__pyx_n_s_style,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject*)__pyx_n_s_rst));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 423, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_default = values[1];
    __pyx_v_style = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 423, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.char_footer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_11char_footer___init__(__pyx_self, __pyx_v_self, __pyx_v_default, __pyx_v_style);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_11char_footer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__57)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 423, 0, __PYX_ERR(0, 423, __pyx_L1_error));

  /* "ddb/output/factory_term.py":425
 *             def __init__(self,default=None,style='rst'):
 * 
 *                 if style=='single':             # <<<<<<<<<<<<<<
 *                     l=u'['
 *                     c=u' '
 */
  __Pyx_TraceLine(425,0,__PYX_ERR(0, 425, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_single, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 425, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":426
 * 
 *                 if style=='single':
 *                     l=u'['             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=u']'
 */
    __Pyx_TraceLine(426,0,__PYX_ERR(0, 426, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__58);
    __pyx_v_l = __pyx_kp_u__58;

    /* "ddb/output/factory_term.py":427
 *                 if style=='single':
 *                     l=u'['
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=u']'
 *                 elif style=='double':
 */
    __Pyx_TraceLine(427,0,__PYX_ERR(0, 427, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":428
 *                     l=u'['
 *                     c=u' '
 *                     r=u']'             # <<<<<<<<<<<<<<
 *                 elif style=='double':
 *                     l=u'['
 */
    __Pyx_TraceLine(428,0,__PYX_ERR(0, 428, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__59);
    __pyx_v_r = __pyx_kp_u__59;

    /* "ddb/output/factory_term.py":425
 *             def __init__(self,default=None,style='rst'):
 * 
 *                 if style=='single':             # <<<<<<<<<<<<<<
 *                     l=u'['
 *                     c=u' '
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":429
 *                     c=u' '
 *                     r=u']'
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u'['
 *                     c=u' '
 */
  __Pyx_TraceLine(429,0,__PYX_ERR(0, 429, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_double, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 429, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":430
 *                     r=u']'
 *                 elif style=='double':
 *                     l=u'['             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=u']'
 */
    __Pyx_TraceLine(430,0,__PYX_ERR(0, 430, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__58);
    __pyx_v_l = __pyx_kp_u__58;

    /* "ddb/output/factory_term.py":431
 *                 elif style=='double':
 *                     l=u'['
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=u']'
 *                 elif style=='rst':
 */
    __Pyx_TraceLine(431,0,__PYX_ERR(0, 431, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":432
 *                     l=u'['
 *                     c=u' '
 *                     r=u']'             # <<<<<<<<<<<<<<
 *                 elif style=='rst':
 *                     l=None
 */
    __Pyx_TraceLine(432,0,__PYX_ERR(0, 432, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__59);
    __pyx_v_r = __pyx_kp_u__59;

    /* "ddb/output/factory_term.py":429
 *                     c=u' '
 *                     r=u']'
 *                 elif style=='double':             # <<<<<<<<<<<<<<
 *                     l=u'['
 *                     c=u' '
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":433
 *                     c=u' '
 *                     r=u']'
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=None
 *                     c=u' '
 */
  __Pyx_TraceLine(433,0,__PYX_ERR(0, 433, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 433, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":434
 *                     r=u']'
 *                 elif style=='rst':
 *                     l=None             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=None
 */
    __Pyx_TraceLine(434,0,__PYX_ERR(0, 434, __pyx_L1_error))
    __Pyx_INCREF(Py_None);
    __pyx_v_l = ((PyObject*)Py_None);

    /* "ddb/output/factory_term.py":435
 *                 elif style=='rst':
 *                     l=None
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=None
 *                 elif style=='ascii':
 */
    __Pyx_TraceLine(435,0,__PYX_ERR(0, 435, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":436
 *                     l=None
 *                     c=u' '
 *                     r=None             # <<<<<<<<<<<<<<
 *                 elif style=='ascii':
 *                     l=None
 */
    __Pyx_TraceLine(436,0,__PYX_ERR(0, 436, __pyx_L1_error))
    __Pyx_INCREF(Py_None);
    __pyx_v_r = ((PyObject*)Py_None);

    /* "ddb/output/factory_term.py":433
 *                     c=u' '
 *                     r=u']'
 *                 elif style=='rst':             # <<<<<<<<<<<<<<
 *                     l=None
 *                     c=u' '
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":437
 *                     c=u' '
 *                     r=None
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=None
 *                     c=u' '
 */
  __Pyx_TraceLine(437,0,__PYX_ERR(0, 437, __pyx_L1_error))
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_style, __pyx_n_s_ascii, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 437, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":438
 *                     r=None
 *                 elif style=='ascii':
 *                     l=None             # <<<<<<<<<<<<<<
 *                     c=u' '
 *                     r=None
 */
    __Pyx_TraceLine(438,0,__PYX_ERR(0, 438, __pyx_L1_error))
    __Pyx_INCREF(Py_None);
    __pyx_v_l = ((PyObject*)Py_None);

    /* "ddb/output/factory_term.py":439
 *                 elif style=='ascii':
 *                     l=None
 *                     c=u' '             # <<<<<<<<<<<<<<
 *                     r=None
 *                 self.left   = flextable.color(text=l,default=default,foreground='White') #
 */
    __Pyx_TraceLine(439,0,__PYX_ERR(0, 439, __pyx_L1_error))
    __Pyx_INCREF(__pyx_kp_u__10);
    __pyx_v_c = __pyx_kp_u__10;

    /* "ddb/output/factory_term.py":440
 *                     l=None
 *                     c=u' '
 *                     r=None             # <<<<<<<<<<<<<<
 *                 self.left   = flextable.color(text=l,default=default,foreground='White') #
 *                 self.right  = flextable.color(text=r,default=default,foreground='White') #
 */
    __Pyx_TraceLine(440,0,__PYX_ERR(0, 440, __pyx_L1_error))
    __Pyx_INCREF(Py_None);
    __pyx_v_r = ((PyObject*)Py_None);

    /* "ddb/output/factory_term.py":437
 *                     c=u' '
 *                     r=None
 *                 elif style=='ascii':             # <<<<<<<<<<<<<<
 *                     l=None
 *                     c=u' '
 */
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":441
 *                     c=u' '
 *                     r=None
 *                 self.left   = flextable.color(text=l,default=default,foreground='White') #             # <<<<<<<<<<<<<<
 *                 self.right  = flextable.color(text=r,default=default,foreground='White') #
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 */
  __Pyx_TraceLine(441,0,__PYX_ERR(0, 441, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_flextable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_v_l)) { __Pyx_RaiseUnboundLocalError("l"); __PYX_ERR(0, 441, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_text, __pyx_v_l) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_foreground, __pyx_n_s_White) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_left, __pyx_t_4) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":442
 *                     r=None
 *                 self.left   = flextable.color(text=l,default=default,foreground='White') #
 *                 self.right  = flextable.color(text=r,default=default,foreground='White') #             # <<<<<<<<<<<<<<
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 * 
 */
  __Pyx_TraceLine(442,0,__PYX_ERR(0, 442, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_flextable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_v_r)) { __Pyx_RaiseUnboundLocalError("r"); __PYX_ERR(0, 442, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_text, __pyx_v_r) < 0) __PYX_ERR(0, 442, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 442, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_foreground, __pyx_n_s_White) < 0) __PYX_ERR(0, 442, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_right, __pyx_t_3) < 0) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":443
 *                 self.left   = flextable.color(text=l,default=default,foreground='White') #
 *                 self.right  = flextable.color(text=r,default=default,foreground='White') #
 *                 self.center = flextable.color(text=c,default=default,foreground='green')             # <<<<<<<<<<<<<<
 * 
 *         def __init__(self,default=None,style='rst'):
 */
  __Pyx_TraceLine(443,0,__PYX_ERR(0, 443, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_flextable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_v_c)) { __Pyx_RaiseUnboundLocalError("c"); __PYX_ERR(0, 443, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_text, __pyx_v_c) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_foreground, __pyx_n_s_green) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_center, __pyx_t_2) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":423
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_footer:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 * 
 *                 if style=='single':
 */

  /* 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_AddTraceback("ddb.output.factory_term.char_footer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":445
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 * 
 *         def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 * 
 *             self.walls      =self.char_walls(default=default,style=style)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_10characters_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_10characters_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_10characters_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_10characters_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_style = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_default,&__pyx_n_s_style,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject*)__pyx_n_s_rst));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_style);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 445, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_default = values[1];
    __pyx_v_style = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 445, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.characters.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_10characters___init__(__pyx_self, __pyx_v_self, __pyx_v_default, __pyx_v_style);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_10characters___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_default, PyObject *__pyx_v_style) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__60)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 445, 0, __PYX_ERR(0, 445, __pyx_L1_error));

  /* "ddb/output/factory_term.py":447
 *         def __init__(self,default=None,style='rst'):
 * 
 *             self.walls      =self.char_walls(default=default,style=style)             # <<<<<<<<<<<<<<
 *             self.center     =self.char_center(default=default,style=style)
 *             self.bottom     =self.char_bottom(default=default,style=style)
 */
  __Pyx_TraceLine(447,0,__PYX_ERR(0, 447, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_char_walls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_style, __pyx_v_style) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_walls, __pyx_t_3) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":448
 * 
 *             self.walls      =self.char_walls(default=default,style=style)
 *             self.center     =self.char_center(default=default,style=style)             # <<<<<<<<<<<<<<
 *             self.bottom     =self.char_bottom(default=default,style=style)
 *             self.top        =self.char_top(default=default,style=style)
 */
  __Pyx_TraceLine(448,0,__PYX_ERR(0, 448, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_char_center); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_style, __pyx_v_style) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_center, __pyx_t_1) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":449
 *             self.walls      =self.char_walls(default=default,style=style)
 *             self.center     =self.char_center(default=default,style=style)
 *             self.bottom     =self.char_bottom(default=default,style=style)             # <<<<<<<<<<<<<<
 *             self.top        =self.char_top(default=default,style=style)
 *             self.mid_header =self.char_mid_header(default=default,style=style)
 */
  __Pyx_TraceLine(449,0,__PYX_ERR(0, 449, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_char_bottom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 449, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_style, __pyx_v_style) < 0) __PYX_ERR(0, 449, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bottom, __pyx_t_3) < 0) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":450
 *             self.center     =self.char_center(default=default,style=style)
 *             self.bottom     =self.char_bottom(default=default,style=style)
 *             self.top        =self.char_top(default=default,style=style)             # <<<<<<<<<<<<<<
 *             self.mid_header =self.char_mid_header(default=default,style=style)
 *             self.header     =self.char_header(default=default,style=style)
 */
  __Pyx_TraceLine(450,0,__PYX_ERR(0, 450, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_char_top); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 450, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_style, __pyx_v_style) < 0) __PYX_ERR(0, 450, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_top, __pyx_t_1) < 0) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":451
 *             self.bottom     =self.char_bottom(default=default,style=style)
 *             self.top        =self.char_top(default=default,style=style)
 *             self.mid_header =self.char_mid_header(default=default,style=style)             # <<<<<<<<<<<<<<
 *             self.header     =self.char_header(default=default,style=style)
 *             self.footer     =self.char_footer(default=default,style=style)
 */
  __Pyx_TraceLine(451,0,__PYX_ERR(0, 451, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_char_mid_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 451, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_style, __pyx_v_style) < 0) __PYX_ERR(0, 451, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mid_header, __pyx_t_3) < 0) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":452
 *             self.top        =self.char_top(default=default,style=style)
 *             self.mid_header =self.char_mid_header(default=default,style=style)
 *             self.header     =self.char_header(default=default,style=style)             # <<<<<<<<<<<<<<
 *             self.footer     =self.char_footer(default=default,style=style)
 *             self.rst        =self.char_rst(default=default)
 */
  __Pyx_TraceLine(452,0,__PYX_ERR(0, 452, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_char_header); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 452, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_style, __pyx_v_style) < 0) __PYX_ERR(0, 452, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_t_1) < 0) __PYX_ERR(0, 452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":453
 *             self.mid_header =self.char_mid_header(default=default,style=style)
 *             self.header     =self.char_header(default=default,style=style)
 *             self.footer     =self.char_footer(default=default,style=style)             # <<<<<<<<<<<<<<
 *             self.rst        =self.char_rst(default=default)
 * 
 */
  __Pyx_TraceLine(453,0,__PYX_ERR(0, 453, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_char_footer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 453, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_style, __pyx_v_style) < 0) __PYX_ERR(0, 453, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_footer, __pyx_t_3) < 0) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":454
 *             self.header     =self.char_header(default=default,style=style)
 *             self.footer     =self.char_footer(default=default,style=style)
 *             self.rst        =self.char_rst(default=default)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(454,0,__PYX_ERR(0, 454, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_char_rst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_v_default) < 0) __PYX_ERR(0, 454, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rst, __pyx_t_1) < 0) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":445
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 * 
 *         def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 * 
 *             self.walls      =self.char_walls(default=default,style=style)
 */

  /* 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("ddb.output.factory_term.characters.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":464
 *         WHITESPACE=4
 * 
 *     def __init__(self,      data,             # <<<<<<<<<<<<<<
 *                             display_style='single',
 *                             column_count=0,
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_9flextable_3__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_9flextable_3__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_display_style = 0;
  PyObject *__pyx_v_column_count = 0;
  PyObject *__pyx_v_hide_comments = 0;
  PyObject *__pyx_v_hide_errors = 0;
  PyObject *__pyx_v_hide_whitespace = 0;
  PyObject *__pyx_v_columns = 0;
  PyObject *__pyx_v_length = 0;
  PyObject *__pyx_v_line = 0;
  PyObject *__pyx_v_page = 0;
  PyObject *__pyx_v_header = 0;
  PyObject *__pyx_v_footer = 0;
  PyObject *__pyx_v_header_every = 0;
  PyObject *__pyx_v_tab_width = 0;
  PyObject *__pyx_v_tab_stop = 0;
  PyObject *__pyx_v_row_height = 0;
  PyObject *__pyx_v_column_width = 0;
  PyObject *__pyx_v_render_color = 0;
  PyObject *__pyx_v_output_stream = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,&__pyx_n_s_display_style,&__pyx_n_s_column_count,&__pyx_n_s_hide_comments,&__pyx_n_s_hide_errors,&__pyx_n_s_hide_whitespace,&__pyx_n_s_columns,&__pyx_n_s_length,&__pyx_n_s_line,&__pyx_n_s_page,&__pyx_n_s_header,&__pyx_n_s_footer,&__pyx_n_s_header_every,&__pyx_n_s_tab_width,&__pyx_n_s_tab_stop,&__pyx_n_s_row_height,&__pyx_n_s_column_width,&__pyx_n_s_render_color,&__pyx_n_s_output_stream,0};
    PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject*)__pyx_n_s_single));
    values[3] = ((PyObject *)((PyObject *)__pyx_int_0));

    /* "ddb/output/factory_term.py":467
 *                             display_style='single',
 *                             column_count=0,
 *                             hide_comments=False,             # <<<<<<<<<<<<<<
 *                             hide_errors=False,
 *                             hide_whitespace=False,
 */
    values[4] = ((PyObject *)((PyObject *)Py_False));

    /* "ddb/output/factory_term.py":468
 *                             column_count=0,
 *                             hide_comments=False,
 *                             hide_errors=False,             # <<<<<<<<<<<<<<
 *                             hide_whitespace=False,
 *                             columns=None,
 */
    values[5] = ((PyObject *)((PyObject *)Py_False));

    /* "ddb/output/factory_term.py":469
 *                             hide_comments=False,
 *                             hide_errors=False,
 *                             hide_whitespace=False,             # <<<<<<<<<<<<<<
 *                             columns=None,
 *                             length=None,
 */
    values[6] = ((PyObject *)((PyObject *)Py_False));

    /* "ddb/output/factory_term.py":470
 *                             hide_errors=False,
 *                             hide_whitespace=False,
 *                             columns=None,             # <<<<<<<<<<<<<<
 *                             length=None,
 *                             line=0,
 */
    values[7] = ((PyObject *)((PyObject *)Py_None));

    /* "ddb/output/factory_term.py":471
 *                             hide_whitespace=False,
 *                             columns=None,
 *                             length=None,             # <<<<<<<<<<<<<<
 *                             line=0,
 *                             page=0,
 */
    values[8] = ((PyObject *)((PyObject *)Py_None));
    values[9] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[10] = ((PyObject *)((PyObject *)__pyx_int_0));

    /* "ddb/output/factory_term.py":474
 *                             line=0,
 *                             page=0,
 *                             header=True,             # <<<<<<<<<<<<<<
 *                             footer=True,
 *                             header_every=-1,
 */
    values[11] = ((PyObject *)((PyObject *)Py_True));

    /* "ddb/output/factory_term.py":475
 *                             page=0,
 *                             header=True,
 *                             footer=True,             # <<<<<<<<<<<<<<
 *                             header_every=-1,
 *                             tab_width=4,
 */
    values[12] = ((PyObject *)((PyObject *)Py_True));
    values[13] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    values[14] = ((PyObject *)((PyObject *)__pyx_int_4));
    values[15] = ((PyObject *)((PyObject *)__pyx_int_8));
    values[16] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
    values[17] = ((PyObject *)((PyObject *)__pyx_int_neg_1));

    /* "ddb/output/factory_term.py":481
 *                             row_height=-1,
 *                             column_width=-1,
 *                             render_color=True,             # <<<<<<<<<<<<<<
 *                             output_stream='STDIO'
 *                         ):
 */
    values[18] = ((PyObject *)((PyObject *)Py_True));
    values[19] = ((PyObject *)((PyObject*)__pyx_n_s_STDIO));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
        CYTHON_FALLTHROUGH;
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        CYTHON_FALLTHROUGH;
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        CYTHON_FALLTHROUGH;
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        CYTHON_FALLTHROUGH;
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 20, 1); __PYX_ERR(0, 464, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_display_style);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_column_count);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hide_comments);
          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_hide_errors);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hide_whitespace);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_columns);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length);
          if (value) { values[8] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_line);
          if (value) { values[9] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_page);
          if (value) { values[10] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 11:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_header);
          if (value) { values[11] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 12:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_footer);
          if (value) { values[12] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 13:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_header_every);
          if (value) { values[13] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 14:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tab_width);
          if (value) { values[14] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 15:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tab_stop);
          if (value) { values[15] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 16:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row_height);
          if (value) { values[16] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 17:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_column_width);
          if (value) { values[17] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 18:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_render_color);
          if (value) { values[18] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case 19:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_stream);
          if (value) { values[19] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 464, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
        CYTHON_FALLTHROUGH;
        case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
        CYTHON_FALLTHROUGH;
        case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
        CYTHON_FALLTHROUGH;
        case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
        CYTHON_FALLTHROUGH;
        case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
        CYTHON_FALLTHROUGH;
        case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
        CYTHON_FALLTHROUGH;
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        CYTHON_FALLTHROUGH;
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        CYTHON_FALLTHROUGH;
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        CYTHON_FALLTHROUGH;
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_data = values[1];
    __pyx_v_display_style = values[2];
    __pyx_v_column_count = values[3];
    __pyx_v_hide_comments = values[4];
    __pyx_v_hide_errors = values[5];
    __pyx_v_hide_whitespace = values[6];
    __pyx_v_columns = values[7];
    __pyx_v_length = values[8];
    __pyx_v_line = values[9];
    __pyx_v_page = values[10];
    __pyx_v_header = values[11];
    __pyx_v_footer = values[12];
    __pyx_v_header_every = values[13];
    __pyx_v_tab_width = values[14];
    __pyx_v_tab_stop = values[15];
    __pyx_v_row_height = values[16];
    __pyx_v_column_width = values[17];
    __pyx_v_render_color = values[18];
    __pyx_v_output_stream = values[19];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 20, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 464, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_9flextable_2__init__(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_display_style, __pyx_v_column_count, __pyx_v_hide_comments, __pyx_v_hide_errors, __pyx_v_hide_whitespace, __pyx_v_columns, __pyx_v_length, __pyx_v_line, __pyx_v_page, __pyx_v_header, __pyx_v_footer, __pyx_v_header_every, __pyx_v_tab_width, __pyx_v_tab_stop, __pyx_v_row_height, __pyx_v_column_width, __pyx_v_render_color, __pyx_v_output_stream);

  /* "ddb/output/factory_term.py":464
 *         WHITESPACE=4
 * 
 *     def __init__(self,      data,             # <<<<<<<<<<<<<<
 *                             display_style='single',
 *                             column_count=0,
 */

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_display_style, PyObject *__pyx_v_column_count, PyObject *__pyx_v_hide_comments, PyObject *__pyx_v_hide_errors, PyObject *__pyx_v_hide_whitespace, PyObject *__pyx_v_columns, PyObject *__pyx_v_length, PyObject *__pyx_v_line, PyObject *__pyx_v_page, PyObject *__pyx_v_header, PyObject *__pyx_v_footer, PyObject *__pyx_v_header_every, PyObject *__pyx_v_tab_width, PyObject *__pyx_v_tab_stop, PyObject *__pyx_v_row_height, PyObject *__pyx_v_column_width, PyObject *__pyx_v_render_color, PyObject *__pyx_v_output_stream) {
  PyObject *__pyx_v_pro = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  __Pyx_TraceFrameInit(__pyx_codeobj__61)
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 464, 0, __PYX_ERR(0, 464, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_display_style);

  /* "ddb/output/factory_term.py":484
 *                             output_stream='STDIO'
 *                         ):
 *         self.column_count=column_count             # <<<<<<<<<<<<<<
 *         self.hide_comments=hide_comments
 *         self.hide_errors=hide_errors
 */
  __Pyx_TraceLine(484,0,__PYX_ERR(0, 484, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_column_count, __pyx_v_column_count) < 0) __PYX_ERR(0, 484, __pyx_L1_error)

  /* "ddb/output/factory_term.py":485
 *                         ):
 *         self.column_count=column_count
 *         self.hide_comments=hide_comments             # <<<<<<<<<<<<<<
 *         self.hide_errors=hide_errors
 *         self.hide_whitespace=hide_whitespace
 */
  __Pyx_TraceLine(485,0,__PYX_ERR(0, 485, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hide_comments, __pyx_v_hide_comments) < 0) __PYX_ERR(0, 485, __pyx_L1_error)

  /* "ddb/output/factory_term.py":486
 *         self.column_count=column_count
 *         self.hide_comments=hide_comments
 *         self.hide_errors=hide_errors             # <<<<<<<<<<<<<<
 *         self.hide_whitespace=hide_whitespace
 *         self.columns=columns
 */
  __Pyx_TraceLine(486,0,__PYX_ERR(0, 486, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hide_errors, __pyx_v_hide_errors) < 0) __PYX_ERR(0, 486, __pyx_L1_error)

  /* "ddb/output/factory_term.py":487
 *         self.hide_comments=hide_comments
 *         self.hide_errors=hide_errors
 *         self.hide_whitespace=hide_whitespace             # <<<<<<<<<<<<<<
 *         self.columns=columns
 *         self.length=length
 */
  __Pyx_TraceLine(487,0,__PYX_ERR(0, 487, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_hide_whitespace, __pyx_v_hide_whitespace) < 0) __PYX_ERR(0, 487, __pyx_L1_error)

  /* "ddb/output/factory_term.py":488
 *         self.hide_errors=hide_errors
 *         self.hide_whitespace=hide_whitespace
 *         self.columns=columns             # <<<<<<<<<<<<<<
 *         self.length=length
 *         self.line=line
 */
  __Pyx_TraceLine(488,0,__PYX_ERR(0, 488, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_columns, __pyx_v_columns) < 0) __PYX_ERR(0, 488, __pyx_L1_error)

  /* "ddb/output/factory_term.py":489
 *         self.hide_whitespace=hide_whitespace
 *         self.columns=columns
 *         self.length=length             # <<<<<<<<<<<<<<
 *         self.line=line
 *         self.page=page
 */
  __Pyx_TraceLine(489,0,__PYX_ERR(0, 489, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length, __pyx_v_length) < 0) __PYX_ERR(0, 489, __pyx_L1_error)

  /* "ddb/output/factory_term.py":490
 *         self.columns=columns
 *         self.length=length
 *         self.line=line             # <<<<<<<<<<<<<<
 *         self.page=page
 *         self.header=header
 */
  __Pyx_TraceLine(490,0,__PYX_ERR(0, 490, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_line, __pyx_v_line) < 0) __PYX_ERR(0, 490, __pyx_L1_error)

  /* "ddb/output/factory_term.py":491
 *         self.length=length
 *         self.line=line
 *         self.page=page             # <<<<<<<<<<<<<<
 *         self.header=header
 *         self.footer=footer
 */
  __Pyx_TraceLine(491,0,__PYX_ERR(0, 491, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_page, __pyx_v_page) < 0) __PYX_ERR(0, 491, __pyx_L1_error)

  /* "ddb/output/factory_term.py":492
 *         self.line=line
 *         self.page=page
 *         self.header=header             # <<<<<<<<<<<<<<
 *         self.footer=footer
 *         self.header_every=header_every
 */
  __Pyx_TraceLine(492,0,__PYX_ERR(0, 492, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header, __pyx_v_header) < 0) __PYX_ERR(0, 492, __pyx_L1_error)

  /* "ddb/output/factory_term.py":493
 *         self.page=page
 *         self.header=header
 *         self.footer=footer             # <<<<<<<<<<<<<<
 *         self.header_every=header_every
 *         self.tab_width=tab_width
 */
  __Pyx_TraceLine(493,0,__PYX_ERR(0, 493, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_footer, __pyx_v_footer) < 0) __PYX_ERR(0, 493, __pyx_L1_error)

  /* "ddb/output/factory_term.py":494
 *         self.header=header
 *         self.footer=footer
 *         self.header_every=header_every             # <<<<<<<<<<<<<<
 *         self.tab_width=tab_width
 *         self.tab_stop=tab_stop
 */
  __Pyx_TraceLine(494,0,__PYX_ERR(0, 494, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header_every, __pyx_v_header_every) < 0) __PYX_ERR(0, 494, __pyx_L1_error)

  /* "ddb/output/factory_term.py":495
 *         self.footer=footer
 *         self.header_every=header_every
 *         self.tab_width=tab_width             # <<<<<<<<<<<<<<
 *         self.tab_stop=tab_stop
 *         self.row_height=row_height
 */
  __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tab_width, __pyx_v_tab_width) < 0) __PYX_ERR(0, 495, __pyx_L1_error)

  /* "ddb/output/factory_term.py":496
 *         self.header_every=header_every
 *         self.tab_width=tab_width
 *         self.tab_stop=tab_stop             # <<<<<<<<<<<<<<
 *         self.row_height=row_height
 *         self.column_width=column_width
 */
  __Pyx_TraceLine(496,0,__PYX_ERR(0, 496, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tab_stop, __pyx_v_tab_stop) < 0) __PYX_ERR(0, 496, __pyx_L1_error)

  /* "ddb/output/factory_term.py":497
 *         self.tab_width=tab_width
 *         self.tab_stop=tab_stop
 *         self.row_height=row_height             # <<<<<<<<<<<<<<
 *         self.column_width=column_width
 *         self.render_color=render_color
 */
  __Pyx_TraceLine(497,0,__PYX_ERR(0, 497, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_row_height, __pyx_v_row_height) < 0) __PYX_ERR(0, 497, __pyx_L1_error)

  /* "ddb/output/factory_term.py":498
 *         self.tab_stop=tab_stop
 *         self.row_height=row_height
 *         self.column_width=column_width             # <<<<<<<<<<<<<<
 *         self.render_color=render_color
 *         self.is_temp_file=False
 */
  __Pyx_TraceLine(498,0,__PYX_ERR(0, 498, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_column_width, __pyx_v_column_width) < 0) __PYX_ERR(0, 498, __pyx_L1_error)

  /* "ddb/output/factory_term.py":499
 *         self.row_height=row_height
 *         self.column_width=column_width
 *         self.render_color=render_color             # <<<<<<<<<<<<<<
 *         self.is_temp_file=False
 *         if display_style not in ['single','double','rst','ascii']:
 */
  __Pyx_TraceLine(499,0,__PYX_ERR(0, 499, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_render_color, __pyx_v_render_color) < 0) __PYX_ERR(0, 499, __pyx_L1_error)

  /* "ddb/output/factory_term.py":500
 *         self.column_width=column_width
 *         self.render_color=render_color
 *         self.is_temp_file=False             # <<<<<<<<<<<<<<
 *         if display_style not in ['single','double','rst','ascii']:
 *             display_style='single'
 */
  __Pyx_TraceLine(500,0,__PYX_ERR(0, 500, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_is_temp_file, Py_False) < 0) __PYX_ERR(0, 500, __pyx_L1_error)

  /* "ddb/output/factory_term.py":501
 *         self.render_color=render_color
 *         self.is_temp_file=False
 *         if display_style not in ['single','double','rst','ascii']:             # <<<<<<<<<<<<<<
 *             display_style='single'
 *         self.display_style=display_style
 */
  __Pyx_TraceLine(501,0,__PYX_ERR(0, 501, __pyx_L1_error))
  __Pyx_INCREF(__pyx_v_display_style);
  __pyx_t_1 = __pyx_v_display_style;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_single, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_double, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_rst, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_ascii, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":502
 *         self.is_temp_file=False
 *         if display_style not in ['single','double','rst','ascii']:
 *             display_style='single'             # <<<<<<<<<<<<<<
 *         self.display_style=display_style
 *         if output_stream=='STDIO':
 */
    __Pyx_TraceLine(502,0,__PYX_ERR(0, 502, __pyx_L1_error))
    __Pyx_INCREF(__pyx_n_s_single);
    __Pyx_DECREF_SET(__pyx_v_display_style, __pyx_n_s_single);

    /* "ddb/output/factory_term.py":501
 *         self.render_color=render_color
 *         self.is_temp_file=False
 *         if display_style not in ['single','double','rst','ascii']:             # <<<<<<<<<<<<<<
 *             display_style='single'
 *         self.display_style=display_style
 */
  }

  /* "ddb/output/factory_term.py":503
 *         if display_style not in ['single','double','rst','ascii']:
 *             display_style='single'
 *         self.display_style=display_style             # <<<<<<<<<<<<<<
 *         if output_stream=='STDIO':
 *             self.output_destination=None
 */
  __Pyx_TraceLine(503,0,__PYX_ERR(0, 503, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_display_style, __pyx_v_display_style) < 0) __PYX_ERR(0, 503, __pyx_L1_error)

  /* "ddb/output/factory_term.py":504
 *             display_style='single'
 *         self.display_style=display_style
 *         if output_stream=='STDIO':             # <<<<<<<<<<<<<<
 *             self.output_destination=None
 *         elif output_stream=='STRING':
 */
  __Pyx_TraceLine(504,0,__PYX_ERR(0, 504, __pyx_L1_error))
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_output_stream, __pyx_n_s_STDIO, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":505
 *         self.display_style=display_style
 *         if output_stream=='STDIO':
 *             self.output_destination=None             # <<<<<<<<<<<<<<
 *         elif output_stream=='STRING':
 *             self.output_destination=[]
 */
    __Pyx_TraceLine(505,0,__PYX_ERR(0, 505, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_output_destination, Py_None) < 0) __PYX_ERR(0, 505, __pyx_L1_error)

    /* "ddb/output/factory_term.py":504
 *             display_style='single'
 *         self.display_style=display_style
 *         if output_stream=='STDIO':             # <<<<<<<<<<<<<<
 *             self.output_destination=None
 *         elif output_stream=='STRING':
 */
    goto __pyx_L8;
  }

  /* "ddb/output/factory_term.py":506
 *         if output_stream=='STDIO':
 *             self.output_destination=None
 *         elif output_stream=='STRING':             # <<<<<<<<<<<<<<
 *             self.output_destination=[]
 *         else:
 */
  __Pyx_TraceLine(506,0,__PYX_ERR(0, 506, __pyx_L1_error))
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_output_stream, __pyx_n_s_STRING, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 506, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":507
 *             self.output_destination=None
 *         elif output_stream=='STRING':
 *             self.output_destination=[]             # <<<<<<<<<<<<<<
 *         else:
 *             self.output_destination=None
 */
    __Pyx_TraceLine(507,0,__PYX_ERR(0, 507, __pyx_L1_error))
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_output_destination, __pyx_t_1) < 0) __PYX_ERR(0, 507, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":506
 *         if output_stream=='STDIO':
 *             self.output_destination=None
 *         elif output_stream=='STRING':             # <<<<<<<<<<<<<<
 *             self.output_destination=[]
 *         else:
 */
    goto __pyx_L8;
  }

  /* "ddb/output/factory_term.py":509
 *             self.output_destination=[]
 *         else:
 *             self.output_destination=None             # <<<<<<<<<<<<<<
 * 
 *         if self.column_width==-1:
 */
  __Pyx_TraceLine(509,0,__PYX_ERR(0, 509, __pyx_L1_error))
  /*else*/ {
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_output_destination, Py_None) < 0) __PYX_ERR(0, 509, __pyx_L1_error)
  }
  __pyx_L8:;

  /* "ddb/output/factory_term.py":511
 *             self.output_destination=None
 * 
 *         if self.column_width==-1:             # <<<<<<<<<<<<<<
 *             self.row_height=25
 *             self.column_width=80
 */
  __Pyx_TraceLine(511,0,__PYX_ERR(0, 511, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":512
 * 
 *         if self.column_width==-1:
 *             self.row_height=25             # <<<<<<<<<<<<<<
 *             self.column_width=80
 *             try:
 */
    __Pyx_TraceLine(512,0,__PYX_ERR(0, 512, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_row_height, __pyx_int_25) < 0) __PYX_ERR(0, 512, __pyx_L1_error)

    /* "ddb/output/factory_term.py":513
 *         if self.column_width==-1:
 *             self.row_height=25
 *             self.column_width=80             # <<<<<<<<<<<<<<
 *             try:
 *                 pro=os.popen('stty -F /dev/tty size', 'r')
 */
    __Pyx_TraceLine(513,0,__PYX_ERR(0, 513, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_column_width, __pyx_int_80) < 0) __PYX_ERR(0, 513, __pyx_L1_error)

    /* "ddb/output/factory_term.py":514
 *             self.row_height=25
 *             self.column_width=80
 *             try:             # <<<<<<<<<<<<<<
 *                 pro=os.popen('stty -F /dev/tty size', 'r')
 *                 self.row_height,self.column_width =pro.read().split()
 */
    __Pyx_TraceLine(514,0,__PYX_ERR(0, 514, __pyx_L1_error))
    {
      __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:*/ {

        /* "ddb/output/factory_term.py":515
 *             self.column_width=80
 *             try:
 *                 pro=os.popen('stty -F /dev/tty size', 'r')             # <<<<<<<<<<<<<<
 *                 self.row_height,self.column_width =pro.read().split()
 *                 pro.close()
 */
        __Pyx_TraceLine(515,0,__PYX_ERR(0, 515, __pyx_L10_error))
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_popen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_pro = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "ddb/output/factory_term.py":516
 *             try:
 *                 pro=os.popen('stty -F /dev/tty size', 'r')
 *                 self.row_height,self.column_width =pro.read().split()             # <<<<<<<<<<<<<<
 *                 pro.close()
 * 
 */
        __Pyx_TraceLine(516,0,__PYX_ERR(0, 516, __pyx_L10_error))
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_pro, __pyx_n_s_read); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 516, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 516, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
          PyObject* sequence = __pyx_t_4;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 516, __pyx_L10_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_1);
          #else
          __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 516, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 516, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
          index = 0; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L16_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L16_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 516, __pyx_L10_error)
          __pyx_t_10 = NULL;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L17_unpacking_done;
          __pyx_L16_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_10 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 516, __pyx_L10_error)
          __pyx_L17_unpacking_done:;
        }
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_row_height, __pyx_t_8) < 0) __PYX_ERR(0, 516, __pyx_L10_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_column_width, __pyx_t_1) < 0) __PYX_ERR(0, 516, __pyx_L10_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "ddb/output/factory_term.py":517
 *                 pro=os.popen('stty -F /dev/tty size', 'r')
 *                 self.row_height,self.column_width =pro.read().split()
 *                 pro.close()             # <<<<<<<<<<<<<<
 * 
 *             except:
 */
        __Pyx_TraceLine(517,0,__PYX_ERR(0, 517, __pyx_L10_error))
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pro, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 517, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "ddb/output/factory_term.py":514
 *             self.row_height=25
 *             self.column_width=80
 *             try:             # <<<<<<<<<<<<<<
 *                 pro=os.popen('stty -F /dev/tty size', 'r')
 *                 self.row_height,self.column_width =pro.read().split()
 */
      }
      __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_L15_try_end;
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "ddb/output/factory_term.py":519
 *                 pro.close()
 * 
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 * 
 */
      __Pyx_TraceLine(519,0,__PYX_ERR(0, 519, __pyx_L12_except_error))
      /*except:*/ {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L11_exception_handled;
      }
      __pyx_L12_except_error:;

      /* "ddb/output/factory_term.py":514
 *             self.row_height=25
 *             self.column_width=80
 *             try:             # <<<<<<<<<<<<<<
 *                 pro=os.popen('stty -F /dev/tty size', 'r')
 *                 self.row_height,self.column_width =pro.read().split()
 */
      __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_L11_exception_handled:;
      __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);
      __pyx_L15_try_end:;
    }

    /* "ddb/output/factory_term.py":511
 *             self.output_destination=None
 * 
 *         if self.column_width==-1:             # <<<<<<<<<<<<<<
 *             self.row_height=25
 *             self.column_width=80
 */
  }

  /* "ddb/output/factory_term.py":524
 *             #pass
 *         #auto name columns
 *         if column_count>-1 and columns == None:             # <<<<<<<<<<<<<<
 *             self.columns=[]
 *             for n in range(0,self.column_count):
 */
  __Pyx_TraceLine(524,0,__PYX_ERR(0, 524, __pyx_L1_error))
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_column_count, __pyx_int_neg_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_columns, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __pyx_t_2;
  __pyx_L19_bool_binop_done:;
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":525
 *         #auto name columns
 *         if column_count>-1 and columns == None:
 *             self.columns=[]             # <<<<<<<<<<<<<<
 *             for n in range(0,self.column_count):
 *                 self.columns.append("column{0}".format(n+1))
 */
    __Pyx_TraceLine(525,0,__PYX_ERR(0, 525, __pyx_L1_error))
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_columns, __pyx_t_4) < 0) __PYX_ERR(0, 525, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "ddb/output/factory_term.py":526
 *         if column_count>-1 and columns == None:
 *             self.columns=[]
 *             for n in range(0,self.column_count):             # <<<<<<<<<<<<<<
 *                 self.columns.append("column{0}".format(n+1))
 * 
 */
    __Pyx_TraceLine(526,0,__PYX_ERR(0, 526, __pyx_L1_error))
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 526, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_11 >= 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_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 526, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_11 >= 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_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 526, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_12(__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, 526, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "ddb/output/factory_term.py":527
 *             self.columns=[]
 *             for n in range(0,self.column_count):
 *                 self.columns.append("column{0}".format(n+1))             # <<<<<<<<<<<<<<
 * 
 *         # when specifically setting columns up... iverrides auto naming columns
 */
      __Pyx_TraceLine(527,0,__PYX_ERR(0, 527, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_columns); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_column_0, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 527, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 527, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_8 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_13);
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 527, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_15 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_t_8); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 527, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "ddb/output/factory_term.py":526
 *         if column_count>-1 and columns == None:
 *             self.columns=[]
 *             for n in range(0,self.column_count):             # <<<<<<<<<<<<<<
 *                 self.columns.append("column{0}".format(n+1))
 * 
 */
      __Pyx_TraceLine(526,0,__PYX_ERR(0, 526, __pyx_L1_error))
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":524
 *             #pass
 *         #auto name columns
 *         if column_count>-1 and columns == None:             # <<<<<<<<<<<<<<
 *             self.columns=[]
 *             for n in range(0,self.column_count):
 */
    goto __pyx_L18;
  }

  /* "ddb/output/factory_term.py":531
 *         # when specifically setting columns up... iverrides auto naming columns
 *         else:
 *             self.column_count=len(columns)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(531,0,__PYX_ERR(0, 531, __pyx_L1_error))
  /*else*/ {
    __pyx_t_11 = PyObject_Length(__pyx_v_columns); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 531, __pyx_L1_error)
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_column_count, __pyx_t_1) < 0) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L18:;

  /* "ddb/output/factory_term.py":534
 * 
 * 
 *         if page>-1 and length:             # <<<<<<<<<<<<<<
 *             if length>0:
 *                 self.starts_on=page*length+1
 */
  __Pyx_TraceLine(534,0,__PYX_ERR(0, 534, __pyx_L1_error))
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_page, __pyx_int_neg_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L24_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_length); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_2;
  __pyx_L24_bool_binop_done:;
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":535
 * 
 *         if page>-1 and length:
 *             if length>0:             # <<<<<<<<<<<<<<
 *                 self.starts_on=page*length+1
 *         if self.line>-1:
 */
    __Pyx_TraceLine(535,0,__PYX_ERR(0, 535, __pyx_L1_error))
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_length, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 535, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "ddb/output/factory_term.py":536
 *         if page>-1 and length:
 *             if length>0:
 *                 self.starts_on=page*length+1             # <<<<<<<<<<<<<<
 *         if self.line>-1:
 *             self.starts_on=line
 */
      __Pyx_TraceLine(536,0,__PYX_ERR(0, 536, __pyx_L1_error))
      __pyx_t_1 = PyNumber_Multiply(__pyx_v_page, __pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_starts_on, __pyx_t_8) < 0) __PYX_ERR(0, 536, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "ddb/output/factory_term.py":535
 * 
 *         if page>-1 and length:
 *             if length>0:             # <<<<<<<<<<<<<<
 *                 self.starts_on=page*length+1
 *         if self.line>-1:
 */
    }

    /* "ddb/output/factory_term.py":534
 * 
 * 
 *         if page>-1 and length:             # <<<<<<<<<<<<<<
 *             if length>0:
 *                 self.starts_on=page*length+1
 */
  }

  /* "ddb/output/factory_term.py":537
 *             if length>0:
 *                 self.starts_on=page*length+1
 *         if self.line>-1:             # <<<<<<<<<<<<<<
 *             self.starts_on=line
 * 
 */
  __Pyx_TraceLine(537,0,__PYX_ERR(0, 537, __pyx_L1_error))
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_line); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_int_neg_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":538
 *                 self.starts_on=page*length+1
 *         if self.line>-1:
 *             self.starts_on=line             # <<<<<<<<<<<<<<
 * 
 *         if display_style=='rst':
 */
    __Pyx_TraceLine(538,0,__PYX_ERR(0, 538, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_starts_on, __pyx_v_line) < 0) __PYX_ERR(0, 538, __pyx_L1_error)

    /* "ddb/output/factory_term.py":537
 *             if length>0:
 *                 self.starts_on=page*length+1
 *         if self.line>-1:             # <<<<<<<<<<<<<<
 *             self.starts_on=line
 * 
 */
  }

  /* "ddb/output/factory_term.py":540
 *             self.starts_on=line
 * 
 *         if display_style=='rst':             # <<<<<<<<<<<<<<
 *             self.footer=False
 *             self.header_every=0
 */
  __Pyx_TraceLine(540,0,__PYX_ERR(0, 540, __pyx_L1_error))
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_display_style, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 540, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":541
 * 
 *         if display_style=='rst':
 *             self.footer=False             # <<<<<<<<<<<<<<
 *             self.header_every=0
 *         self.style=self.flextable_style(style=self.display_style)
 */
    __Pyx_TraceLine(541,0,__PYX_ERR(0, 541, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_footer, Py_False) < 0) __PYX_ERR(0, 541, __pyx_L1_error)

    /* "ddb/output/factory_term.py":542
 *         if display_style=='rst':
 *             self.footer=False
 *             self.header_every=0             # <<<<<<<<<<<<<<
 *         self.style=self.flextable_style(style=self.display_style)
 *         self.results=[]
 */
    __Pyx_TraceLine(542,0,__PYX_ERR(0, 542, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header_every, __pyx_int_0) < 0) __PYX_ERR(0, 542, __pyx_L1_error)

    /* "ddb/output/factory_term.py":540
 *             self.starts_on=line
 * 
 *         if display_style=='rst':             # <<<<<<<<<<<<<<
 *             self.footer=False
 *             self.header_every=0
 */
  }

  /* "ddb/output/factory_term.py":543
 *             self.footer=False
 *             self.header_every=0
 *         self.style=self.flextable_style(style=self.display_style)             # <<<<<<<<<<<<<<
 *         self.results=[]
 *         self.data=data
 */
  __Pyx_TraceLine(543,0,__PYX_ERR(0, 543, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_flextable_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_display_style); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_style, __pyx_t_4) < 0) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_style, __pyx_t_4) < 0) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":544
 *             self.header_every=0
 *         self.style=self.flextable_style(style=self.display_style)
 *         self.results=[]             # <<<<<<<<<<<<<<
 *         self.data=data
 *         self.format()
 */
  __Pyx_TraceLine(544,0,__PYX_ERR(0, 544, __pyx_L1_error))
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_results, __pyx_t_4) < 0) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":545
 *         self.style=self.flextable_style(style=self.display_style)
 *         self.results=[]
 *         self.data=data             # <<<<<<<<<<<<<<
 *         self.format()
 * 
 */
  __Pyx_TraceLine(545,0,__PYX_ERR(0, 545, __pyx_L1_error))
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 545, __pyx_L1_error)

  /* "ddb/output/factory_term.py":546
 *         self.results=[]
 *         self.data=data
 *         self.format()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(546,0,__PYX_ERR(0, 546, __pyx_L1_error))
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":464
 *         WHITESPACE=4
 * 
 *     def __init__(self,      data,             # <<<<<<<<<<<<<<
 *                             display_style='single',
 *                             column_count=0,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pro);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_display_style);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":549
 * 
 * 
 *     def calculate_limits(self):             # <<<<<<<<<<<<<<
 *         tty_min_column_width=1
 *         # doesnt work with pipes. ugh
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_5calculate_limits(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_9flextable_5calculate_limits = {"calculate_limits", (PyCFunction)__pyx_pw_3ddb_6output_12factory_term_9flextable_5calculate_limits, METH_O, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_5calculate_limits(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calculate_limits (wrapper)", 0);
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_9flextable_4calculate_limits(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_4calculate_limits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  long __pyx_v_tty_min_column_width;
  PyObject *__pyx_v_data_column_count = NULL;
  PyObject *__pyx_v_pad = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__63)
  __Pyx_RefNannySetupContext("calculate_limits", 0);
  __Pyx_TraceCall("calculate_limits", __pyx_f[0], 549, 0, __PYX_ERR(0, 549, __pyx_L1_error));

  /* "ddb/output/factory_term.py":550
 * 
 *     def calculate_limits(self):
 *         tty_min_column_width=1             # <<<<<<<<<<<<<<
 *         # doesnt work with pipes. ugh
 * 
 */
  __Pyx_TraceLine(550,0,__PYX_ERR(0, 550, __pyx_L1_error))
  __pyx_v_tty_min_column_width = 1;

  /* "ddb/output/factory_term.py":560
 * 
 * 
 *         data_column_count=len(self.columns)             # <<<<<<<<<<<<<<
 * 
 *         pad=data_column_count+1
 */
  __Pyx_TraceLine(560,0,__PYX_ERR(0, 560, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_data_column_count = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":562
 *         data_column_count=len(self.columns)
 * 
 *         pad=data_column_count+1             # <<<<<<<<<<<<<<
 *         # no columns to return
 *         if data_column_count==0:
 */
  __Pyx_TraceLine(562,0,__PYX_ERR(0, 562, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_data_column_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pad = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":564
 *         pad=data_column_count+1
 *         # no columns to return
 *         if data_column_count==0:             # <<<<<<<<<<<<<<
 *             self.column_character_width=-1
 *         else:
 */
  __Pyx_TraceLine(564,0,__PYX_ERR(0, 564, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_data_column_count, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "ddb/output/factory_term.py":565
 *         # no columns to return
 *         if data_column_count==0:
 *             self.column_character_width=-1             # <<<<<<<<<<<<<<
 *         else:
 *             if self.column_width!=-1:
 */
    __Pyx_TraceLine(565,0,__PYX_ERR(0, 565, __pyx_L1_error))
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width, __pyx_int_neg_1) < 0) __PYX_ERR(0, 565, __pyx_L1_error)

    /* "ddb/output/factory_term.py":564
 *         pad=data_column_count+1
 *         # no columns to return
 *         if data_column_count==0:             # <<<<<<<<<<<<<<
 *             self.column_character_width=-1
 *         else:
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":567
 *             self.column_character_width=-1
 *         else:
 *             if self.column_width!=-1:             # <<<<<<<<<<<<<<
 *                 self.column_character_width=int((int(self.column_width)-1-pad)/data_column_count)
 *                 if self.column_character_width<tty_min_column_width:
 */
  __Pyx_TraceLine(567,0,__PYX_ERR(0, 567, __pyx_L1_error))
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 567, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "ddb/output/factory_term.py":568
 *         else:
 *             if self.column_width!=-1:
 *                 self.column_character_width=int((int(self.column_width)-1-pad)/data_column_count)             # <<<<<<<<<<<<<<
 *                 if self.column_character_width<tty_min_column_width:
 *                     self.column_character_width=tty_min_column_width
 */
      __Pyx_TraceLine(568,0,__PYX_ERR(0, 568, __pyx_L1_error))
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_v_pad); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_v_data_column_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width, __pyx_t_1) < 0) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":569
 *             if self.column_width!=-1:
 *                 self.column_character_width=int((int(self.column_width)-1-pad)/data_column_count)
 *                 if self.column_character_width<tty_min_column_width:             # <<<<<<<<<<<<<<
 *                     self.column_character_width=tty_min_column_width
 *             #@else:
 */
      __Pyx_TraceLine(569,0,__PYX_ERR(0, 569, __pyx_L1_error))
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_tty_min_column_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 569, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 569, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_3) {

        /* "ddb/output/factory_term.py":570
 *                 self.column_character_width=int((int(self.column_width)-1-pad)/data_column_count)
 *                 if self.column_character_width<tty_min_column_width:
 *                     self.column_character_width=tty_min_column_width             # <<<<<<<<<<<<<<
 *             #@else:
 *             #    print(self.column_width)
 */
        __Pyx_TraceLine(570,0,__PYX_ERR(0, 570, __pyx_L1_error))
        __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_tty_min_column_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width, __pyx_t_5) < 0) __PYX_ERR(0, 570, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "ddb/output/factory_term.py":569
 *             if self.column_width!=-1:
 *                 self.column_character_width=int((int(self.column_width)-1-pad)/data_column_count)
 *                 if self.column_character_width<tty_min_column_width:             # <<<<<<<<<<<<<<
 *                     self.column_character_width=tty_min_column_width
 *             #@else:
 */
      }

      /* "ddb/output/factory_term.py":567
 *             self.column_character_width=-1
 *         else:
 *             if self.column_width!=-1:             # <<<<<<<<<<<<<<
 *                 self.column_character_width=int((int(self.column_width)-1-pad)/data_column_count)
 *                 if self.column_character_width<tty_min_column_width:
 */
    }
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":576
 * 
 * 
 *         self.total_width=self.column_character_width*data_column_count+data_column_count-1             # <<<<<<<<<<<<<<
 * 
 *     def build_header(self,footer=False,mid=False):
 */
  __Pyx_TraceLine(576,0,__PYX_ERR(0, 576, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_5, __pyx_v_data_column_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_data_column_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_total_width, __pyx_t_4) < 0) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":549
 * 
 * 
 *     def calculate_limits(self):             # <<<<<<<<<<<<<<
 *         tty_min_column_width=1
 *         # doesnt work with pipes. ugh
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.calculate_limits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data_column_count);
  __Pyx_XDECREF(__pyx_v_pad);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":578
 *         self.total_width=self.column_character_width*data_column_count+data_column_count-1
 * 
 *     def build_header(self,footer=False,mid=False):             # <<<<<<<<<<<<<<
 *         # header
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_7build_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_9flextable_7build_header = {"build_header", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_9flextable_7build_header, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_7build_header(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_footer = 0;
  PyObject *__pyx_v_mid = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("build_header (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_footer,&__pyx_n_s_mid,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_False));
    values[2] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_footer);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mid);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_header") < 0)) __PYX_ERR(0, 578, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_footer = values[1];
    __pyx_v_mid = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("build_header", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 578, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.build_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_9flextable_6build_header(__pyx_self, __pyx_v_self, __pyx_v_footer, __pyx_v_mid);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_6build_header(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_footer, PyObject *__pyx_v_mid) {
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_v_column = NULL;
  PyObject *__pyx_v_header = NULL;
  PyObject *__pyx_v_column_pad = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_column_display = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  __Pyx_TraceFrameInit(__pyx_codeobj__64)
  __Pyx_RefNannySetupContext("build_header", 0);
  __Pyx_TraceCall("build_header", __pyx_f[0], 578, 0, __PYX_ERR(0, 578, __pyx_L1_error));

  /* "ddb/output/factory_term.py":581
 *         # header
 * 
 *         if False==footer:             # <<<<<<<<<<<<<<
 *             base=self.style.characters.top
 *             column=self.style.characters.header
 */
  __Pyx_TraceLine(581,0,__PYX_ERR(0, 581, __pyx_L1_error))
  __pyx_t_1 = PyObject_RichCompare(Py_False, __pyx_v_footer, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":582
 * 
 *         if False==footer:
 *             base=self.style.characters.top             # <<<<<<<<<<<<<<
 *             column=self.style.characters.header
 *         else:
 */
    __Pyx_TraceLine(582,0,__PYX_ERR(0, 582, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_characters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_top); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_base = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":583
 *         if False==footer:
 *             base=self.style.characters.top
 *             column=self.style.characters.header             # <<<<<<<<<<<<<<
 *         else:
 *                 base=self.style.characters.bottom
 */
    __Pyx_TraceLine(583,0,__PYX_ERR(0, 583, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_characters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_column = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":581
 *         # header
 * 
 *         if False==footer:             # <<<<<<<<<<<<<<
 *             base=self.style.characters.top
 *             column=self.style.characters.header
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":585
 *             column=self.style.characters.header
 *         else:
 *                 base=self.style.characters.bottom             # <<<<<<<<<<<<<<
 *                 column=self.style.characters.footer
 *         if mid==True:
 */
  __Pyx_TraceLine(585,0,__PYX_ERR(0, 585, __pyx_L1_error))
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_characters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bottom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_base = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":586
 *         else:
 *                 base=self.style.characters.bottom
 *                 column=self.style.characters.footer             # <<<<<<<<<<<<<<
 *         if mid==True:
 *                 base=self.style.characters.center
 */
    __Pyx_TraceLine(586,0,__PYX_ERR(0, 586, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_characters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_footer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_column = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":587
 *                 base=self.style.characters.bottom
 *                 column=self.style.characters.footer
 *         if mid==True:             # <<<<<<<<<<<<<<
 *                 base=self.style.characters.center
 *                 column=self.style.characters.mid_header
 */
  __Pyx_TraceLine(587,0,__PYX_ERR(0, 587, __pyx_L1_error))
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_mid, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":588
 *                 column=self.style.characters.footer
 *         if mid==True:
 *                 base=self.style.characters.center             # <<<<<<<<<<<<<<
 *                 column=self.style.characters.mid_header
 *         header=base.left.render(use_color=self.render_color)
 */
    __Pyx_TraceLine(588,0,__PYX_ERR(0, 588, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_characters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_center); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_base, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":589
 *         if mid==True:
 *                 base=self.style.characters.center
 *                 column=self.style.characters.mid_header             # <<<<<<<<<<<<<<
 *         header=base.left.render(use_color=self.render_color)
 * 
 */
    __Pyx_TraceLine(589,0,__PYX_ERR(0, 589, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_characters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_mid_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_column, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":587
 *                 base=self.style.characters.bottom
 *                 column=self.style.characters.footer
 *         if mid==True:             # <<<<<<<<<<<<<<
 *                 base=self.style.characters.center
 *                 column=self.style.characters.mid_header
 */
  }

  /* "ddb/output/factory_term.py":590
 *                 base=self.style.characters.center
 *                 column=self.style.characters.mid_header
 *         header=base.left.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 * 
 *         column_pad=0
 */
  __Pyx_TraceLine(590,0,__PYX_ERR(0, 590, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_render); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_use_color, __pyx_t_4) < 0) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_header = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":592
 *         header=base.left.render(use_color=self.render_color)
 * 
 *         column_pad=0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(592,0,__PYX_ERR(0, 592, __pyx_L1_error))
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_column_pad = __pyx_int_0;

  /* "ddb/output/factory_term.py":595
 * 
 * 
 *         if column.left.text:             # <<<<<<<<<<<<<<
 *             column_pad+=1
 *         if column.right.text:
 */
  __Pyx_TraceLine(595,0,__PYX_ERR(0, 595, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_column, __pyx_n_s_left); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":596
 * 
 *         if column.left.text:
 *             column_pad+=1             # <<<<<<<<<<<<<<
 *         if column.right.text:
 *             column_pad+=1
 */
    __Pyx_TraceLine(596,0,__PYX_ERR(0, 596, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_column_pad, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_column_pad, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":595
 * 
 * 
 *         if column.left.text:             # <<<<<<<<<<<<<<
 *             column_pad+=1
 *         if column.right.text:
 */
  }

  /* "ddb/output/factory_term.py":597
 *         if column.left.text:
 *             column_pad+=1
 *         if column.right.text:             # <<<<<<<<<<<<<<
 *             column_pad+=1
 * 
 */
  __Pyx_TraceLine(597,0,__PYX_ERR(0, 597, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_column, __pyx_n_s_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_text); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":598
 *             column_pad+=1
 *         if column.right.text:
 *             column_pad+=1             # <<<<<<<<<<<<<<
 * 
 *         if None != self.columns:
 */
    __Pyx_TraceLine(598,0,__PYX_ERR(0, 598, __pyx_L1_error))
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_column_pad, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_column_pad, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "ddb/output/factory_term.py":597
 *         if column.left.text:
 *             column_pad+=1
 *         if column.right.text:             # <<<<<<<<<<<<<<
 *             column_pad+=1
 * 
 */
  }

  /* "ddb/output/factory_term.py":600
 *             column_pad+=1
 * 
 *         if None != self.columns:             # <<<<<<<<<<<<<<
 *             index=0
 *             for c in self.columns:
 */
  __Pyx_TraceLine(600,0,__PYX_ERR(0, 600, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_columns); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_RichCompare(Py_None, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":601
 * 
 *         if None != self.columns:
 *             index=0             # <<<<<<<<<<<<<<
 *             for c in self.columns:
 *                 column_display=''
 */
    __Pyx_TraceLine(601,0,__PYX_ERR(0, 601, __pyx_L1_error))
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_index = __pyx_int_0;

    /* "ddb/output/factory_term.py":602
 *         if None != self.columns:
 *             index=0
 *             for c in self.columns:             # <<<<<<<<<<<<<<
 *                 column_display=''
 *                 if column.left.text:
 */
    __Pyx_TraceLine(602,0,__PYX_ERR(0, 602, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 602, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 602, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 602, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":603
 *             index=0
 *             for c in self.columns:
 *                 column_display=''             # <<<<<<<<<<<<<<
 *                 if column.left.text:
 *                     column_display=column.left.render(use_color=self.render_color)
 */
      __Pyx_TraceLine(603,0,__PYX_ERR(0, 603, __pyx_L1_error))
      __Pyx_INCREF(__pyx_kp_s__7);
      __Pyx_XDECREF_SET(__pyx_v_column_display, __pyx_kp_s__7);

      /* "ddb/output/factory_term.py":604
 *             for c in self.columns:
 *                 column_display=''
 *                 if column.left.text:             # <<<<<<<<<<<<<<
 *                     column_display=column.left.render(use_color=self.render_color)
 * 
 */
      __Pyx_TraceLine(604,0,__PYX_ERR(0, 604, __pyx_L1_error))
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_column, __pyx_n_s_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 604, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

        /* "ddb/output/factory_term.py":605
 *                 column_display=''
 *                 if column.left.text:
 *                     column_display=column.left.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 * 
 *                 column_display+=column.center.render(use_color=self.render_color,text=c,length=self.column_character_width-column_pad)
 */
        __Pyx_TraceLine(605,0,__PYX_ERR(0, 605, __pyx_L1_error))
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_column, __pyx_n_s_left); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_render); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 605, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_use_color, __pyx_t_7) < 0) __PYX_ERR(0, 605, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 605, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_column_display, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "ddb/output/factory_term.py":604
 *             for c in self.columns:
 *                 column_display=''
 *                 if column.left.text:             # <<<<<<<<<<<<<<
 *                     column_display=column.left.render(use_color=self.render_color)
 * 
 */
      }

      /* "ddb/output/factory_term.py":607
 *                     column_display=column.left.render(use_color=self.render_color)
 * 
 *                 column_display+=column.center.render(use_color=self.render_color,text=c,length=self.column_character_width-column_pad)             # <<<<<<<<<<<<<<
 *                 #print self.column_character_width-column_pad
 * 
 */
      __Pyx_TraceLine(607,0,__PYX_ERR(0, 607, __pyx_L1_error))
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_column, __pyx_n_s_center); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_render); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_use_color, __pyx_t_1) < 0) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_text, __pyx_v_c) < 0) __PYX_ERR(0, 607, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = PyNumber_Subtract(__pyx_t_1, __pyx_v_column_pad); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_length, __pyx_t_8) < 0) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_column_display, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_column_display, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "ddb/output/factory_term.py":610
 *                 #print self.column_character_width-column_pad
 * 
 *                 if column.right.text:             # <<<<<<<<<<<<<<
 *                     column_display+=column.right.render(use_color=self.render_color)
 * 
 */
      __Pyx_TraceLine(610,0,__PYX_ERR(0, 610, __pyx_L1_error))
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_column, __pyx_n_s_right); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_text); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_2) {

        /* "ddb/output/factory_term.py":611
 * 
 *                 if column.right.text:
 *                     column_display+=column.right.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_TraceLine(611,0,__PYX_ERR(0, 611, __pyx_L1_error))
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_column, __pyx_n_s_right); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_render); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_use_color, __pyx_t_3) < 0) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_column_display, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_column_display, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "ddb/output/factory_term.py":610
 *                 #print self.column_character_width-column_pad
 * 
 *                 if column.right.text:             # <<<<<<<<<<<<<<
 *                     column_display+=column.right.render(use_color=self.render_color)
 * 
 */
      }

      /* "ddb/output/factory_term.py":614
 * 
 * 
 *                 header+=column_display             # <<<<<<<<<<<<<<
 * 
 *                 # if we have overflow, change the column wall on the right
 */
      __Pyx_TraceLine(614,0,__PYX_ERR(0, 614, __pyx_L1_error))
      __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_header, __pyx_v_column_display); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_header, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "ddb/output/factory_term.py":617
 * 
 *                 # if we have overflow, change the column wall on the right
 *                 if index<len(self.columns)-1:             # <<<<<<<<<<<<<<
 *                     if len('{0}'.format(c))>self.column_character_width-2:
 *                         header+=base.center.render(use_color=self.render_color,override=self.style.color.overflow)
 */
      __Pyx_TraceLine(617,0,__PYX_ERR(0, 617, __pyx_L1_error))
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_columns); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyInt_FromSsize_t((__pyx_t_9 - 1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_index, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

        /* "ddb/output/factory_term.py":618
 *                 # if we have overflow, change the column wall on the right
 *                 if index<len(self.columns)-1:
 *                     if len('{0}'.format(c))>self.column_character_width-2:             # <<<<<<<<<<<<<<
 *                         header+=base.center.render(use_color=self.render_color,override=self.style.color.overflow)
 *                     else:
 */
        __Pyx_TraceLine(618,0,__PYX_ERR(0, 618, __pyx_L1_error))
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_v_c) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_c);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 618, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_t_8, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 618, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__pyx_t_2) {

          /* "ddb/output/factory_term.py":619
 *                 if index<len(self.columns)-1:
 *                     if len('{0}'.format(c))>self.column_character_width-2:
 *                         header+=base.center.render(use_color=self.render_color,override=self.style.color.overflow)             # <<<<<<<<<<<<<<
 *                     else:
 *                         header+=base.center.render(use_color=self.render_color)
 */
          __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __pyx_L1_error))
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_center); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_render); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_use_color, __pyx_t_3) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_overflow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_override, __pyx_t_3) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_header, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF_SET(__pyx_v_header, __pyx_t_8);
          __pyx_t_8 = 0;

          /* "ddb/output/factory_term.py":618
 *                 # if we have overflow, change the column wall on the right
 *                 if index<len(self.columns)-1:
 *                     if len('{0}'.format(c))>self.column_character_width-2:             # <<<<<<<<<<<<<<
 *                         header+=base.center.render(use_color=self.render_color,override=self.style.color.overflow)
 *                     else:
 */
          goto __pyx_L13;
        }

        /* "ddb/output/factory_term.py":621
 *                         header+=base.center.render(use_color=self.render_color,override=self.style.color.overflow)
 *                     else:
 *                         header+=base.center.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 *                 index+=1
 *         header+=base.right.render(use_color=self.render_color)
 */
        __Pyx_TraceLine(621,0,__PYX_ERR(0, 621, __pyx_L1_error))
        /*else*/ {
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_center); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 621, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_render); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 621, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_use_color, __pyx_t_7) < 0) __PYX_ERR(0, 621, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_header, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 621, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF_SET(__pyx_v_header, __pyx_t_8);
          __pyx_t_8 = 0;
        }
        __pyx_L13:;

        /* "ddb/output/factory_term.py":617
 * 
 *                 # if we have overflow, change the column wall on the right
 *                 if index<len(self.columns)-1:             # <<<<<<<<<<<<<<
 *                     if len('{0}'.format(c))>self.column_character_width-2:
 *                         header+=base.center.render(use_color=self.render_color,override=self.style.color.overflow)
 */
      }

      /* "ddb/output/factory_term.py":622
 *                     else:
 *                         header+=base.center.render(use_color=self.render_color)
 *                 index+=1             # <<<<<<<<<<<<<<
 *         header+=base.right.render(use_color=self.render_color)
 *         if self.render_color==True:
 */
      __Pyx_TraceLine(622,0,__PYX_ERR(0, 622, __pyx_L1_error))
      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "ddb/output/factory_term.py":602
 *         if None != self.columns:
 *             index=0
 *             for c in self.columns:             # <<<<<<<<<<<<<<
 *                 column_display=''
 *                 if column.left.text:
 */
      __Pyx_TraceLine(602,0,__PYX_ERR(0, 602, __pyx_L1_error))
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "ddb/output/factory_term.py":600
 *             column_pad+=1
 * 
 *         if None != self.columns:             # <<<<<<<<<<<<<<
 *             index=0
 *             for c in self.columns:
 */
  }

  /* "ddb/output/factory_term.py":623
 *                         header+=base.center.render(use_color=self.render_color)
 *                 index+=1
 *         header+=base.right.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 *         if self.render_color==True:
 *             header+='{0}'.format(tty_code.reset.ALL)
 */
  __Pyx_TraceLine(623,0,__PYX_ERR(0, 623, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_right); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_render); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_use_color, __pyx_t_7) < 0) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_header, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF_SET(__pyx_v_header, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":624
 *                 index+=1
 *         header+=base.right.render(use_color=self.render_color)
 *         if self.render_color==True:             # <<<<<<<<<<<<<<
 *             header+='{0}'.format(tty_code.reset.ALL)
 * 
 */
  __Pyx_TraceLine(624,0,__PYX_ERR(0, 624, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_2) {

    /* "ddb/output/factory_term.py":625
 *         header+=base.right.render(use_color=self.render_color)
 *         if self.render_color==True:
 *             header+='{0}'.format(tty_code.reset.ALL)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_TraceLine(625,0,__PYX_ERR(0, 625, __pyx_L1_error))
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ALL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_header, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_header, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "ddb/output/factory_term.py":624
 *                 index+=1
 *         header+=base.right.render(use_color=self.render_color)
 *         if self.render_color==True:             # <<<<<<<<<<<<<<
 *             header+='{0}'.format(tty_code.reset.ALL)
 * 
 */
  }

  /* "ddb/output/factory_term.py":628
 * 
 * 
 *         return header             # <<<<<<<<<<<<<<
 * 
 *     def build_rows(self,buffer):
 */
  __Pyx_TraceLine(628,0,__PYX_ERR(0, 628, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_header);
  __pyx_r = __pyx_v_header;
  goto __pyx_L0;

  /* "ddb/output/factory_term.py":578
 *         self.total_width=self.column_character_width*data_column_count+data_column_count-1
 * 
 *     def build_header(self,footer=False,mid=False):             # <<<<<<<<<<<<<<
 *         # header
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.build_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_v_column);
  __Pyx_XDECREF(__pyx_v_header);
  __Pyx_XDECREF(__pyx_v_column_pad);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_column_display);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":630
 *         return header
 * 
 *     def build_rows(self,buffer):             # <<<<<<<<<<<<<<
 *         rows=[]
 *         index=0
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_9build_rows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_9flextable_9build_rows = {"build_rows", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_9flextable_9build_rows, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_9build_rows(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_buffer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("build_rows (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_buffer,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buffer)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("build_rows", 1, 2, 2, 1); __PYX_ERR(0, 630, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_rows") < 0)) __PYX_ERR(0, 630, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_buffer = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("build_rows", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 630, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.build_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_9flextable_8build_rows(__pyx_self, __pyx_v_self, __pyx_v_buffer);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_8build_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buffer) {
  PyObject *__pyx_v_rows = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_line = NULL;
  Py_ssize_t __pyx_v_data_len;
  PyObject *__pyx_v_columns = NULL;
  PyObject *__pyx_v_c = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_wall_color = NULL;
  PyObject *__pyx_v_left = NULL;
  PyObject *__pyx_v_center = NULL;
  PyObject *__pyx_v_right = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __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;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  __Pyx_TraceFrameInit(__pyx_codeobj__65)
  __Pyx_RefNannySetupContext("build_rows", 0);
  __Pyx_TraceCall("build_rows", __pyx_f[0], 630, 0, __PYX_ERR(0, 630, __pyx_L1_error));

  /* "ddb/output/factory_term.py":631
 * 
 *     def build_rows(self,buffer):
 *         rows=[]             # <<<<<<<<<<<<<<
 *         index=0
 *         if True == isinstance(buffer,list):
 */
  __Pyx_TraceLine(631,0,__PYX_ERR(0, 631, __pyx_L1_error))
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rows = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":632
 *     def build_rows(self,buffer):
 *         rows=[]
 *         index=0             # <<<<<<<<<<<<<<
 *         if True == isinstance(buffer,list):
 *             for line in buffer:
 */
  __Pyx_TraceLine(632,0,__PYX_ERR(0, 632, __pyx_L1_error))
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_index = __pyx_int_0;

  /* "ddb/output/factory_term.py":633
 *         rows=[]
 *         index=0
 *         if True == isinstance(buffer,list):             # <<<<<<<<<<<<<<
 *             for line in buffer:
 *                 data_len=len(line['data'])
 */
  __Pyx_TraceLine(633,0,__PYX_ERR(0, 633, __pyx_L1_error))
  __pyx_t_2 = PyList_Check(__pyx_v_buffer); 
  __pyx_t_3 = ((1 == __pyx_t_2) != 0);
  if (likely(__pyx_t_3)) {

    /* "ddb/output/factory_term.py":634
 *         index=0
 *         if True == isinstance(buffer,list):
 *             for line in buffer:             # <<<<<<<<<<<<<<
 *                 data_len=len(line['data'])
 *                 columns=self.style.characters.walls.left.render(use_color=self.render_color)
 */
    __Pyx_TraceLine(634,0,__PYX_ERR(0, 634, __pyx_L1_error))
    if (likely(PyList_CheckExact(__pyx_v_buffer)) || PyTuple_CheckExact(__pyx_v_buffer)) {
      __pyx_t_1 = __pyx_v_buffer; __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_buffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __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, 634, __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, 634, __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, 634, __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, 634, __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, 634, __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, 634, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "ddb/output/factory_term.py":635
 *         if True == isinstance(buffer,list):
 *             for line in buffer:
 *                 data_len=len(line['data'])             # <<<<<<<<<<<<<<
 *                 columns=self.style.characters.walls.left.render(use_color=self.render_color)
 *                 #print line
 */
      __Pyx_TraceLine(635,0,__PYX_ERR(0, 635, __pyx_L1_error))
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_line, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 635, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_data_len = __pyx_t_7;

      /* "ddb/output/factory_term.py":636
 *             for line in buffer:
 *                 data_len=len(line['data'])
 *                 columns=self.style.characters.walls.left.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 *                 #print line
 * 
 */
      __Pyx_TraceLine(636,0,__PYX_ERR(0, 636, __pyx_L1_error))
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_characters); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_walls); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_left); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_render); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_use_color, __pyx_t_9) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_columns, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "ddb/output/factory_term.py":639
 *                 #print line
 * 
 *                 if self.data_type.DATA == line['type']:             # <<<<<<<<<<<<<<
 *                     for c in line['data']:
 *                         columns+=self.style.color.data.render(c,use_color=self.render_color,length=self.column_character_width)
 */
      __Pyx_TraceLine(639,0,__PYX_ERR(0, 639, __pyx_L1_error))
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DATA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_line, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_3) {

        /* "ddb/output/factory_term.py":640
 * 
 *                 if self.data_type.DATA == line['type']:
 *                     for c in line['data']:             # <<<<<<<<<<<<<<
 *                         columns+=self.style.color.data.render(c,use_color=self.render_color,length=self.column_character_width)
 *                         # if we have overflow, change the column wall on the right
 */
        __Pyx_TraceLine(640,0,__PYX_ERR(0, 640, __pyx_L1_error))
        __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_line, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
          __pyx_t_9 = __pyx_t_6; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0;
          __pyx_t_10 = NULL;
        } else {
          __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 640, __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, 640, __pyx_L1_error)
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        for (;;) {
          if (likely(!__pyx_t_10)) {
            if (likely(PyList_CheckExact(__pyx_t_9))) {
              if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_6 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 640, __pyx_L1_error)
              #else
              __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              #endif
            } else {
              if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 640, __pyx_L1_error)
              #else
              __pyx_t_6 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              #endif
            }
          } else {
            __pyx_t_6 = __pyx_t_10(__pyx_t_9);
            if (unlikely(!__pyx_t_6)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 640, __pyx_L1_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_6);
          }
          __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "ddb/output/factory_term.py":641
 *                 if self.data_type.DATA == line['type']:
 *                     for c in line['data']:
 *                         columns+=self.style.color.data.render(c,use_color=self.render_color,length=self.column_character_width)             # <<<<<<<<<<<<<<
 *                         # if we have overflow, change the column wall on the right
 *                         if len('{0}'.format(c))>self.column_character_width:
 */
          __Pyx_TraceLine(641,0,__PYX_ERR(0, 641, __pyx_L1_error))
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_color); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_render); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_v_c);
          __Pyx_GIVEREF(__pyx_v_c);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_c);
          __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_use_color, __pyx_t_12) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_length, __pyx_t_12) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_columns, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 641, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF_SET(__pyx_v_columns, __pyx_t_11);
          __pyx_t_11 = 0;

          /* "ddb/output/factory_term.py":643
 *                         columns+=self.style.color.data.render(c,use_color=self.render_color,length=self.column_character_width)
 *                         # if we have overflow, change the column wall on the right
 *                         if len('{0}'.format(c))>self.column_character_width:             # <<<<<<<<<<<<<<
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color,override=self.style.color.overflow)
 *                         else:
 */
          __Pyx_TraceLine(643,0,__PYX_ERR(0, 643, __pyx_L1_error))
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 643, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
            }
          }
          __pyx_t_11 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_6, __pyx_v_c) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_c);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 643, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_13 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 643, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 643, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 643, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_6 = PyObject_RichCompare(__pyx_t_11, __pyx_t_12, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 643, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 643, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (__pyx_t_3) {

            /* "ddb/output/factory_term.py":644
 *                         # if we have overflow, change the column wall on the right
 *                         if len('{0}'.format(c))>self.column_character_width:
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color,override=self.style.color.overflow)             # <<<<<<<<<<<<<<
 *                         else:
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color)
 */
            __Pyx_TraceLine(644,0,__PYX_ERR(0, 644, __pyx_L1_error))
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_characters); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_walls); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_right); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_render); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_use_color, __pyx_t_11) < 0) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_color); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_overflow); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_override, __pyx_t_11) < 0) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_columns, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 644, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF_SET(__pyx_v_columns, __pyx_t_12);
            __pyx_t_12 = 0;

            /* "ddb/output/factory_term.py":643
 *                         columns+=self.style.color.data.render(c,use_color=self.render_color,length=self.column_character_width)
 *                         # if we have overflow, change the column wall on the right
 *                         if len('{0}'.format(c))>self.column_character_width:             # <<<<<<<<<<<<<<
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color,override=self.style.color.overflow)
 *                         else:
 */
            goto __pyx_L9;
          }

          /* "ddb/output/factory_term.py":646
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color,override=self.style.color.overflow)
 *                         else:
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 * 
 *                     #only happend if we allow errored rows
 */
          __Pyx_TraceLine(646,0,__PYX_ERR(0, 646, __pyx_L1_error))
          /*else*/ {
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 646, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_characters); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 646, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_walls); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 646, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_right); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 646, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_render); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 646, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 646, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 646, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_use_color, __pyx_t_6) < 0) __PYX_ERR(0, 646, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 646, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_columns, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 646, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF_SET(__pyx_v_columns, __pyx_t_11);
            __pyx_t_11 = 0;
          }
          __pyx_L9:;

          /* "ddb/output/factory_term.py":640
 * 
 *                 if self.data_type.DATA == line['type']:
 *                     for c in line['data']:             # <<<<<<<<<<<<<<
 *                         columns+=self.style.color.data.render(c,use_color=self.render_color,length=self.column_character_width)
 *                         # if we have overflow, change the column wall on the right
 */
          __Pyx_TraceLine(640,0,__PYX_ERR(0, 640, __pyx_L1_error))
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "ddb/output/factory_term.py":649
 * 
 *                     #only happend if we allow errored rows
 *                     if data_len < self.column_count:             # <<<<<<<<<<<<<<
 *                         wall_color=tty_code.background.LIGHT_BLUE
 *                         for c in range(data_len,self.column_count):
 */
        __Pyx_TraceLine(649,0,__PYX_ERR(0, 649, __pyx_L1_error))
        __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_data_len); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_count); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_9, __pyx_t_11, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 649, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 649, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_3) {

          /* "ddb/output/factory_term.py":650
 *                     #only happend if we allow errored rows
 *                     if data_len < self.column_count:
 *                         wall_color=tty_code.background.LIGHT_BLUE             # <<<<<<<<<<<<<<
 *                         for c in range(data_len,self.column_count):
 *                             columns+=self.style.color.comment.render('',use_color=self.render_color,length=self.column_character_width)
 */
          __Pyx_TraceLine(650,0,__PYX_ERR(0, 650, __pyx_L1_error))
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 650, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_background); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 650, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_LIGHT_BLUE_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 650, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF_SET(__pyx_v_wall_color, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "ddb/output/factory_term.py":651
 *                     if data_len < self.column_count:
 *                         wall_color=tty_code.background.LIGHT_BLUE
 *                         for c in range(data_len,self.column_count):             # <<<<<<<<<<<<<<
 *                             columns+=self.style.color.comment.render('',use_color=self.render_color,length=self.column_character_width)
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color,override=self.style.color.error)
 */
          __Pyx_TraceLine(651,0,__PYX_ERR(0, 651, __pyx_L1_error))
          __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_data_len); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 651, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_count); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 651, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 651, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_11);
          PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_11);
          __pyx_t_6 = 0;
          __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 651, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
            __pyx_t_9 = __pyx_t_11; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0;
            __pyx_t_10 = NULL;
          } else {
            __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 651, __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, 651, __pyx_L1_error)
          }
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          for (;;) {
            if (likely(!__pyx_t_10)) {
              if (likely(PyList_CheckExact(__pyx_t_9))) {
                if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_9)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_11 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_11); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 651, __pyx_L1_error)
                #else
                __pyx_t_11 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 651, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_11);
                #endif
              } else {
                if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_11); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 651, __pyx_L1_error)
                #else
                __pyx_t_11 = PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 651, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_11);
                #endif
              }
            } else {
              __pyx_t_11 = __pyx_t_10(__pyx_t_9);
              if (unlikely(!__pyx_t_11)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(0, 651, __pyx_L1_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_11);
            }
            __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_11);
            __pyx_t_11 = 0;

            /* "ddb/output/factory_term.py":652
 *                         wall_color=tty_code.background.LIGHT_BLUE
 *                         for c in range(data_len,self.column_count):
 *                             columns+=self.style.color.comment.render('',use_color=self.render_color,length=self.column_character_width)             # <<<<<<<<<<<<<<
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color,override=self.style.color.error)
 * 
 */
            __Pyx_TraceLine(652,0,__PYX_ERR(0, 652, __pyx_L1_error))
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_color); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_comment); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_render); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_use_color, __pyx_t_12) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_length, __pyx_t_12) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__66, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_columns, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 652, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF_SET(__pyx_v_columns, __pyx_t_11);
            __pyx_t_11 = 0;

            /* "ddb/output/factory_term.py":653
 *                         for c in range(data_len,self.column_count):
 *                             columns+=self.style.color.comment.render('',use_color=self.render_color,length=self.column_character_width)
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color,override=self.style.color.error)             # <<<<<<<<<<<<<<
 * 
 * 
 */
            __Pyx_TraceLine(653,0,__PYX_ERR(0, 653, __pyx_L1_error))
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_characters); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_walls); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_right); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_render); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_use_color, __pyx_t_6) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_color); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_override, __pyx_t_6) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_columns, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 653, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF_SET(__pyx_v_columns, __pyx_t_12);
            __pyx_t_12 = 0;

            /* "ddb/output/factory_term.py":651
 *                     if data_len < self.column_count:
 *                         wall_color=tty_code.background.LIGHT_BLUE
 *                         for c in range(data_len,self.column_count):             # <<<<<<<<<<<<<<
 *                             columns+=self.style.color.comment.render('',use_color=self.render_color,length=self.column_character_width)
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color,override=self.style.color.error)
 */
            __Pyx_TraceLine(651,0,__PYX_ERR(0, 651, __pyx_L1_error))
          }
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "ddb/output/factory_term.py":649
 * 
 *                     #only happend if we allow errored rows
 *                     if data_len < self.column_count:             # <<<<<<<<<<<<<<
 *                         wall_color=tty_code.background.LIGHT_BLUE
 *                         for c in range(data_len,self.column_count):
 */
        }

        /* "ddb/output/factory_term.py":639
 *                 #print line
 * 
 *                 if self.data_type.DATA == line['type']:             # <<<<<<<<<<<<<<
 *                     for c in line['data']:
 *                         columns+=self.style.color.data.render(c,use_color=self.render_color,length=self.column_character_width)
 */
        goto __pyx_L6;
      }

      /* "ddb/output/factory_term.py":656
 * 
 * 
 *                 elif self.data_type.COMMENT ==  line['type'] or self.data_type.WHITESPACE==line['type']:             # <<<<<<<<<<<<<<
 *                     left  =self.style.characters.walls.left.render(use_color=self.render_color)
 *                     center=self.style.color.comment.render(line['raw'],use_color=self.render_color,length=self.total_width)
 */
      __Pyx_TraceLine(656,0,__PYX_ERR(0, 656, __pyx_L1_error))
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_COMMENT); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_line, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_12, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!__pyx_t_2) {
      } else {
        __pyx_t_3 = __pyx_t_2;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_WHITESPACE); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_line, __pyx_n_s_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = PyObject_RichCompare(__pyx_t_9, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_3 = __pyx_t_2;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_3) {

        /* "ddb/output/factory_term.py":657
 * 
 *                 elif self.data_type.COMMENT ==  line['type'] or self.data_type.WHITESPACE==line['type']:
 *                     left  =self.style.characters.walls.left.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 *                     center=self.style.color.comment.render(line['raw'],use_color=self.render_color,length=self.total_width)
 *                     right =self.style.characters.walls.right.render(use_color=self.render_color)
 */
        __Pyx_TraceLine(657,0,__PYX_ERR(0, 657, __pyx_L1_error))
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 657, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_characters); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_walls); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 657, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_left); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_render); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 657, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 657, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_use_color, __pyx_t_9) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 657, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_v_left, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "ddb/output/factory_term.py":658
 *                 elif self.data_type.COMMENT ==  line['type'] or self.data_type.WHITESPACE==line['type']:
 *                     left  =self.style.characters.walls.left.render(use_color=self.render_color)
 *                     center=self.style.color.comment.render(line['raw'],use_color=self.render_color,length=self.total_width)             # <<<<<<<<<<<<<<
 *                     right =self.style.characters.walls.right.render(use_color=self.render_color)
 *                     columns=u"{0}{1}{2}".format( left,
 */
        __Pyx_TraceLine(658,0,__PYX_ERR(0, 658, __pyx_L1_error))
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_color); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_comment); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_render); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_line, __pyx_n_s_raw); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9);
        __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_use_color, __pyx_t_11) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_total_width); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_length, __pyx_t_11) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 658, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF_SET(__pyx_v_center, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "ddb/output/factory_term.py":659
 *                     left  =self.style.characters.walls.left.render(use_color=self.render_color)
 *                     center=self.style.color.comment.render(line['raw'],use_color=self.render_color,length=self.total_width)
 *                     right =self.style.characters.walls.right.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 *                     columns=u"{0}{1}{2}".format( left,
 *                                                 center,
 */
        __Pyx_TraceLine(659,0,__PYX_ERR(0, 659, __pyx_L1_error))
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_characters); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_walls); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_right); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_render); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_use_color, __pyx_t_12) < 0) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF_SET(__pyx_v_right, __pyx_t_12);
        __pyx_t_12 = 0;

        /* "ddb/output/factory_term.py":660
 *                     center=self.style.color.comment.render(line['raw'],use_color=self.render_color,length=self.total_width)
 *                     right =self.style.characters.walls.right.render(use_color=self.render_color)
 *                     columns=u"{0}{1}{2}".format( left,             # <<<<<<<<<<<<<<
 *                                                 center,
 *                                                 right)
 */
        __Pyx_TraceLine(660,0,__PYX_ERR(0, 660, __pyx_L1_error))
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 660, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);

        /* "ddb/output/factory_term.py":662
 *                     columns=u"{0}{1}{2}".format( left,
 *                                                 center,
 *                                                 right)             # <<<<<<<<<<<<<<
 * 
 *                 elif self.data_type.ERROR ==  line['type']:
 */
        __Pyx_TraceLine(662,0,__PYX_ERR(0, 662, __pyx_L1_error))
        __pyx_t_11 = NULL;
        __pyx_t_14 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_14 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_left, __pyx_v_center, __pyx_v_right};
          __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 660, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_12);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_left, __pyx_v_center, __pyx_v_right};
          __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 660, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_12);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11); __pyx_t_11 = NULL;
          }
          __Pyx_INCREF(__pyx_v_left);
          __Pyx_GIVEREF(__pyx_v_left);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_v_left);
          __Pyx_INCREF(__pyx_v_center);
          __Pyx_GIVEREF(__pyx_v_center);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_v_center);
          __Pyx_INCREF(__pyx_v_right);
          __Pyx_GIVEREF(__pyx_v_right);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_14, __pyx_v_right);
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF_SET(__pyx_v_columns, __pyx_t_12);
        __pyx_t_12 = 0;

        /* "ddb/output/factory_term.py":656
 * 
 * 
 *                 elif self.data_type.COMMENT ==  line['type'] or self.data_type.WHITESPACE==line['type']:             # <<<<<<<<<<<<<<
 *                     left  =self.style.characters.walls.left.render(use_color=self.render_color)
 *                     center=self.style.color.comment.render(line['raw'],use_color=self.render_color,length=self.total_width)
 */
        goto __pyx_L6;
      }

      /* "ddb/output/factory_term.py":664
 *                                                 right)
 * 
 *                 elif self.data_type.ERROR ==  line['type']:             # <<<<<<<<<<<<<<
 *                     left  =self.style.characters.walls.left.render(use_color=self.render_color)
 *                     center=self.style.color.error.render(line['raw'],use_color=self.render_color,length=self.total_width)
 */
      __Pyx_TraceLine(664,0,__PYX_ERR(0, 664, __pyx_L1_error))
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_type); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_ERROR); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_PyObject_Dict_GetItem(__pyx_v_line, __pyx_n_s_type); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_9, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 664, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_3) {

        /* "ddb/output/factory_term.py":665
 * 
 *                 elif self.data_type.ERROR ==  line['type']:
 *                     left  =self.style.characters.walls.left.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 *                     center=self.style.color.error.render(line['raw'],use_color=self.render_color,length=self.total_width)
 *                     right =self.style.characters.walls.right.render(use_color=self.render_color)
 */
        __Pyx_TraceLine(665,0,__PYX_ERR(0, 665, __pyx_L1_error))
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_characters); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_walls); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_left); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_render); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_use_color, __pyx_t_9) < 0) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF_SET(__pyx_v_left, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "ddb/output/factory_term.py":666
 *                 elif self.data_type.ERROR ==  line['type']:
 *                     left  =self.style.characters.walls.left.render(use_color=self.render_color)
 *                     center=self.style.color.error.render(line['raw'],use_color=self.render_color,length=self.total_width)             # <<<<<<<<<<<<<<
 *                     right =self.style.characters.walls.right.render(use_color=self.render_color)
 *                     columns=u"{0}{1}{2}".format( left,
 */
        __Pyx_TraceLine(666,0,__PYX_ERR(0, 666, __pyx_L1_error))
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_color); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_render); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_line, __pyx_n_s_raw); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9);
        __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_use_color, __pyx_t_11) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_total_width); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_length, __pyx_t_11) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF_SET(__pyx_v_center, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "ddb/output/factory_term.py":667
 *                     left  =self.style.characters.walls.left.render(use_color=self.render_color)
 *                     center=self.style.color.error.render(line['raw'],use_color=self.render_color,length=self.total_width)
 *                     right =self.style.characters.walls.right.render(use_color=self.render_color)             # <<<<<<<<<<<<<<
 *                     columns=u"{0}{1}{2}".format( left,
 *                                                 center,
 */
        __Pyx_TraceLine(667,0,__PYX_ERR(0, 667, __pyx_L1_error))
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_characters); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_walls); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_right); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_render); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_use_color, __pyx_t_6) < 0) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF_SET(__pyx_v_right, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "ddb/output/factory_term.py":668
 *                     center=self.style.color.error.render(line['raw'],use_color=self.render_color,length=self.total_width)
 *                     right =self.style.characters.walls.right.render(use_color=self.render_color)
 *                     columns=u"{0}{1}{2}".format( left,             # <<<<<<<<<<<<<<
 *                                                 center,
 *                                                 right)
 */
        __Pyx_TraceLine(668,0,__PYX_ERR(0, 668, __pyx_L1_error))
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);

        /* "ddb/output/factory_term.py":670
 *                     columns=u"{0}{1}{2}".format( left,
 *                                                 center,
 *                                                 right)             # <<<<<<<<<<<<<<
 *                 if self.render_color==True:
 *                     columns+='{0}'.format(tty_code.reset.ALL)
 */
        __Pyx_TraceLine(670,0,__PYX_ERR(0, 670, __pyx_L1_error))
        __pyx_t_11 = NULL;
        __pyx_t_14 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_14 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_left, __pyx_v_center, __pyx_v_right};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_left, __pyx_v_center, __pyx_v_right};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 668, __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_left);
          __Pyx_GIVEREF(__pyx_v_left);
          PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_14, __pyx_v_left);
          __Pyx_INCREF(__pyx_v_center);
          __Pyx_GIVEREF(__pyx_v_center);
          PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_14, __pyx_v_center);
          __Pyx_INCREF(__pyx_v_right);
          __Pyx_GIVEREF(__pyx_v_right);
          PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_14, __pyx_v_right);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF_SET(__pyx_v_columns, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "ddb/output/factory_term.py":664
 *                                                 right)
 * 
 *                 elif self.data_type.ERROR ==  line['type']:             # <<<<<<<<<<<<<<
 *                     left  =self.style.characters.walls.left.render(use_color=self.render_color)
 *                     center=self.style.color.error.render(line['raw'],use_color=self.render_color,length=self.total_width)
 */
      }
      __pyx_L6:;

      /* "ddb/output/factory_term.py":671
 *                                                 center,
 *                                                 right)
 *                 if self.render_color==True:             # <<<<<<<<<<<<<<
 *                     columns+='{0}'.format(tty_code.reset.ALL)
 * 
 */
      __Pyx_TraceLine(671,0,__PYX_ERR(0, 671, __pyx_L1_error))
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 671, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 671, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 671, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_3) {

        /* "ddb/output/factory_term.py":672
 *                                                 right)
 *                 if self.render_color==True:
 *                     columns+='{0}'.format(tty_code.reset.ALL)             # <<<<<<<<<<<<<<
 * 
 *                 rows.append(columns)
 */
        __Pyx_TraceLine(672,0,__PYX_ERR(0, 672, __pyx_L1_error))
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_reset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_ALL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_12);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_columns, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF_SET(__pyx_v_columns, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "ddb/output/factory_term.py":671
 *                                                 center,
 *                                                 right)
 *                 if self.render_color==True:             # <<<<<<<<<<<<<<
 *                     columns+='{0}'.format(tty_code.reset.ALL)
 * 
 */
      }

      /* "ddb/output/factory_term.py":674
 *                     columns+='{0}'.format(tty_code.reset.ALL)
 * 
 *                 rows.append(columns)             # <<<<<<<<<<<<<<
 *                 index+=1
 *                 #if index== int(tty_rows)-5:
 */
      __Pyx_TraceLine(674,0,__PYX_ERR(0, 674, __pyx_L1_error))
      __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_rows, __pyx_v_columns); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 674, __pyx_L1_error)

      /* "ddb/output/factory_term.py":675
 * 
 *                 rows.append(columns)
 *                 index+=1             # <<<<<<<<<<<<<<
 *                 #if index== int(tty_rows)-5:
 *                 #    index=0
 */
      __Pyx_TraceLine(675,0,__PYX_ERR(0, 675, __pyx_L1_error))
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 675, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "ddb/output/factory_term.py":634
 *         index=0
 *         if True == isinstance(buffer,list):
 *             for line in buffer:             # <<<<<<<<<<<<<<
 *                 data_len=len(line['data'])
 *                 columns=self.style.characters.walls.left.render(use_color=self.render_color)
 */
      __Pyx_TraceLine(634,0,__PYX_ERR(0, 634, __pyx_L1_error))
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":633
 *         rows=[]
 *         index=0
 *         if True == isinstance(buffer,list):             # <<<<<<<<<<<<<<
 *             for line in buffer:
 *                 data_len=len(line['data'])
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":680
 *                 #    rows.append(self.)
 *         else:
 *             raise Exception ("data is invalid: -> {0}".format(buffer))             # <<<<<<<<<<<<<<
 * 
 *         return rows
 */
  __Pyx_TraceLine(680,0,__PYX_ERR(0, 680, __pyx_L1_error))
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_data_is_invalid_0, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_v_buffer) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_buffer);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 680, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":682
 *             raise Exception ("data is invalid: -> {0}".format(buffer))
 * 
 *         return rows             # <<<<<<<<<<<<<<
 * 
 *     def build_row_seperator(self,header=None):
 */
  __Pyx_TraceLine(682,0,__PYX_ERR(0, 682, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rows);
  __pyx_r = __pyx_v_rows;
  goto __pyx_L0;

  /* "ddb/output/factory_term.py":630
 *         return header
 * 
 *     def build_rows(self,buffer):             # <<<<<<<<<<<<<<
 *         rows=[]
 *         index=0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.build_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rows);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_columns);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_wall_color);
  __Pyx_XDECREF(__pyx_v_left);
  __Pyx_XDECREF(__pyx_v_center);
  __Pyx_XDECREF(__pyx_v_right);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":684
 *         return rows
 * 
 *     def build_row_seperator(self,header=None):             # <<<<<<<<<<<<<<
 *         index=0
 *         if header:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_11build_row_seperator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_9flextable_11build_row_seperator = {"build_row_seperator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_9flextable_11build_row_seperator, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_11build_row_seperator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_header = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("build_row_seperator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_header,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_header);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_row_seperator") < 0)) __PYX_ERR(0, 684, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_header = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("build_row_seperator", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 684, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.build_row_seperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_9flextable_10build_row_seperator(__pyx_self, __pyx_v_self, __pyx_v_header);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_10build_row_seperator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_header) {
  CYTHON_UNUSED long __pyx_v_index;
  PyObject *__pyx_v_char = NULL;
  PyObject *__pyx_v_row = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__67)
  __Pyx_RefNannySetupContext("build_row_seperator", 0);
  __Pyx_TraceCall("build_row_seperator", __pyx_f[0], 684, 0, __PYX_ERR(0, 684, __pyx_L1_error));

  /* "ddb/output/factory_term.py":685
 * 
 *     def build_row_seperator(self,header=None):
 *         index=0             # <<<<<<<<<<<<<<
 *         if header:
 *             char=self.style.characters.rst.header.text
 */
  __Pyx_TraceLine(685,0,__PYX_ERR(0, 685, __pyx_L1_error))
  __pyx_v_index = 0;

  /* "ddb/output/factory_term.py":686
 *     def build_row_seperator(self,header=None):
 *         index=0
 *         if header:             # <<<<<<<<<<<<<<
 *             char=self.style.characters.rst.header.text
 *         else:
 */
  __Pyx_TraceLine(686,0,__PYX_ERR(0, 686, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_header); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 686, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":687
 *         index=0
 *         if header:
 *             char=self.style.characters.rst.header.text             # <<<<<<<<<<<<<<
 *         else:
 *             char=self.style.characters.rst.row.text
 */
    __Pyx_TraceLine(687,0,__PYX_ERR(0, 687, __pyx_L1_error))
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_characters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_header); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_char = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "ddb/output/factory_term.py":686
 *     def build_row_seperator(self,header=None):
 *         index=0
 *         if header:             # <<<<<<<<<<<<<<
 *             char=self.style.characters.rst.header.text
 *         else:
 */
    goto __pyx_L3;
  }

  /* "ddb/output/factory_term.py":689
 *             char=self.style.characters.rst.header.text
 *         else:
 *             char=self.style.characters.rst.row.text             # <<<<<<<<<<<<<<
 *         row=self.style.characters.rst.edge.render()
 *         for i in range(0,self.column_count):
 */
  __Pyx_TraceLine(689,0,__PYX_ERR(0, 689, __pyx_L1_error))
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_characters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_row); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_char = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "ddb/output/factory_term.py":690
 *         else:
 *             char=self.style.characters.rst.row.text
 *         row=self.style.characters.rst.edge.render()             # <<<<<<<<<<<<<<
 *         for i in range(0,self.column_count):
 *             row+=self.style.characters.rst.row.render('',fill_character=char,use_color=self.render_color,length=self.column_character_width)
 */
  __Pyx_TraceLine(690,0,__PYX_ERR(0, 690, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_characters); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_edge); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_render); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_row = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":691
 *             char=self.style.characters.rst.row.text
 *         row=self.style.characters.rst.edge.render()
 *         for i in range(0,self.column_count):             # <<<<<<<<<<<<<<
 *             row+=self.style.characters.rst.row.render('',fill_character=char,use_color=self.render_color,length=self.column_character_width)
 *             row+=self.style.characters.rst.edge.render()
 */
  __Pyx_TraceLine(691,0,__PYX_ERR(0, 691, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 691, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 691, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 691, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 691, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "ddb/output/factory_term.py":692
 *         row=self.style.characters.rst.edge.render()
 *         for i in range(0,self.column_count):
 *             row+=self.style.characters.rst.row.render('',fill_character=char,use_color=self.render_color,length=self.column_character_width)             # <<<<<<<<<<<<<<
 *             row+=self.style.characters.rst.edge.render()
 * 
 */
    __Pyx_TraceLine(692,0,__PYX_ERR(0, 692, __pyx_L1_error))
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_characters); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_render); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fill_character, __pyx_v_char) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_use_color, __pyx_t_7) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_column_character_width); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_length, __pyx_t_7) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__66, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_row, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_row, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "ddb/output/factory_term.py":693
 *         for i in range(0,self.column_count):
 *             row+=self.style.characters.rst.row.render('',fill_character=char,use_color=self.render_color,length=self.column_character_width)
 *             row+=self.style.characters.rst.edge.render()             # <<<<<<<<<<<<<<
 * 
 *         if self.render_color==True:
 */
    __Pyx_TraceLine(693,0,__PYX_ERR(0, 693, __pyx_L1_error))
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_style); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_characters); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rst); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_edge); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_render); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_row, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_row, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "ddb/output/factory_term.py":691
 *             char=self.style.characters.rst.row.text
 *         row=self.style.characters.rst.edge.render()
 *         for i in range(0,self.column_count):             # <<<<<<<<<<<<<<
 *             row+=self.style.characters.rst.row.render('',fill_character=char,use_color=self.render_color,length=self.column_character_width)
 *             row+=self.style.characters.rst.edge.render()
 */
    __Pyx_TraceLine(691,0,__PYX_ERR(0, 691, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":695
 *             row+=self.style.characters.rst.edge.render()
 * 
 *         if self.render_color==True:             # <<<<<<<<<<<<<<
 *             row+='{0}'.format(tty_code.reset.ALL)
 * 
 */
  __Pyx_TraceLine(695,0,__PYX_ERR(0, 695, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_render_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_1) {

    /* "ddb/output/factory_term.py":696
 * 
 *         if self.render_color==True:
 *             row+='{0}'.format(tty_code.reset.ALL)             # <<<<<<<<<<<<<<
 * 
 *         return row
 */
    __Pyx_TraceLine(696,0,__PYX_ERR(0, 696, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_tty_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_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_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_row, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_row, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "ddb/output/factory_term.py":695
 *             row+=self.style.characters.rst.edge.render()
 * 
 *         if self.render_color==True:             # <<<<<<<<<<<<<<
 *             row+='{0}'.format(tty_code.reset.ALL)
 * 
 */
  }

  /* "ddb/output/factory_term.py":698
 *             row+='{0}'.format(tty_code.reset.ALL)
 * 
 *         return row             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(698,0,__PYX_ERR(0, 698, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_row);
  __pyx_r = __pyx_v_row;
  goto __pyx_L0;

  /* "ddb/output/factory_term.py":684
 *         return rows
 * 
 *     def build_row_seperator(self,header=None):             # <<<<<<<<<<<<<<
 *         index=0
 *         if header:
 */

  /* 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_7);
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.build_row_seperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_char);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":701
 * 
 * 
 *     def print_errors(self,table):             # <<<<<<<<<<<<<<
 *         for e in table.errors:
 *             print(e.encode('utf-8'))
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_13print_errors(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_9flextable_13print_errors = {"print_errors", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ddb_6output_12factory_term_9flextable_13print_errors, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_13print_errors(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_errors (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_table,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_table)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("print_errors", 1, 2, 2, 1); __PYX_ERR(0, 701, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "print_errors") < 0)) __PYX_ERR(0, 701, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_table = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("print_errors", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 701, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.print_errors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_9flextable_12print_errors(__pyx_self, __pyx_v_self, __pyx_v_table);

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_12print_errors(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_table) {
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_TraceFrameInit(__pyx_codeobj__68)
  __Pyx_RefNannySetupContext("print_errors", 0);
  __Pyx_TraceCall("print_errors", __pyx_f[0], 701, 0, __PYX_ERR(0, 701, __pyx_L1_error));

  /* "ddb/output/factory_term.py":702
 * 
 *     def print_errors(self,table):
 *         for e in table.errors:             # <<<<<<<<<<<<<<
 *             print(e.encode('utf-8'))
 * 
 */
  __Pyx_TraceLine(702,0,__PYX_ERR(0, 702, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_table, __pyx_n_s_errors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __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, 702, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 702, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 702, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 702, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":703
 *     def print_errors(self,table):
 *         for e in table.errors:
 *             print(e.encode('utf-8'))             # <<<<<<<<<<<<<<
 * 
 *     # with no columns, everything will be run on, not well formated
 */
    __Pyx_TraceLine(703,0,__PYX_ERR(0, 703, __pyx_L1_error))
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_utf_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":702
 * 
 *     def print_errors(self,table):
 *         for e in table.errors:             # <<<<<<<<<<<<<<
 *             print(e.encode('utf-8'))
 * 
 */
    __Pyx_TraceLine(702,0,__PYX_ERR(0, 702, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":701
 * 
 * 
 *     def print_errors(self,table):             # <<<<<<<<<<<<<<
 *         for e in table.errors:
 *             print(e.encode('utf-8'))
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.print_errors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "ddb/output/factory_term.py":706
 * 
 *     # with no columns, everything will be run on, not well formated
 *     def format(self):             # <<<<<<<<<<<<<<
 *         # now we have a file, from stdin or a file on the system that we can access
 *         # print buffer
 */

/* Python wrapper */
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_15format(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3ddb_6output_12factory_term_9flextable_15format = {"format", (PyCFunction)__pyx_pw_3ddb_6output_12factory_term_9flextable_15format, METH_O, 0};
static PyObject *__pyx_pw_3ddb_6output_12factory_term_9flextable_15format(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("format (wrapper)", 0);
  __pyx_r = __pyx_pf_3ddb_6output_12factory_term_9flextable_14format(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_3ddb_6output_12factory_term_9flextable_14format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_header = NULL;
  PyObject *__pyx_v_mid_header = NULL;
  PyObject *__pyx_v_footer = NULL;
  PyObject *__pyx_v_rows = NULL;
  PyObject *__pyx_v_row_seperator = NULL;
  PyObject *__pyx_v_row_header_seperator = NULL;
  PyObject *__pyx_v_index = NULL;
  CYTHON_UNUSED int __pyx_v_encode;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  __Pyx_TraceFrameInit(__pyx_codeobj__69)
  __Pyx_RefNannySetupContext("format", 0);
  __Pyx_TraceCall("format", __pyx_f[0], 706, 0, __PYX_ERR(0, 706, __pyx_L1_error));

  /* "ddb/output/factory_term.py":709
 *         # now we have a file, from stdin or a file on the system that we can access
 *         # print buffer
 *         self.calculate_limits()             # <<<<<<<<<<<<<<
 *         header=self.build_header()
 *         mid_header=self.build_header(mid=True)
 */
  __Pyx_TraceLine(709,0,__PYX_ERR(0, 709, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calculate_limits); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":710
 *         # print buffer
 *         self.calculate_limits()
 *         header=self.build_header()             # <<<<<<<<<<<<<<
 *         mid_header=self.build_header(mid=True)
 *         footer=self.build_header(footer=True)
 */
  __Pyx_TraceLine(710,0,__PYX_ERR(0, 710, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_header); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_header = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":711
 *         self.calculate_limits()
 *         header=self.build_header()
 *         mid_header=self.build_header(mid=True)             # <<<<<<<<<<<<<<
 *         footer=self.build_header(footer=True)
 *         rows=self.build_rows(self.data)
 */
  __Pyx_TraceLine(711,0,__PYX_ERR(0, 711, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mid, Py_True) < 0) __PYX_ERR(0, 711, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_mid_header = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":712
 *         header=self.build_header()
 *         mid_header=self.build_header(mid=True)
 *         footer=self.build_header(footer=True)             # <<<<<<<<<<<<<<
 *         rows=self.build_rows(self.data)
 *         row_seperator=self.build_row_seperator()
 */
  __Pyx_TraceLine(712,0,__PYX_ERR(0, 712, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_header); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_footer, Py_True) < 0) __PYX_ERR(0, 712, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_footer = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":713
 *         mid_header=self.build_header(mid=True)
 *         footer=self.build_header(footer=True)
 *         rows=self.build_rows(self.data)             # <<<<<<<<<<<<<<
 *         row_seperator=self.build_row_seperator()
 *         row_header_seperator=self.build_row_seperator(header=True)
 */
  __Pyx_TraceLine(713,0,__PYX_ERR(0, 713, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_rows = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":714
 *         footer=self.build_header(footer=True)
 *         rows=self.build_rows(self.data)
 *         row_seperator=self.build_row_seperator()             # <<<<<<<<<<<<<<
 *         row_header_seperator=self.build_row_seperator(header=True)
 *         index=1
 */
  __Pyx_TraceLine(714,0,__PYX_ERR(0, 714, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_row_seperator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_row_seperator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":715
 *         rows=self.build_rows(self.data)
 *         row_seperator=self.build_row_seperator()
 *         row_header_seperator=self.build_row_seperator(header=True)             # <<<<<<<<<<<<<<
 *         index=1
 * 
 */
  __Pyx_TraceLine(715,0,__PYX_ERR(0, 715, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_build_row_seperator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_header, Py_True) < 0) __PYX_ERR(0, 715, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_row_header_seperator = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":716
 *         row_seperator=self.build_row_seperator()
 *         row_header_seperator=self.build_row_seperator(header=True)
 *         index=1             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __Pyx_TraceLine(716,0,__PYX_ERR(0, 716, __pyx_L1_error))
  __Pyx_INCREF(__pyx_int_1);
  __pyx_v_index = __pyx_int_1;

  /* "ddb/output/factory_term.py":718
 *         index=1
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if sys.version_info.major>2:
 *                 encode=False
 */
  __Pyx_TraceLine(718,0,__PYX_ERR(0, 718, __pyx_L1_error))
  {
    __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:*/ {

      /* "ddb/output/factory_term.py":719
 * 
 *         try:
 *             if sys.version_info.major>2:             # <<<<<<<<<<<<<<
 *                 encode=False
 *             else:
 */
      __Pyx_TraceLine(719,0,__PYX_ERR(0, 719, __pyx_L3_error))
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 719, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_major); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 719, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 719, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_8) {

        /* "ddb/output/factory_term.py":720
 *         try:
 *             if sys.version_info.major>2:
 *                 encode=False             # <<<<<<<<<<<<<<
 *             else:
 *                 encode=True
 */
        __Pyx_TraceLine(720,0,__PYX_ERR(0, 720, __pyx_L3_error))
        __pyx_v_encode = 0;

        /* "ddb/output/factory_term.py":719
 * 
 *         try:
 *             if sys.version_info.major>2:             # <<<<<<<<<<<<<<
 *                 encode=False
 *             else:
 */
        goto __pyx_L9;
      }

      /* "ddb/output/factory_term.py":722
 *                 encode=False
 *             else:
 *                 encode=True             # <<<<<<<<<<<<<<
 *         except:
 *             encode=False
 */
      __Pyx_TraceLine(722,0,__PYX_ERR(0, 722, __pyx_L3_error))
      /*else*/ {
        __pyx_v_encode = 1;
      }
      __pyx_L9:;

      /* "ddb/output/factory_term.py":718
 *         index=1
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if sys.version_info.major>2:
 *                 encode=False
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "ddb/output/factory_term.py":723
 *             else:
 *                 encode=True
 *         except:             # <<<<<<<<<<<<<<
 *             encode=False
 *             pass
 */
    __Pyx_TraceLine(723,0,__PYX_ERR(0, 723, __pyx_L5_except_error))
    /*except:*/ {
      __Pyx_AddTraceback("ddb.output.factory_term.flextable.format", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 723, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_1);

      /* "ddb/output/factory_term.py":724
 *                 encode=True
 *         except:
 *             encode=False             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
      __Pyx_TraceLine(724,0,__PYX_ERR(0, 724, __pyx_L5_except_error))
      __pyx_v_encode = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;

    /* "ddb/output/factory_term.py":718
 *         index=1
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if sys.version_info.major>2:
 *                 encode=False
 */
    __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_L4_exception_handled:;
    __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);
    __pyx_L8_try_end:;
  }

  /* "ddb/output/factory_term.py":727
 *             pass
 * 
 *         mprint('')             # <<<<<<<<<<<<<<
 * 
 *         if self.header==True:
 */
  __Pyx_TraceLine(727,0,__PYX_ERR(0, 727, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_mprint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s__7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s__7);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":729
 *         mprint('')
 * 
 *         if self.header==True:             # <<<<<<<<<<<<<<
 *             if self.display_style=='rst':
 *                 mprint(row_seperator)
 */
  __Pyx_TraceLine(729,0,__PYX_ERR(0, 729, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_8) {

    /* "ddb/output/factory_term.py":730
 * 
 *         if self.header==True:
 *             if self.display_style=='rst':             # <<<<<<<<<<<<<<
 *                 mprint(row_seperator)
 *             mprint(header)
 */
    __Pyx_TraceLine(730,0,__PYX_ERR(0, 730, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_display_style); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 730, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_8) {

      /* "ddb/output/factory_term.py":731
 *         if self.header==True:
 *             if self.display_style=='rst':
 *                 mprint(row_seperator)             # <<<<<<<<<<<<<<
 *             mprint(header)
 *             if self.display_style=='rst':
 */
      __Pyx_TraceLine(731,0,__PYX_ERR(0, 731, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_mprint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_row_seperator) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_row_seperator);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":730
 * 
 *         if self.header==True:
 *             if self.display_style=='rst':             # <<<<<<<<<<<<<<
 *                 mprint(row_seperator)
 *             mprint(header)
 */
    }

    /* "ddb/output/factory_term.py":732
 *             if self.display_style=='rst':
 *                 mprint(row_seperator)
 *             mprint(header)             # <<<<<<<<<<<<<<
 *             if self.display_style=='rst':
 *                 mprint(row_header_seperator)
 */
    __Pyx_TraceLine(732,0,__PYX_ERR(0, 732, __pyx_L1_error))
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_mprint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_header) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_header);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "ddb/output/factory_term.py":733
 *                 mprint(row_seperator)
 *             mprint(header)
 *             if self.display_style=='rst':             # <<<<<<<<<<<<<<
 *                 mprint(row_header_seperator)
 * 
 */
    __Pyx_TraceLine(733,0,__PYX_ERR(0, 733, __pyx_L1_error))
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_display_style); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_8) {

      /* "ddb/output/factory_term.py":734
 *             mprint(header)
 *             if self.display_style=='rst':
 *                 mprint(row_header_seperator)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_TraceLine(734,0,__PYX_ERR(0, 734, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_mprint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_row_header_seperator) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_row_header_seperator);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "ddb/output/factory_term.py":733
 *                 mprint(row_seperator)
 *             mprint(header)
 *             if self.display_style=='rst':             # <<<<<<<<<<<<<<
 *                 mprint(row_header_seperator)
 * 
 */
    }

    /* "ddb/output/factory_term.py":729
 *         mprint('')
 * 
 *         if self.header==True:             # <<<<<<<<<<<<<<
 *             if self.display_style=='rst':
 *                 mprint(row_seperator)
 */
  }

  /* "ddb/output/factory_term.py":737
 * 
 * 
 *         for row in rows:             # <<<<<<<<<<<<<<
 *             mprint(row)
 *             if self.display_style=='rst':
 */
  __Pyx_TraceLine(737,0,__PYX_ERR(0, 737, __pyx_L1_error))
  if (likely(PyList_CheckExact(__pyx_v_rows)) || PyTuple_CheckExact(__pyx_v_rows)) {
    __pyx_t_3 = __pyx_v_rows; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 737, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 737, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 737, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_10(__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, 737, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":738
 * 
 *         for row in rows:
 *             mprint(row)             # <<<<<<<<<<<<<<
 *             if self.display_style=='rst':
 *                 mprint(row_seperator)
 */
    __Pyx_TraceLine(738,0,__PYX_ERR(0, 738, __pyx_L1_error))
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_mprint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_row) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_row);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "ddb/output/factory_term.py":739
 *         for row in rows:
 *             mprint(row)
 *             if self.display_style=='rst':             # <<<<<<<<<<<<<<
 *                 mprint(row_seperator)
 *             if self.header_every>0:
 */
    __Pyx_TraceLine(739,0,__PYX_ERR(0, 739, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_display_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_rst, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_8) {

      /* "ddb/output/factory_term.py":740
 *             mprint(row)
 *             if self.display_style=='rst':
 *                 mprint(row_seperator)             # <<<<<<<<<<<<<<
 *             if self.header_every>0:
 *                 # we want it every N, but not if it bunches up on the footer
 */
      __Pyx_TraceLine(740,0,__PYX_ERR(0, 740, __pyx_L1_error))
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_mprint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_row_seperator) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_row_seperator);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "ddb/output/factory_term.py":739
 *         for row in rows:
 *             mprint(row)
 *             if self.display_style=='rst':             # <<<<<<<<<<<<<<
 *                 mprint(row_seperator)
 *             if self.header_every>0:
 */
    }

    /* "ddb/output/factory_term.py":741
 *             if self.display_style=='rst':
 *                 mprint(row_seperator)
 *             if self.header_every>0:             # <<<<<<<<<<<<<<
 *                 # we want it every N, but not if it bunches up on the footer
 *                 if index%self.header_every==0 and index>0:
 */
    __Pyx_TraceLine(741,0,__PYX_ERR(0, 741, __pyx_L1_error))
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header_every); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_8) {

      /* "ddb/output/factory_term.py":743
 *             if self.header_every>0:
 *                 # we want it every N, but not if it bunches up on the footer
 *                 if index%self.header_every==0 and index>0:             # <<<<<<<<<<<<<<
 *                     mprint(mid_header)
 *             index+=1
 */
      __Pyx_TraceLine(743,0,__PYX_ERR(0, 743, __pyx_L1_error))
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header_every); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyNumber_Remainder(__pyx_v_index, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_11) {
      } else {
        __pyx_t_8 = __pyx_t_11;
        goto __pyx_L20_bool_binop_done;
      }
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error)
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __pyx_t_11;
      __pyx_L20_bool_binop_done:;
      if (__pyx_t_8) {

        /* "ddb/output/factory_term.py":744
 *                 # we want it every N, but not if it bunches up on the footer
 *                 if index%self.header_every==0 and index>0:
 *                     mprint(mid_header)             # <<<<<<<<<<<<<<
 *             index+=1
 *         if self.footer==True:
 */
        __Pyx_TraceLine(744,0,__PYX_ERR(0, 744, __pyx_L1_error))
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_mprint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = NULL;
        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_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_mid_header) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_mid_header);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __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;

        /* "ddb/output/factory_term.py":743
 *             if self.header_every>0:
 *                 # we want it every N, but not if it bunches up on the footer
 *                 if index%self.header_every==0 and index>0:             # <<<<<<<<<<<<<<
 *                     mprint(mid_header)
 *             index+=1
 */
      }

      /* "ddb/output/factory_term.py":741
 *             if self.display_style=='rst':
 *                 mprint(row_seperator)
 *             if self.header_every>0:             # <<<<<<<<<<<<<<
 *                 # we want it every N, but not if it bunches up on the footer
 *                 if index%self.header_every==0 and index>0:
 */
    }

    /* "ddb/output/factory_term.py":745
 *                 if index%self.header_every==0 and index>0:
 *                     mprint(mid_header)
 *             index+=1             # <<<<<<<<<<<<<<
 *         if self.footer==True:
 *             mprint(footer)
 */
    __Pyx_TraceLine(745,0,__PYX_ERR(0, 745, __pyx_L1_error))
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "ddb/output/factory_term.py":737
 * 
 * 
 *         for row in rows:             # <<<<<<<<<<<<<<
 *             mprint(row)
 *             if self.display_style=='rst':
 */
    __Pyx_TraceLine(737,0,__PYX_ERR(0, 737, __pyx_L1_error))
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":746
 *                     mprint(mid_header)
 *             index+=1
 *         if self.footer==True:             # <<<<<<<<<<<<<<
 *             mprint(footer)
 */
  __Pyx_TraceLine(746,0,__PYX_ERR(0, 746, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_footer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "ddb/output/factory_term.py":747
 *             index+=1
 *         if self.footer==True:
 *             mprint(footer)             # <<<<<<<<<<<<<<
 */
    __Pyx_TraceLine(747,0,__PYX_ERR(0, 747, __pyx_L1_error))
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_mprint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_footer) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_footer);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "ddb/output/factory_term.py":746
 *                     mprint(mid_header)
 *             index+=1
 *         if self.footer==True:             # <<<<<<<<<<<<<<
 *             mprint(footer)
 */
  }

  /* "ddb/output/factory_term.py":706
 * 
 *     # with no columns, everything will be run on, not well formated
 *     def format(self):             # <<<<<<<<<<<<<<
 *         # now we have a file, from stdin or a file on the system that we can access
 *         # print buffer
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("ddb.output.factory_term.flextable.format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_header);
  __Pyx_XDECREF(__pyx_v_mid_header);
  __Pyx_XDECREF(__pyx_v_footer);
  __Pyx_XDECREF(__pyx_v_rows);
  __Pyx_XDECREF(__pyx_v_row_seperator);
  __Pyx_XDECREF(__pyx_v_row_header_seperator);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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_factory_term(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_factory_term},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "factory_term",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0},
  {&__pyx_kp_u_0_1, __pyx_k_0_1, sizeof(__pyx_k_0_1), 0, 1, 0, 0},
  {&__pyx_kp_u_0_1_2, __pyx_k_0_1_2, sizeof(__pyx_k_0_1_2), 0, 1, 0, 0},
  {&__pyx_kp_s_0_m, __pyx_k_0_m, sizeof(__pyx_k_0_m), 0, 0, 1, 0},
  {&__pyx_n_s_ALL, __pyx_k_ALL, sizeof(__pyx_k_ALL), 0, 0, 1, 1},
  {&__pyx_n_s_BLACK, __pyx_k_BLACK, sizeof(__pyx_k_BLACK), 0, 0, 1, 1},
  {&__pyx_n_s_BLINK, __pyx_k_BLINK, sizeof(__pyx_k_BLINK), 0, 0, 1, 1},
  {&__pyx_n_s_BLUE, __pyx_k_BLUE, sizeof(__pyx_k_BLUE), 0, 0, 1, 1},
  {&__pyx_n_s_BOLD, __pyx_k_BOLD, sizeof(__pyx_k_BOLD), 0, 0, 1, 1},
  {&__pyx_n_s_COMMENT, __pyx_k_COMMENT, sizeof(__pyx_k_COMMENT), 0, 0, 1, 1},
  {&__pyx_n_s_CYAN, __pyx_k_CYAN, sizeof(__pyx_k_CYAN), 0, 0, 1, 1},
  {&__pyx_kp_s_DARK_GRAY, __pyx_k_DARK_GRAY, sizeof(__pyx_k_DARK_GRAY), 0, 0, 1, 0},
  {&__pyx_n_s_DARK_GRAY_2, __pyx_k_DARK_GRAY_2, sizeof(__pyx_k_DARK_GRAY_2), 0, 0, 1, 1},
  {&__pyx_n_s_DATA, __pyx_k_DATA, sizeof(__pyx_k_DATA), 0, 0, 1, 1},
  {&__pyx_n_s_DEFAULT, __pyx_k_DEFAULT, sizeof(__pyx_k_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_DIM, __pyx_k_DIM, sizeof(__pyx_k_DIM), 0, 0, 1, 1},
  {&__pyx_n_s_ERROR, __pyx_k_ERROR, sizeof(__pyx_k_ERROR), 0, 0, 1, 1},
  {&__pyx_n_s_GREEN, __pyx_k_GREEN, sizeof(__pyx_k_GREEN), 0, 0, 1, 1},
  {&__pyx_n_s_HIDDEN, __pyx_k_HIDDEN, sizeof(__pyx_k_HIDDEN), 0, 0, 1, 1},
  {&__pyx_kp_s_LIGHT_BLUE, __pyx_k_LIGHT_BLUE, sizeof(__pyx_k_LIGHT_BLUE), 0, 0, 1, 0},
  {&__pyx_n_s_LIGHT_BLUE_2, __pyx_k_LIGHT_BLUE_2, sizeof(__pyx_k_LIGHT_BLUE_2), 0, 0, 1, 1},
  {&__pyx_kp_s_LIGHT_CYAN, __pyx_k_LIGHT_CYAN, sizeof(__pyx_k_LIGHT_CYAN), 0, 0, 1, 0},
  {&__pyx_n_s_LIGHT_CYAN_2, __pyx_k_LIGHT_CYAN_2, sizeof(__pyx_k_LIGHT_CYAN_2), 0, 0, 1, 1},
  {&__pyx_kp_s_LIGHT_GRAY, __pyx_k_LIGHT_GRAY, sizeof(__pyx_k_LIGHT_GRAY), 0, 0, 1, 0},
  {&__pyx_n_s_LIGHT_GRAY_2, __pyx_k_LIGHT_GRAY_2, sizeof(__pyx_k_LIGHT_GRAY_2), 0, 0, 1, 1},
  {&__pyx_kp_s_LIGHT_GREEN, __pyx_k_LIGHT_GREEN, sizeof(__pyx_k_LIGHT_GREEN), 0, 0, 1, 0},
  {&__pyx_n_s_LIGHT_GREEN_2, __pyx_k_LIGHT_GREEN_2, sizeof(__pyx_k_LIGHT_GREEN_2), 0, 0, 1, 1},
  {&__pyx_kp_s_LIGHT_MAGENTA, __pyx_k_LIGHT_MAGENTA, sizeof(__pyx_k_LIGHT_MAGENTA), 0, 0, 1, 0},
  {&__pyx_n_s_LIGHT_MAGENTA_2, __pyx_k_LIGHT_MAGENTA_2, sizeof(__pyx_k_LIGHT_MAGENTA_2), 0, 0, 1, 1},
  {&__pyx_kp_s_LIGHT_RED, __pyx_k_LIGHT_RED, sizeof(__pyx_k_LIGHT_RED), 0, 0, 1, 0},
  {&__pyx_n_s_LIGHT_RED_2, __pyx_k_LIGHT_RED_2, sizeof(__pyx_k_LIGHT_RED_2), 0, 0, 1, 1},
  {&__pyx_kp_s_LIGHT_YELLOW, __pyx_k_LIGHT_YELLOW, sizeof(__pyx_k_LIGHT_YELLOW), 0, 0, 1, 0},
  {&__pyx_n_s_LIGHT_YELLOW_2, __pyx_k_LIGHT_YELLOW_2, sizeof(__pyx_k_LIGHT_YELLOW_2), 0, 0, 1, 1},
  {&__pyx_n_s_LRCF, __pyx_k_LRCF, sizeof(__pyx_k_LRCF), 0, 0, 1, 1},
  {&__pyx_n_s_MAGENTA, __pyx_k_MAGENTA, sizeof(__pyx_k_MAGENTA), 0, 0, 1, 1},
  {&__pyx_n_s_Popen, __pyx_k_Popen, sizeof(__pyx_k_Popen), 0, 0, 1, 1},
  {&__pyx_n_s_RED, __pyx_k_RED, sizeof(__pyx_k_RED), 0, 0, 1, 1},
  {&__pyx_n_s_REVERSE, __pyx_k_REVERSE, sizeof(__pyx_k_REVERSE), 0, 0, 1, 1},
  {&__pyx_n_s_STDIO, __pyx_k_STDIO, sizeof(__pyx_k_STDIO), 0, 0, 1, 1},
  {&__pyx_n_s_STRING, __pyx_k_STRING, sizeof(__pyx_k_STRING), 0, 0, 1, 1},
  {&__pyx_n_s_UNDERLINED, __pyx_k_UNDERLINED, sizeof(__pyx_k_UNDERLINED), 0, 0, 1, 1},
  {&__pyx_n_s_WHITE, __pyx_k_WHITE, sizeof(__pyx_k_WHITE), 0, 0, 1, 1},
  {&__pyx_n_s_WHITESPACE, __pyx_k_WHITESPACE, sizeof(__pyx_k_WHITESPACE), 0, 0, 1, 1},
  {&__pyx_n_s_White, __pyx_k_White, sizeof(__pyx_k_White), 0, 0, 1, 1},
  {&__pyx_n_s_YELLOW, __pyx_k_YELLOW, sizeof(__pyx_k_YELLOW), 0, 0, 1, 1},
  {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0},
  {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0},
  {&__pyx_kp_s__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 1, 0},
  {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
  {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
  {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0},
  {&__pyx_kp_u__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 1, 0, 0},
  {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0},
  {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 1, 0, 0},
  {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0},
  {&__pyx_kp_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 0},
  {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0},
  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  {&__pyx_kp_u__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 1, 0, 0},
  {&__pyx_kp_u__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 1, 0, 0},
  {&__pyx_kp_u__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 1, 0, 0},
  {&__pyx_kp_u__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 1, 0, 0},
  {&__pyx_kp_u__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 1, 0, 0},
  {&__pyx_kp_u__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 1, 0, 0},
  {&__pyx_kp_s__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 0, 1, 0},
  {&__pyx_kp_u__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 1, 0, 0},
  {&__pyx_kp_s__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 0, 1, 0},
  {&__pyx_kp_u__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 1, 0, 0},
  {&__pyx_kp_u__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 1, 0, 0},
  {&__pyx_kp_u__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 1, 0, 0},
  {&__pyx_kp_u__43, __pyx_k__43, sizeof(__pyx_k__43), 0, 1, 0, 0},
  {&__pyx_kp_u__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 1, 0, 0},
  {&__pyx_kp_u__45, __pyx_k__45, sizeof(__pyx_k__45), 0, 1, 0, 0},
  {&__pyx_kp_u__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 1, 0, 0},
  {&__pyx_kp_u__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 1, 0, 0},
  {&__pyx_kp_u__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 1, 0, 0},
  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
  {&__pyx_kp_u__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 1, 0, 0},
  {&__pyx_kp_u__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 1, 0, 0},
  {&__pyx_kp_u__52, __pyx_k__52, sizeof(__pyx_k__52), 0, 1, 0, 0},
  {&__pyx_kp_u__54, __pyx_k__54, sizeof(__pyx_k__54), 0, 1, 0, 0},
  {&__pyx_kp_u__55, __pyx_k__55, sizeof(__pyx_k__55), 0, 1, 0, 0},
  {&__pyx_kp_u__58, __pyx_k__58, sizeof(__pyx_k__58), 0, 1, 0, 0},
  {&__pyx_kp_u__59, __pyx_k__59, sizeof(__pyx_k__59), 0, 1, 0, 0},
  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
  {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
  {&__pyx_n_s_active, __pyx_k_active, sizeof(__pyx_k_active), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
  {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_n_s_background, __pyx_k_background, sizeof(__pyx_k_background), 0, 0, 1, 1},
  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
  {&__pyx_n_s_blue, __pyx_k_blue, sizeof(__pyx_k_blue), 0, 0, 1, 1},
  {&__pyx_n_s_bold, __pyx_k_bold, sizeof(__pyx_k_bold), 0, 0, 1, 1},
  {&__pyx_n_s_bottom, __pyx_k_bottom, sizeof(__pyx_k_bottom), 0, 0, 1, 1},
  {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1},
  {&__pyx_n_s_build_header, __pyx_k_build_header, sizeof(__pyx_k_build_header), 0, 0, 1, 1},
  {&__pyx_n_s_build_row_seperator, __pyx_k_build_row_seperator, sizeof(__pyx_k_build_row_seperator), 0, 0, 1, 1},
  {&__pyx_n_s_build_rows, __pyx_k_build_rows, sizeof(__pyx_k_build_rows), 0, 0, 1, 1},
  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {&__pyx_n_s_calculate_limits, __pyx_k_calculate_limits, sizeof(__pyx_k_calculate_limits), 0, 0, 1, 1},
  {&__pyx_n_s_center, __pyx_k_center, sizeof(__pyx_k_center), 0, 0, 1, 1},
  {&__pyx_n_s_char, __pyx_k_char, sizeof(__pyx_k_char), 0, 0, 1, 1},
  {&__pyx_n_s_char_bottom, __pyx_k_char_bottom, sizeof(__pyx_k_char_bottom), 0, 0, 1, 1},
  {&__pyx_n_s_char_center, __pyx_k_char_center, sizeof(__pyx_k_char_center), 0, 0, 1, 1},
  {&__pyx_n_s_char_footer, __pyx_k_char_footer, sizeof(__pyx_k_char_footer), 0, 0, 1, 1},
  {&__pyx_n_s_char_header, __pyx_k_char_header, sizeof(__pyx_k_char_header), 0, 0, 1, 1},
  {&__pyx_n_s_char_mid_header, __pyx_k_char_mid_header, sizeof(__pyx_k_char_mid_header), 0, 0, 1, 1},
  {&__pyx_n_s_char_rst, __pyx_k_char_rst, sizeof(__pyx_k_char_rst), 0, 0, 1, 1},
  {&__pyx_n_s_char_top, __pyx_k_char_top, sizeof(__pyx_k_char_top), 0, 0, 1, 1},
  {&__pyx_n_s_char_walls, __pyx_k_char_walls, sizeof(__pyx_k_char_walls), 0, 0, 1, 1},
  {&__pyx_n_s_characters, __pyx_k_characters, sizeof(__pyx_k_characters), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_color, __pyx_k_color, sizeof(__pyx_k_color), 0, 0, 1, 1},
  {&__pyx_n_s_colors, __pyx_k_colors, sizeof(__pyx_k_colors), 0, 0, 1, 1},
  {&__pyx_n_s_column, __pyx_k_column, sizeof(__pyx_k_column), 0, 0, 1, 1},
  {&__pyx_kp_s_column_0, __pyx_k_column_0, sizeof(__pyx_k_column_0), 0, 0, 1, 0},
  {&__pyx_n_s_column_character_width, __pyx_k_column_character_width, sizeof(__pyx_k_column_character_width), 0, 0, 1, 1},
  {&__pyx_n_s_column_count, __pyx_k_column_count, sizeof(__pyx_k_column_count), 0, 0, 1, 1},
  {&__pyx_n_s_column_display, __pyx_k_column_display, sizeof(__pyx_k_column_display), 0, 0, 1, 1},
  {&__pyx_n_s_column_pad, __pyx_k_column_pad, sizeof(__pyx_k_column_pad), 0, 0, 1, 1},
  {&__pyx_n_s_column_width, __pyx_k_column_width, sizeof(__pyx_k_column_width), 0, 0, 1, 1},
  {&__pyx_n_s_columns, __pyx_k_columns, sizeof(__pyx_k_columns), 0, 0, 1, 1},
  {&__pyx_n_s_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 0, 1, 1},
  {&__pyx_n_s_cyan, __pyx_k_cyan, sizeof(__pyx_k_cyan), 0, 0, 1, 1},
  {&__pyx_kp_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 0},
  {&__pyx_kp_s_dark_gray, __pyx_k_dark_gray, sizeof(__pyx_k_dark_gray), 0, 0, 1, 0},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_data_column_count, __pyx_k_data_column_count, sizeof(__pyx_k_data_column_count), 0, 0, 1, 1},
  {&__pyx_kp_s_data_is_invalid_0, __pyx_k_data_is_invalid_0, sizeof(__pyx_k_data_is_invalid_0), 0, 0, 1, 0},
  {&__pyx_n_s_data_len, __pyx_k_data_len, sizeof(__pyx_k_data_len), 0, 0, 1, 1},
  {&__pyx_n_s_data_type, __pyx_k_data_type, sizeof(__pyx_k_data_type), 0, 0, 1, 1},
  {&__pyx_n_s_ddb_output_factory_term, __pyx_k_ddb_output_factory_term, sizeof(__pyx_k_ddb_output_factory_term), 0, 0, 1, 1},
  {&__pyx_kp_s_ddb_output_factory_term_py, __pyx_k_ddb_output_factory_term_py, sizeof(__pyx_k_ddb_output_factory_term_py), 0, 0, 1, 0},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1},
  {&__pyx_n_s_disabled, __pyx_k_disabled, sizeof(__pyx_k_disabled), 0, 0, 1, 1},
  {&__pyx_n_s_display_style, __pyx_k_display_style, sizeof(__pyx_k_display_style), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1},
  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
  {&__pyx_n_s_edge, __pyx_k_edge, sizeof(__pyx_k_edge), 0, 0, 1, 1},
  {&__pyx_n_s_edit, __pyx_k_edit, sizeof(__pyx_k_edit), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_encode_target, __pyx_k_encode_target, sizeof(__pyx_k_encode_target), 0, 0, 1, 1},
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
  {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
  {&__pyx_kp_u_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 1, 0, 0},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_s_fill_character, __pyx_k_fill_character, sizeof(__pyx_k_fill_character), 0, 0, 1, 1},
  {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
  {&__pyx_n_s_flextable, __pyx_k_flextable, sizeof(__pyx_k_flextable), 0, 0, 1, 1},
  {&__pyx_n_s_flextable___init, __pyx_k_flextable___init, sizeof(__pyx_k_flextable___init), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_build_header, __pyx_k_flextable_build_header, sizeof(__pyx_k_flextable_build_header), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_build_row_seperator, __pyx_k_flextable_build_row_seperator, sizeof(__pyx_k_flextable_build_row_seperator), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_build_rows, __pyx_k_flextable_build_rows, sizeof(__pyx_k_flextable_build_rows), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_calculate_limits, __pyx_k_flextable_calculate_limits, sizeof(__pyx_k_flextable_calculate_limits), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters, __pyx_k_flextable_characters, sizeof(__pyx_k_flextable_characters), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters___init, __pyx_k_flextable_characters___init, sizeof(__pyx_k_flextable_characters___init), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_bottom, __pyx_k_flextable_characters_char_bottom, sizeof(__pyx_k_flextable_characters_char_bottom), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_bottom_2, __pyx_k_flextable_characters_char_bottom_2, sizeof(__pyx_k_flextable_characters_char_bottom_2), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_center, __pyx_k_flextable_characters_char_center, sizeof(__pyx_k_flextable_characters_char_center), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_center_2, __pyx_k_flextable_characters_char_center_2, sizeof(__pyx_k_flextable_characters_char_center_2), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_footer, __pyx_k_flextable_characters_char_footer, sizeof(__pyx_k_flextable_characters_char_footer), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_footer_2, __pyx_k_flextable_characters_char_footer_2, sizeof(__pyx_k_flextable_characters_char_footer_2), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_header, __pyx_k_flextable_characters_char_header, sizeof(__pyx_k_flextable_characters_char_header), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_header_2, __pyx_k_flextable_characters_char_header_2, sizeof(__pyx_k_flextable_characters_char_header_2), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_mid_he, __pyx_k_flextable_characters_char_mid_he, sizeof(__pyx_k_flextable_characters_char_mid_he), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_mid_he_2, __pyx_k_flextable_characters_char_mid_he_2, sizeof(__pyx_k_flextable_characters_char_mid_he_2), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_rst, __pyx_k_flextable_characters_char_rst, sizeof(__pyx_k_flextable_characters_char_rst), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_rst_2, __pyx_k_flextable_characters_char_rst_2, sizeof(__pyx_k_flextable_characters_char_rst_2), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_top, __pyx_k_flextable_characters_char_top, sizeof(__pyx_k_flextable_characters_char_top), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_top_2, __pyx_k_flextable_characters_char_top_2, sizeof(__pyx_k_flextable_characters_char_top_2), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_walls, __pyx_k_flextable_characters_char_walls, sizeof(__pyx_k_flextable_characters_char_walls), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_characters_char_walls_2, __pyx_k_flextable_characters_char_walls_2, sizeof(__pyx_k_flextable_characters_char_walls_2), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_color, __pyx_k_flextable_color, sizeof(__pyx_k_flextable_color), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_color___init, __pyx_k_flextable_color___init, sizeof(__pyx_k_flextable_color___init), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_color_render, __pyx_k_flextable_color_render, sizeof(__pyx_k_flextable_color_render), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_colors, __pyx_k_flextable_colors, sizeof(__pyx_k_flextable_colors), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_data_type, __pyx_k_flextable_data_type, sizeof(__pyx_k_flextable_data_type), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_flextable_style, __pyx_k_flextable_flextable_style, sizeof(__pyx_k_flextable_flextable_style), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_flextable_style___init, __pyx_k_flextable_flextable_style___init, sizeof(__pyx_k_flextable_flextable_style___init), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_format, __pyx_k_flextable_format, sizeof(__pyx_k_flextable_format), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_modes, __pyx_k_flextable_modes, sizeof(__pyx_k_flextable_modes), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_modes___init, __pyx_k_flextable_modes___init, sizeof(__pyx_k_flextable_modes___init), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_print_errors, __pyx_k_flextable_print_errors, sizeof(__pyx_k_flextable_print_errors), 0, 0, 1, 1},
  {&__pyx_n_s_flextable_style, __pyx_k_flextable_style, sizeof(__pyx_k_flextable_style), 0, 0, 1, 1},
  {&__pyx_n_s_footer, __pyx_k_footer, sizeof(__pyx_k_footer), 0, 0, 1, 1},
  {&__pyx_n_s_foreground, __pyx_k_foreground, sizeof(__pyx_k_foreground), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_green, __pyx_k_green, sizeof(__pyx_k_green), 0, 0, 1, 1},
  {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1},
  {&__pyx_n_s_header_every, __pyx_k_header_every, sizeof(__pyx_k_header_every), 0, 0, 1, 1},
  {&__pyx_n_s_hide_comments, __pyx_k_hide_comments, sizeof(__pyx_k_hide_comments), 0, 0, 1, 1},
  {&__pyx_n_s_hide_errors, __pyx_k_hide_errors, sizeof(__pyx_k_hide_errors), 0, 0, 1, 1},
  {&__pyx_n_s_hide_whitespace, __pyx_k_hide_whitespace, sizeof(__pyx_k_hide_whitespace), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 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_is_temp_file, __pyx_k_is_temp_file, sizeof(__pyx_k_is_temp_file), 0, 0, 1, 1},
  {&__pyx_n_s_isspace, __pyx_k_isspace, sizeof(__pyx_k_isspace), 0, 0, 1, 1},
  {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1},
  {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1},
  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
  {&__pyx_kp_s_light_gray, __pyx_k_light_gray, sizeof(__pyx_k_light_gray), 0, 0, 1, 0},
  {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
  {&__pyx_n_s_line_ending, __pyx_k_line_ending, sizeof(__pyx_k_line_ending), 0, 0, 1, 1},
  {&__pyx_n_s_ljust, __pyx_k_ljust, sizeof(__pyx_k_ljust), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_mid, __pyx_k_mid, sizeof(__pyx_k_mid), 0, 0, 1, 1},
  {&__pyx_n_s_mid_header, __pyx_k_mid_header, sizeof(__pyx_k_mid_header), 0, 0, 1, 1},
  {&__pyx_n_s_modes, __pyx_k_modes, sizeof(__pyx_k_modes), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_mprint, __pyx_k_mprint, sizeof(__pyx_k_mprint), 0, 0, 1, 1},
  {&__pyx_kp_s_mprint_ERROR, __pyx_k_mprint_ERROR, sizeof(__pyx_k_mprint_ERROR), 0, 0, 1, 0},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_output_destination, __pyx_k_output_destination, sizeof(__pyx_k_output_destination), 0, 0, 1, 1},
  {&__pyx_n_s_output_stream, __pyx_k_output_stream, sizeof(__pyx_k_output_stream), 0, 0, 1, 1},
  {&__pyx_n_s_overflow, __pyx_k_overflow, sizeof(__pyx_k_overflow), 0, 0, 1, 1},
  {&__pyx_n_s_override, __pyx_k_override, sizeof(__pyx_k_override), 0, 0, 1, 1},
  {&__pyx_n_s_pad, __pyx_k_pad, sizeof(__pyx_k_pad), 0, 0, 1, 1},
  {&__pyx_n_s_page, __pyx_k_page, sizeof(__pyx_k_page), 0, 0, 1, 1},
  {&__pyx_n_s_popen, __pyx_k_popen, sizeof(__pyx_k_popen), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_n_s_print_errors, __pyx_k_print_errors, sizeof(__pyx_k_print_errors), 0, 0, 1, 1},
  {&__pyx_n_s_pro, __pyx_k_pro, sizeof(__pyx_k_pro), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_raw, __pyx_k_raw, sizeof(__pyx_k_raw), 0, 0, 1, 1},
  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_red, __pyx_k_red, sizeof(__pyx_k_red), 0, 0, 1, 1},
  {&__pyx_n_s_render, __pyx_k_render, sizeof(__pyx_k_render), 0, 0, 1, 1},
  {&__pyx_n_s_render_color, __pyx_k_render_color, sizeof(__pyx_k_render_color), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_n_s_replacment, __pyx_k_replacment, sizeof(__pyx_k_replacment), 0, 0, 1, 1},
  {&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1},
  {&__pyx_n_s_results, __pyx_k_results, sizeof(__pyx_k_results), 0, 0, 1, 1},
  {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1},
  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
  {&__pyx_n_s_row_header_seperator, __pyx_k_row_header_seperator, sizeof(__pyx_k_row_header_seperator), 0, 0, 1, 1},
  {&__pyx_n_s_row_height, __pyx_k_row_height, sizeof(__pyx_k_row_height), 0, 0, 1, 1},
  {&__pyx_n_s_row_seperator, __pyx_k_row_seperator, sizeof(__pyx_k_row_seperator), 0, 0, 1, 1},
  {&__pyx_n_s_rows, __pyx_k_rows, sizeof(__pyx_k_rows), 0, 0, 1, 1},
  {&__pyx_n_s_rst, __pyx_k_rst, sizeof(__pyx_k_rst), 0, 0, 1, 1},
  {&__pyx_n_s_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 0, 1, 1},
  {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_single, __pyx_k_single, sizeof(__pyx_k_single), 0, 0, 1, 1},
  {&__pyx_n_s_space, __pyx_k_space, sizeof(__pyx_k_space), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_starts_on, __pyx_k_starts_on, sizeof(__pyx_k_starts_on), 0, 0, 1, 1},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1},
  {&__pyx_n_s_stringer, __pyx_k_stringer, sizeof(__pyx_k_stringer), 0, 0, 1, 1},
  {&__pyx_kp_s_stty_F_dev_tty_size, __pyx_k_stty_F_dev_tty_size, sizeof(__pyx_k_stty_F_dev_tty_size), 0, 0, 1, 0},
  {&__pyx_n_s_style, __pyx_k_style, sizeof(__pyx_k_style), 0, 0, 1, 1},
  {&__pyx_n_s_subprocess, __pyx_k_subprocess, sizeof(__pyx_k_subprocess), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_tab_stop, __pyx_k_tab_stop, sizeof(__pyx_k_tab_stop), 0, 0, 1, 1},
  {&__pyx_n_s_tab_width, __pyx_k_tab_width, sizeof(__pyx_k_tab_width), 0, 0, 1, 1},
  {&__pyx_n_s_table, __pyx_k_table, sizeof(__pyx_k_table), 0, 0, 1, 1},
  {&__pyx_n_s_term, __pyx_k_term, sizeof(__pyx_k_term), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
  {&__pyx_n_s_top, __pyx_k_top, sizeof(__pyx_k_top), 0, 0, 1, 1},
  {&__pyx_n_s_total_width, __pyx_k_total_width, sizeof(__pyx_k_total_width), 0, 0, 1, 1},
  {&__pyx_n_s_tty_code, __pyx_k_tty_code, sizeof(__pyx_k_tty_code), 0, 0, 1, 1},
  {&__pyx_n_s_tty_code_attributes, __pyx_k_tty_code_attributes, sizeof(__pyx_k_tty_code_attributes), 0, 0, 1, 1},
  {&__pyx_n_s_tty_code_background, __pyx_k_tty_code_background, sizeof(__pyx_k_tty_code_background), 0, 0, 1, 1},
  {&__pyx_n_s_tty_code_foreground, __pyx_k_tty_code_foreground, sizeof(__pyx_k_tty_code_foreground), 0, 0, 1, 1},
  {&__pyx_n_s_tty_code_reset, __pyx_k_tty_code_reset, sizeof(__pyx_k_tty_code_reset), 0, 0, 1, 1},
  {&__pyx_n_s_tty_min_column_width, __pyx_k_tty_min_column_width, sizeof(__pyx_k_tty_min_column_width), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
  {&__pyx_n_s_use_color, __pyx_k_use_color, sizeof(__pyx_k_use_color), 0, 0, 1, 1},
  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
  {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
  {&__pyx_n_s_wall_color, __pyx_k_wall_color, sizeof(__pyx_k_wall_color), 0, 0, 1, 1},
  {&__pyx_n_s_walls, __pyx_k_walls, sizeof(__pyx_k_walls), 0, 0, 1, 1},
  {&__pyx_n_s_white, __pyx_k_white, sizeof(__pyx_k_white), 0, 0, 1, 1},
  {&__pyx_n_s_whitespace, __pyx_k_whitespace, sizeof(__pyx_k_whitespace), 0, 0, 1, 1},
  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__pyx_n_s_yellow, __pyx_k_yellow, sizeof(__pyx_k_yellow), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 112, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 526, __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);

  /* "ddb/output/factory_term.py":251
 * 
 *             if text.find('\t')>-1:
 *                 text=text.replace('\t','    ')             # <<<<<<<<<<<<<<
 * 
 *             text=text.rstrip()
 */
  __pyx_tuple__14 = PyTuple_Pack(2, __pyx_kp_s__12, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "ddb/output/factory_term.py":267
 *         def __init__(self):
 *             self.default  =flextable.color('blue'      )
 *             self.error    =flextable.color('red'        ,bold=True,default=self.default)             # <<<<<<<<<<<<<<
 *             self.overflow =flextable.color('yellow'     ,default=self.default)
 *             self.comment  =flextable.color('yellow'     ,default=self.default)
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_red); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "ddb/output/factory_term.py":268
 *             self.default  =flextable.color('blue'      )
 *             self.error    =flextable.color('red'        ,bold=True,default=self.default)
 *             self.overflow =flextable.color('yellow'     ,default=self.default)             # <<<<<<<<<<<<<<
 *             self.comment  =flextable.color('yellow'     ,default=self.default)
 *             self.data     =flextable.color('light gray' ,default=self.default)
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_yellow); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "ddb/output/factory_term.py":270
 *             self.overflow =flextable.color('yellow'     ,default=self.default)
 *             self.comment  =flextable.color('yellow'     ,default=self.default)
 *             self.data     =flextable.color('light gray' ,default=self.default)             # <<<<<<<<<<<<<<
 *             self.active   =flextable.color('white'      ,default=self.default)
 *             self.edit     =flextable.color('cyan'       ,default=self.default)
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_light_gray); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "ddb/output/factory_term.py":271
 *             self.comment  =flextable.color('yellow'     ,default=self.default)
 *             self.data     =flextable.color('light gray' ,default=self.default)
 *             self.active   =flextable.color('white'      ,default=self.default)             # <<<<<<<<<<<<<<
 *             self.edit     =flextable.color('cyan'       ,default=self.default)
 *             self.disabled =flextable.color('dark gray'  ,default=self.default)
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_white); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "ddb/output/factory_term.py":272
 *             self.data     =flextable.color('light gray' ,default=self.default)
 *             self.active   =flextable.color('white'      ,default=self.default)
 *             self.edit     =flextable.color('cyan'       ,default=self.default)             # <<<<<<<<<<<<<<
 *             self.disabled =flextable.color('dark gray'  ,default=self.default)
 * 
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_cyan); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "ddb/output/factory_term.py":273
 *             self.active   =flextable.color('white'      ,default=self.default)
 *             self.edit     =flextable.color('cyan'       ,default=self.default)
 *             self.disabled =flextable.color('dark gray'  ,default=self.default)             # <<<<<<<<<<<<<<
 * 
 *     class characters:
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_dark_gray); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "ddb/output/factory_term.py":515
 *             self.column_width=80
 *             try:
 *                 pro=os.popen('stty -F /dev/tty size', 'r')             # <<<<<<<<<<<<<<
 *                 self.row_height,self.column_width =pro.read().split()
 *                 pro.close()
 */
  __pyx_tuple__62 = PyTuple_Pack(2, __pyx_kp_s_stty_F_dev_tty_size, __pyx_n_s_r); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "ddb/output/factory_term.py":652
 *                         wall_color=tty_code.background.LIGHT_BLUE
 *                         for c in range(data_len,self.column_count):
 *                             columns+=self.style.color.comment.render('',use_color=self.render_color,length=self.column_character_width)             # <<<<<<<<<<<<<<
 *                             columns+=self.style.characters.walls.right.render(use_color=self.render_color,override=self.style.color.error)
 * 
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s__7); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "ddb/output/factory_term.py":8
 * from  subprocess import Popen
 * 
 * def stringer(base,*args):             # <<<<<<<<<<<<<<
 *     index=0
 *     o=base
 */
  __pyx_tuple__70 = PyTuple_Pack(7, __pyx_n_s_base, __pyx_n_s_args, __pyx_n_s_index, __pyx_n_s_o, __pyx_n_s_arg, __pyx_n_s_term, __pyx_n_s_replacment); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
  __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_stringer, 8, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 8, __pyx_L1_error)

  /* "ddb/output/factory_term.py":28
 *     return o
 * 
 * def mprint(text):             # <<<<<<<<<<<<<<
 *     encode_target='utf-8'
 *     try:
 */
  __pyx_tuple__71 = PyTuple_Pack(3, __pyx_n_s_text, __pyx_n_s_encode_target, __pyx_n_s_major); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_mprint, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 28, __pyx_L1_error)

  /* "ddb/output/factory_term.py":113
 * 
 *     @staticmethod
 *     def colors(foreground,background,dim=None,bold=None):             # <<<<<<<<<<<<<<
 *         color=''
 *         if dim !=None:
 */
  __pyx_tuple__72 = PyTuple_Pack(5, __pyx_n_s_foreground, __pyx_n_s_background, __pyx_n_s_dim, __pyx_n_s_bold, __pyx_n_s_color); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);
  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_colors, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 113, __pyx_L1_error)
  __pyx_tuple__73 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "ddb/output/factory_term.py":193
 * 
 *     class flextable_style:
 *         def __init__(self,style='rst'):             # <<<<<<<<<<<<<<
 *             self.whitespace=''
 *             self.line_ending='LRCF'
 */
  __pyx_tuple__74 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_style); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 193, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 193, __pyx_L1_error)
  __pyx_tuple__75 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_rst)); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "ddb/output/factory_term.py":201
 *         # Helper classes
 *     class color:
 *         def __init__(self,foreground=None,background=None,text=None,dim=None,bold=None,default=None):             # <<<<<<<<<<<<<<
 *             self.foreground=foreground
 *             self.background=background
 */
  __pyx_tuple__76 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_foreground, __pyx_n_s_background, __pyx_n_s_text, __pyx_n_s_dim, __pyx_n_s_bold, __pyx_n_s_default); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
  __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 201, __pyx_L1_error)
  __pyx_tuple__77 = PyTuple_Pack(6, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "ddb/output/factory_term.py":226
 * 
 * 
 *         def render(self,text=None, length=None,fill_character=' ',override=None,use_color=True):             # <<<<<<<<<<<<<<
 *             if text==None:
 *                 text=self.text
 */
  __pyx_tuple__78 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_text, __pyx_n_s_length, __pyx_n_s_fill_character, __pyx_n_s_override, __pyx_n_s_use_color); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_render, 226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 226, __pyx_L1_error)
  __pyx_tuple__79 = PyTuple_Pack(5, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject*)__pyx_kp_s__10), ((PyObject *)Py_None), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "ddb/output/factory_term.py":265
 * 
 *     class modes:
 *         def __init__(self):             # <<<<<<<<<<<<<<
 *             self.default  =flextable.color('blue'      )
 *             self.error    =flextable.color('red'        ,bold=True,default=self.default)
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 265, __pyx_L1_error)

  /* "ddb/output/factory_term.py":278
 *         class char_walls:
 * 
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */
  __pyx_tuple__81 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_default, __pyx_n_s_style, __pyx_n_s_l, __pyx_n_s_r, __pyx_n_s_t, __pyx_n_s_b); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 278, __pyx_L1_error)
  __pyx_tuple__82 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_rst)); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "ddb/output/factory_term.py":305
 *                 self.bottom =flextable.color(text=b,default=default)
 *         class char_center:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */
  __pyx_tuple__83 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_default, __pyx_n_s_style, __pyx_n_s_l, __pyx_n_s_c, __pyx_n_s_r); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 305, __pyx_L1_error)
  __pyx_tuple__84 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_rst)); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "ddb/output/factory_term.py":328
 * 
 *         class char_rst:
 *             def __init__(self,default=None):             # <<<<<<<<<<<<<<
 *                 self.edge   =flextable.color(text='+',default=default)
 *                 self.space  =flextable.color(text=' ',default=default)
 */
  __pyx_tuple__85 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_default); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 328, __pyx_L1_error)
  __pyx_tuple__86 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "ddb/output/factory_term.py":335
 * 
 *         class char_bottom:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */
  __pyx_tuple__87 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_default, __pyx_n_s_style, __pyx_n_s_l, __pyx_n_s_c, __pyx_n_s_r); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 335, __pyx_L1_error)
  __pyx_tuple__88 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_rst)); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "ddb/output/factory_term.py":357
 *                 self.right  = flextable.color(text=r,default=default)
 *         class char_top:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style == 'single':
 *                     l=u''
 */
  __pyx_tuple__89 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_default, __pyx_n_s_style, __pyx_n_s_l, __pyx_n_s_c, __pyx_n_s_r); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 357, __pyx_L1_error)
  __pyx_tuple__90 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_rst)); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "ddb/output/factory_term.py":379
 *                 self.center = flextable.color(text=c,default=default)
 *         class char_header:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */
  __pyx_tuple__91 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_default, __pyx_n_s_style, __pyx_n_s_l, __pyx_n_s_c, __pyx_n_s_r); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 379, __pyx_L1_error)
  __pyx_tuple__92 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_rst)); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "ddb/output/factory_term.py":401
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_mid_header:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style == 'single':
 *                     l=u'-'
 */
  __pyx_tuple__93 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_default, __pyx_n_s_style, __pyx_n_s_l, __pyx_n_s_c, __pyx_n_s_r); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 401, __pyx_L1_error)
  __pyx_tuple__94 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_rst)); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "ddb/output/factory_term.py":423
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_footer:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 * 
 *                 if style=='single':
 */
  __pyx_tuple__95 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_default, __pyx_n_s_style, __pyx_n_s_l, __pyx_n_s_c, __pyx_n_s_r); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 423, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 423, __pyx_L1_error)
  __pyx_tuple__96 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_rst)); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "ddb/output/factory_term.py":445
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 * 
 *         def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 * 
 *             self.walls      =self.char_walls(default=default,style=style)
 */
  __pyx_tuple__97 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_default, __pyx_n_s_style); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 445, __pyx_L1_error)
  __pyx_tuple__98 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_rst)); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "ddb/output/factory_term.py":464
 *         WHITESPACE=4
 * 
 *     def __init__(self,      data,             # <<<<<<<<<<<<<<
 *                             display_style='single',
 *                             column_count=0,
 */
  __pyx_tuple__99 = PyTuple_Pack(22, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_display_style, __pyx_n_s_column_count, __pyx_n_s_hide_comments, __pyx_n_s_hide_errors, __pyx_n_s_hide_whitespace, __pyx_n_s_columns, __pyx_n_s_length, __pyx_n_s_line, __pyx_n_s_page, __pyx_n_s_header, __pyx_n_s_footer, __pyx_n_s_header_every, __pyx_n_s_tab_width, __pyx_n_s_tab_stop, __pyx_n_s_row_height, __pyx_n_s_column_width, __pyx_n_s_render_color, __pyx_n_s_output_stream, __pyx_n_s_pro, __pyx_n_s_n); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(20, 0, 22, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_init, 464, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 464, __pyx_L1_error)
  __pyx_tuple__100 = PyTuple_Pack(18, ((PyObject*)__pyx_n_s_single), ((PyObject *)__pyx_int_0), ((PyObject *)Py_False), ((PyObject *)Py_False), ((PyObject *)Py_False), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)__pyx_int_0), ((PyObject *)__pyx_int_0), ((PyObject *)Py_True), ((PyObject *)Py_True), ((PyObject *)__pyx_int_neg_1), ((PyObject *)__pyx_int_4), ((PyObject *)__pyx_int_8), ((PyObject *)__pyx_int_neg_1), ((PyObject *)__pyx_int_neg_1), ((PyObject *)Py_True), ((PyObject*)__pyx_n_s_STDIO)); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "ddb/output/factory_term.py":549
 * 
 * 
 *     def calculate_limits(self):             # <<<<<<<<<<<<<<
 *         tty_min_column_width=1
 *         # doesnt work with pipes. ugh
 */
  __pyx_tuple__101 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tty_min_column_width, __pyx_n_s_data_column_count, __pyx_n_s_pad); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_calculate_limits, 549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 549, __pyx_L1_error)

  /* "ddb/output/factory_term.py":578
 *         self.total_width=self.column_character_width*data_column_count+data_column_count-1
 * 
 *     def build_header(self,footer=False,mid=False):             # <<<<<<<<<<<<<<
 *         # header
 * 
 */
  __pyx_tuple__102 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_footer, __pyx_n_s_mid, __pyx_n_s_base, __pyx_n_s_column, __pyx_n_s_header, __pyx_n_s_column_pad, __pyx_n_s_index, __pyx_n_s_c, __pyx_n_s_column_display); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 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_ddb_output_factory_term_py, __pyx_n_s_build_header, 578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 578, __pyx_L1_error)
  __pyx_tuple__103 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "ddb/output/factory_term.py":630
 *         return header
 * 
 *     def build_rows(self,buffer):             # <<<<<<<<<<<<<<
 *         rows=[]
 *         index=0
 */
  __pyx_tuple__104 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_buffer, __pyx_n_s_rows, __pyx_n_s_index, __pyx_n_s_line, __pyx_n_s_data_len, __pyx_n_s_columns, __pyx_n_s_c, __pyx_n_s_wall_color, __pyx_n_s_left, __pyx_n_s_center, __pyx_n_s_right); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_build_rows, 630, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 630, __pyx_L1_error)

  /* "ddb/output/factory_term.py":684
 *         return rows
 * 
 *     def build_row_seperator(self,header=None):             # <<<<<<<<<<<<<<
 *         index=0
 *         if header:
 */
  __pyx_tuple__105 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_header, __pyx_n_s_index, __pyx_n_s_char, __pyx_n_s_row, __pyx_n_s_i); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_build_row_seperator, 684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 684, __pyx_L1_error)
  __pyx_tuple__106 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "ddb/output/factory_term.py":701
 * 
 * 
 *     def print_errors(self,table):             # <<<<<<<<<<<<<<
 *         for e in table.errors:
 *             print(e.encode('utf-8'))
 */
  __pyx_tuple__107 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_table, __pyx_n_s_e); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_ddb_output_factory_term_py, __pyx_n_s_print_errors, 701, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 701, __pyx_L1_error)

  /* "ddb/output/factory_term.py":706
 * 
 *     # with no columns, everything will be run on, not well formated
 *     def format(self):             # <<<<<<<<<<<<<<
 *         # now we have a file, from stdin or a file on the system that we can access
 *         # print buffer
 */
  __pyx_tuple__108 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_header, __pyx_n_s_mid_header, __pyx_n_s_footer, __pyx_n_s_rows, __pyx_n_s_row_seperator, __pyx_n_s_row_header_seperator, __pyx_n_s_index, __pyx_n_s_encode, __pyx_n_s_row); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 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_ddb_output_factory_term_py, __pyx_n_s_format, 706, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_21 = PyInt_FromLong(21); if (unlikely(!__pyx_int_21)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_27 = PyInt_FromLong(27); if (unlikely(!__pyx_int_27)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_33 = PyInt_FromLong(33); if (unlikely(!__pyx_int_33)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_34 = PyInt_FromLong(34); if (unlikely(!__pyx_int_34)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_35 = PyInt_FromLong(35); if (unlikely(!__pyx_int_35)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_36 = PyInt_FromLong(36); if (unlikely(!__pyx_int_36)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_37 = PyInt_FromLong(37); if (unlikely(!__pyx_int_37)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_39 = PyInt_FromLong(39); if (unlikely(!__pyx_int_39)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_41 = PyInt_FromLong(41); if (unlikely(!__pyx_int_41)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_42 = PyInt_FromLong(42); if (unlikely(!__pyx_int_42)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_43 = PyInt_FromLong(43); if (unlikely(!__pyx_int_43)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_44 = PyInt_FromLong(44); if (unlikely(!__pyx_int_44)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_45 = PyInt_FromLong(45); if (unlikely(!__pyx_int_45)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_46 = PyInt_FromLong(46); if (unlikely(!__pyx_int_46)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_47 = PyInt_FromLong(47); if (unlikely(!__pyx_int_47)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_49 = PyInt_FromLong(49); if (unlikely(!__pyx_int_49)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_80 = PyInt_FromLong(80); if (unlikely(!__pyx_int_80)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_90 = PyInt_FromLong(90); if (unlikely(!__pyx_int_90)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_91 = PyInt_FromLong(91); if (unlikely(!__pyx_int_91)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_92 = PyInt_FromLong(92); if (unlikely(!__pyx_int_92)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_93 = PyInt_FromLong(93); if (unlikely(!__pyx_int_93)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_94 = PyInt_FromLong(94); if (unlikely(!__pyx_int_94)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_95 = PyInt_FromLong(95); if (unlikely(!__pyx_int_95)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_96 = PyInt_FromLong(96); if (unlikely(!__pyx_int_96)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_97 = PyInt_FromLong(97); if (unlikely(!__pyx_int_97)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_101 = PyInt_FromLong(101); if (unlikely(!__pyx_int_101)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_102 = PyInt_FromLong(102); if (unlikely(!__pyx_int_102)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_103 = PyInt_FromLong(103); if (unlikely(!__pyx_int_103)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_104 = PyInt_FromLong(104); if (unlikely(!__pyx_int_104)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_105 = PyInt_FromLong(105); if (unlikely(!__pyx_int_105)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_106 = PyInt_FromLong(106); if (unlikely(!__pyx_int_106)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_107 = PyInt_FromLong(107); if (unlikely(!__pyx_int_107)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION < 3
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC void
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#else
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initfactory_term(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initfactory_term(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_factory_term(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_factory_term(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_factory_term(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  __Pyx_TraceDeclarations
  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;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'factory_term' 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_factory_term(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("factory_term", __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_ddb__output__factory_term) {
    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, "ddb.output.factory_term")) {
      if (unlikely(PyDict_SetItemString(modules, "ddb.output.factory_term", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  (void)__Pyx_modinit_type_init_code();
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_factory_term(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "ddb/output/factory_term.py":4
 * # cython: linetrace=True
 * 
 * import sys             # <<<<<<<<<<<<<<
 * import os
 * from  subprocess import Popen
 */
  __Pyx_TraceLine(4,0,__PYX_ERR(0, 4, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":5
 * 
 * import sys
 * import os             # <<<<<<<<<<<<<<
 * from  subprocess import Popen
 * 
 */
  __Pyx_TraceLine(5,0,__PYX_ERR(0, 5, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":6
 * import sys
 * import os
 * from  subprocess import Popen             # <<<<<<<<<<<<<<
 * 
 * def stringer(base,*args):
 */
  __Pyx_TraceLine(6,0,__PYX_ERR(0, 6, __pyx_L1_error))
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Popen);
  __Pyx_GIVEREF(__pyx_n_s_Popen);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Popen);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_subprocess, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __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_Popen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Popen, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":8
 * from  subprocess import Popen
 * 
 * def stringer(base,*args):             # <<<<<<<<<<<<<<
 *     index=0
 *     o=base
 */
  __Pyx_TraceLine(8,0,__PYX_ERR(0, 8, __pyx_L1_error))
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_1stringer, 0, __pyx_n_s_stringer, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringer, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":28
 *     return o
 * 
 * def mprint(text):             # <<<<<<<<<<<<<<
 *     encode_target='utf-8'
 *     try:
 */
  __Pyx_TraceLine(28,0,__PYX_ERR(0, 28, __pyx_L1_error))
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_3mprint, 0, __pyx_n_s_mprint, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__4)); 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_mprint, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":50
 * 
 * 
 * class tty_code:             # <<<<<<<<<<<<<<
 * 
 *     class attributes:
 */
  __Pyx_TraceLine(50,0,__PYX_ERR(0, 50, __pyx_L1_error))
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_tty_code, __pyx_n_s_tty_code, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "ddb/output/factory_term.py":52
 * class tty_code:
 * 
 *     class attributes:             # <<<<<<<<<<<<<<
 *         BOLD         ='\033[{0}m'.format(1)
 *         DIM          ='\033[{0}m'.format(2)
 */
  __Pyx_TraceLine(52,0,__PYX_ERR(0, 52, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_attributes, __pyx_n_s_tty_code_attributes, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":53
 * 
 *     class attributes:
 *         BOLD         ='\033[{0}m'.format(1)             # <<<<<<<<<<<<<<
 *         DIM          ='\033[{0}m'.format(2)
 *         UNDERLINED   ='\033[{0}m'.format(4)
 */
  __Pyx_TraceLine(53,0,__PYX_ERR(0, 53, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_1);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_BOLD, __pyx_t_3) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":54
 *     class attributes:
 *         BOLD         ='\033[{0}m'.format(1)
 *         DIM          ='\033[{0}m'.format(2)             # <<<<<<<<<<<<<<
 *         UNDERLINED   ='\033[{0}m'.format(4)
 *         BLINK        ='\033[{0}m'.format(5)
 */
  __Pyx_TraceLine(54,0,__PYX_ERR(0, 54, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_DIM, __pyx_t_3) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":55
 *         BOLD         ='\033[{0}m'.format(1)
 *         DIM          ='\033[{0}m'.format(2)
 *         UNDERLINED   ='\033[{0}m'.format(4)             # <<<<<<<<<<<<<<
 *         BLINK        ='\033[{0}m'.format(5)
 *         REVERSE      ='\033[{0}m'.format(7)
 */
  __Pyx_TraceLine(55,0,__PYX_ERR(0, 55, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_UNDERLINED, __pyx_t_3) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":56
 *         DIM          ='\033[{0}m'.format(2)
 *         UNDERLINED   ='\033[{0}m'.format(4)
 *         BLINK        ='\033[{0}m'.format(5)             # <<<<<<<<<<<<<<
 *         REVERSE      ='\033[{0}m'.format(7)
 *         HIDDEN       ='\033[{0}m'.format(8)
 */
  __Pyx_TraceLine(56,0,__PYX_ERR(0, 56, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_5);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_BLINK, __pyx_t_3) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":57
 *         UNDERLINED   ='\033[{0}m'.format(4)
 *         BLINK        ='\033[{0}m'.format(5)
 *         REVERSE      ='\033[{0}m'.format(7)             # <<<<<<<<<<<<<<
 *         HIDDEN       ='\033[{0}m'.format(8)
 * 
 */
  __Pyx_TraceLine(57,0,__PYX_ERR(0, 57, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_7);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_REVERSE, __pyx_t_3) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":58
 *         BLINK        ='\033[{0}m'.format(5)
 *         REVERSE      ='\033[{0}m'.format(7)
 *         HIDDEN       ='\033[{0}m'.format(8)             # <<<<<<<<<<<<<<
 * 
 *     class reset:
 */
  __Pyx_TraceLine(58,0,__PYX_ERR(0, 58, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_8);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_HIDDEN, __pyx_t_3) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":52
 * class tty_code:
 * 
 *     class attributes:             # <<<<<<<<<<<<<<
 *         BOLD         ='\033[{0}m'.format(1)
 *         DIM          ='\033[{0}m'.format(2)
 */
  __Pyx_TraceLine(52,0,__PYX_ERR(0, 52, __pyx_L1_error))
  __pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_attributes, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_attributes, __pyx_t_3) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":60
 *         HIDDEN       ='\033[{0}m'.format(8)
 * 
 *     class reset:             # <<<<<<<<<<<<<<
 *         ALL          ='\033[{0}m'.format(0)
 *         BOLD         ='\033[{0}m'.format(21)
 */
  __Pyx_TraceLine(60,0,__PYX_ERR(0, 60, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_reset, __pyx_n_s_tty_code_reset, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":61
 * 
 *     class reset:
 *         ALL          ='\033[{0}m'.format(0)             # <<<<<<<<<<<<<<
 *         BOLD         ='\033[{0}m'.format(21)
 *         DIM          ='\033[{0}m'.format(22)
 */
  __Pyx_TraceLine(61,0,__PYX_ERR(0, 61, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_ALL, __pyx_t_3) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":62
 *     class reset:
 *         ALL          ='\033[{0}m'.format(0)
 *         BOLD         ='\033[{0}m'.format(21)             # <<<<<<<<<<<<<<
 *         DIM          ='\033[{0}m'.format(22)
 *         UNDERLINED   ='\033[{0}m'.format(24)
 */
  __Pyx_TraceLine(62,0,__PYX_ERR(0, 62, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_21) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_21);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_BOLD, __pyx_t_3) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":63
 *         ALL          ='\033[{0}m'.format(0)
 *         BOLD         ='\033[{0}m'.format(21)
 *         DIM          ='\033[{0}m'.format(22)             # <<<<<<<<<<<<<<
 *         UNDERLINED   ='\033[{0}m'.format(24)
 *         BLINK        ='\033[{0}m'.format(25)
 */
  __Pyx_TraceLine(63,0,__PYX_ERR(0, 63, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_22) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_22);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_DIM, __pyx_t_3) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":64
 *         BOLD         ='\033[{0}m'.format(21)
 *         DIM          ='\033[{0}m'.format(22)
 *         UNDERLINED   ='\033[{0}m'.format(24)             # <<<<<<<<<<<<<<
 *         BLINK        ='\033[{0}m'.format(25)
 *         REVERSE      ='\033[{0}m'.format(27)
 */
  __Pyx_TraceLine(64,0,__PYX_ERR(0, 64, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_24) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_24);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_UNDERLINED, __pyx_t_3) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":65
 *         DIM          ='\033[{0}m'.format(22)
 *         UNDERLINED   ='\033[{0}m'.format(24)
 *         BLINK        ='\033[{0}m'.format(25)             # <<<<<<<<<<<<<<
 *         REVERSE      ='\033[{0}m'.format(27)
 *         HIDDEN       ='\033[{0}m'.format(28)
 */
  __Pyx_TraceLine(65,0,__PYX_ERR(0, 65, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_25) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_25);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_BLINK, __pyx_t_3) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":66
 *         UNDERLINED   ='\033[{0}m'.format(24)
 *         BLINK        ='\033[{0}m'.format(25)
 *         REVERSE      ='\033[{0}m'.format(27)             # <<<<<<<<<<<<<<
 *         HIDDEN       ='\033[{0}m'.format(28)
 * 
 */
  __Pyx_TraceLine(66,0,__PYX_ERR(0, 66, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_27) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_27);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_REVERSE, __pyx_t_3) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":67
 *         BLINK        ='\033[{0}m'.format(25)
 *         REVERSE      ='\033[{0}m'.format(27)
 *         HIDDEN       ='\033[{0}m'.format(28)             # <<<<<<<<<<<<<<
 * 
 *     class foreground:
 */
  __Pyx_TraceLine(67,0,__PYX_ERR(0, 67, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_28) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_28);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_HIDDEN, __pyx_t_3) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":60
 *         HIDDEN       ='\033[{0}m'.format(8)
 * 
 *     class reset:             # <<<<<<<<<<<<<<
 *         ALL          ='\033[{0}m'.format(0)
 *         BOLD         ='\033[{0}m'.format(21)
 */
  __Pyx_TraceLine(60,0,__PYX_ERR(0, 60, __pyx_L1_error))
  __pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_reset, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_reset, __pyx_t_3) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":69
 *         HIDDEN       ='\033[{0}m'.format(28)
 * 
 *     class foreground:             # <<<<<<<<<<<<<<
 *         DEFAULT      ='\033[{0}m'.format(39)
 *         BLACK        ='\033[{0}m'.format(30)
 */
  __Pyx_TraceLine(69,0,__PYX_ERR(0, 69, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_foreground, __pyx_n_s_tty_code_foreground, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":70
 * 
 *     class foreground:
 *         DEFAULT      ='\033[{0}m'.format(39)             # <<<<<<<<<<<<<<
 *         BLACK        ='\033[{0}m'.format(30)
 *         RED          ='\033[{0}m'.format(31)
 */
  __Pyx_TraceLine(70,0,__PYX_ERR(0, 70, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_39) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_39);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_DEFAULT, __pyx_t_3) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":71
 *     class foreground:
 *         DEFAULT      ='\033[{0}m'.format(39)
 *         BLACK        ='\033[{0}m'.format(30)             # <<<<<<<<<<<<<<
 *         RED          ='\033[{0}m'.format(31)
 *         GREEN        ='\033[{0}m'.format(32)
 */
  __Pyx_TraceLine(71,0,__PYX_ERR(0, 71, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_30) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_30);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_BLACK, __pyx_t_3) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":72
 *         DEFAULT      ='\033[{0}m'.format(39)
 *         BLACK        ='\033[{0}m'.format(30)
 *         RED          ='\033[{0}m'.format(31)             # <<<<<<<<<<<<<<
 *         GREEN        ='\033[{0}m'.format(32)
 *         YELLOW       ='\033[{0}m'.format(33)
 */
  __Pyx_TraceLine(72,0,__PYX_ERR(0, 72, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_31) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_31);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_RED, __pyx_t_3) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":73
 *         BLACK        ='\033[{0}m'.format(30)
 *         RED          ='\033[{0}m'.format(31)
 *         GREEN        ='\033[{0}m'.format(32)             # <<<<<<<<<<<<<<
 *         YELLOW       ='\033[{0}m'.format(33)
 *         BLUE         ='\033[{0}m'.format(34)
 */
  __Pyx_TraceLine(73,0,__PYX_ERR(0, 73, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_32) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_32);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_GREEN, __pyx_t_3) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":74
 *         RED          ='\033[{0}m'.format(31)
 *         GREEN        ='\033[{0}m'.format(32)
 *         YELLOW       ='\033[{0}m'.format(33)             # <<<<<<<<<<<<<<
 *         BLUE         ='\033[{0}m'.format(34)
 *         MAGENTA      ='\033[{0}m'.format(35)
 */
  __Pyx_TraceLine(74,0,__PYX_ERR(0, 74, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_33) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_33);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_YELLOW, __pyx_t_3) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":75
 *         GREEN        ='\033[{0}m'.format(32)
 *         YELLOW       ='\033[{0}m'.format(33)
 *         BLUE         ='\033[{0}m'.format(34)             # <<<<<<<<<<<<<<
 *         MAGENTA      ='\033[{0}m'.format(35)
 *         CYAN         ='\033[{0}m'.format(36)
 */
  __Pyx_TraceLine(75,0,__PYX_ERR(0, 75, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_34) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_34);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_BLUE, __pyx_t_3) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":76
 *         YELLOW       ='\033[{0}m'.format(33)
 *         BLUE         ='\033[{0}m'.format(34)
 *         MAGENTA      ='\033[{0}m'.format(35)             # <<<<<<<<<<<<<<
 *         CYAN         ='\033[{0}m'.format(36)
 *         LIGHT_GRAY   ='\033[{0}m'.format(37)
 */
  __Pyx_TraceLine(76,0,__PYX_ERR(0, 76, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_35) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_35);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_MAGENTA, __pyx_t_3) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":77
 *         BLUE         ='\033[{0}m'.format(34)
 *         MAGENTA      ='\033[{0}m'.format(35)
 *         CYAN         ='\033[{0}m'.format(36)             # <<<<<<<<<<<<<<
 *         LIGHT_GRAY   ='\033[{0}m'.format(37)
 *         DARK_GRAY    ='\033[{0}m'.format(90)
 */
  __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_36) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_36);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_CYAN, __pyx_t_3) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":78
 *         MAGENTA      ='\033[{0}m'.format(35)
 *         CYAN         ='\033[{0}m'.format(36)
 *         LIGHT_GRAY   ='\033[{0}m'.format(37)             # <<<<<<<<<<<<<<
 *         DARK_GRAY    ='\033[{0}m'.format(90)
 *         LIGHT_RED    ='\033[{0}m'.format(91)
 */
  __Pyx_TraceLine(78,0,__PYX_ERR(0, 78, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_37) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_37);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_GRAY_2, __pyx_t_3) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":79
 *         CYAN         ='\033[{0}m'.format(36)
 *         LIGHT_GRAY   ='\033[{0}m'.format(37)
 *         DARK_GRAY    ='\033[{0}m'.format(90)             # <<<<<<<<<<<<<<
 *         LIGHT_RED    ='\033[{0}m'.format(91)
 *         LIGHT_GREEN  ='\033[{0}m'.format(92)
 */
  __Pyx_TraceLine(79,0,__PYX_ERR(0, 79, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_90) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_90);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_DARK_GRAY_2, __pyx_t_3) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":80
 *         LIGHT_GRAY   ='\033[{0}m'.format(37)
 *         DARK_GRAY    ='\033[{0}m'.format(90)
 *         LIGHT_RED    ='\033[{0}m'.format(91)             # <<<<<<<<<<<<<<
 *         LIGHT_GREEN  ='\033[{0}m'.format(92)
 *         LIGHT_YELLOW ='\033[{0}m'.format(93)
 */
  __Pyx_TraceLine(80,0,__PYX_ERR(0, 80, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_91) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_91);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_RED_2, __pyx_t_3) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":81
 *         DARK_GRAY    ='\033[{0}m'.format(90)
 *         LIGHT_RED    ='\033[{0}m'.format(91)
 *         LIGHT_GREEN  ='\033[{0}m'.format(92)             # <<<<<<<<<<<<<<
 *         LIGHT_YELLOW ='\033[{0}m'.format(93)
 *         LIGHT_BLUE   ='\033[{0}m'.format(94)
 */
  __Pyx_TraceLine(81,0,__PYX_ERR(0, 81, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_92) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_92);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_GREEN_2, __pyx_t_3) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":82
 *         LIGHT_RED    ='\033[{0}m'.format(91)
 *         LIGHT_GREEN  ='\033[{0}m'.format(92)
 *         LIGHT_YELLOW ='\033[{0}m'.format(93)             # <<<<<<<<<<<<<<
 *         LIGHT_BLUE   ='\033[{0}m'.format(94)
 *         LIGHT_MAGENTA='\033[{0}m'.format(95)
 */
  __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_93) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_93);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_YELLOW_2, __pyx_t_3) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":83
 *         LIGHT_GREEN  ='\033[{0}m'.format(92)
 *         LIGHT_YELLOW ='\033[{0}m'.format(93)
 *         LIGHT_BLUE   ='\033[{0}m'.format(94)             # <<<<<<<<<<<<<<
 *         LIGHT_MAGENTA='\033[{0}m'.format(95)
 *         LIGHT_CYAN   ='\033[{0}m'.format(96)
 */
  __Pyx_TraceLine(83,0,__PYX_ERR(0, 83, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_94) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_94);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_BLUE_2, __pyx_t_3) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":84
 *         LIGHT_YELLOW ='\033[{0}m'.format(93)
 *         LIGHT_BLUE   ='\033[{0}m'.format(94)
 *         LIGHT_MAGENTA='\033[{0}m'.format(95)             # <<<<<<<<<<<<<<
 *         LIGHT_CYAN   ='\033[{0}m'.format(96)
 *         WHITE        ='\033[{0}m'.format(97)
 */
  __Pyx_TraceLine(84,0,__PYX_ERR(0, 84, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_95) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_95);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_MAGENTA_2, __pyx_t_3) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":85
 *         LIGHT_BLUE   ='\033[{0}m'.format(94)
 *         LIGHT_MAGENTA='\033[{0}m'.format(95)
 *         LIGHT_CYAN   ='\033[{0}m'.format(96)             # <<<<<<<<<<<<<<
 *         WHITE        ='\033[{0}m'.format(97)
 * 
 */
  __Pyx_TraceLine(85,0,__PYX_ERR(0, 85, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_96) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_96);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_CYAN_2, __pyx_t_3) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":86
 *         LIGHT_MAGENTA='\033[{0}m'.format(95)
 *         LIGHT_CYAN   ='\033[{0}m'.format(96)
 *         WHITE        ='\033[{0}m'.format(97)             # <<<<<<<<<<<<<<
 * 
 *     class background:
 */
  __Pyx_TraceLine(86,0,__PYX_ERR(0, 86, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_97) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_97);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_WHITE, __pyx_t_3) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":69
 *         HIDDEN       ='\033[{0}m'.format(28)
 * 
 *     class foreground:             # <<<<<<<<<<<<<<
 *         DEFAULT      ='\033[{0}m'.format(39)
 *         BLACK        ='\033[{0}m'.format(30)
 */
  __Pyx_TraceLine(69,0,__PYX_ERR(0, 69, __pyx_L1_error))
  __pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_foreground, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_foreground, __pyx_t_3) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":88
 *         WHITE        ='\033[{0}m'.format(97)
 * 
 *     class background:             # <<<<<<<<<<<<<<
 *         DEFAULT      ='\033[{0}m'.format(49)
 *         BLACK        ='\033[{0}m'.format(40)
 */
  __Pyx_TraceLine(88,0,__PYX_ERR(0, 88, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_background, __pyx_n_s_tty_code_background, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":89
 * 
 *     class background:
 *         DEFAULT      ='\033[{0}m'.format(49)             # <<<<<<<<<<<<<<
 *         BLACK        ='\033[{0}m'.format(40)
 *         RED          ='\033[{0}m'.format(41)
 */
  __Pyx_TraceLine(89,0,__PYX_ERR(0, 89, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_49) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_49);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_DEFAULT, __pyx_t_3) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":90
 *     class background:
 *         DEFAULT      ='\033[{0}m'.format(49)
 *         BLACK        ='\033[{0}m'.format(40)             # <<<<<<<<<<<<<<
 *         RED          ='\033[{0}m'.format(41)
 *         GREEN        ='\033[{0}m'.format(42)
 */
  __Pyx_TraceLine(90,0,__PYX_ERR(0, 90, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_40) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_40);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_BLACK, __pyx_t_3) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":91
 *         DEFAULT      ='\033[{0}m'.format(49)
 *         BLACK        ='\033[{0}m'.format(40)
 *         RED          ='\033[{0}m'.format(41)             # <<<<<<<<<<<<<<
 *         GREEN        ='\033[{0}m'.format(42)
 *         YELLOW       ='\033[{0}m'.format(43)
 */
  __Pyx_TraceLine(91,0,__PYX_ERR(0, 91, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_41) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_41);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_RED, __pyx_t_3) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":92
 *         BLACK        ='\033[{0}m'.format(40)
 *         RED          ='\033[{0}m'.format(41)
 *         GREEN        ='\033[{0}m'.format(42)             # <<<<<<<<<<<<<<
 *         YELLOW       ='\033[{0}m'.format(43)
 *         BLUE         ='\033[{0}m'.format(44)
 */
  __Pyx_TraceLine(92,0,__PYX_ERR(0, 92, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_42) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_42);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_GREEN, __pyx_t_3) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":93
 *         RED          ='\033[{0}m'.format(41)
 *         GREEN        ='\033[{0}m'.format(42)
 *         YELLOW       ='\033[{0}m'.format(43)             # <<<<<<<<<<<<<<
 *         BLUE         ='\033[{0}m'.format(44)
 *         MAGENTA      ='\033[{0}m'.format(45)
 */
  __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_43) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_43);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_YELLOW, __pyx_t_3) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":94
 *         GREEN        ='\033[{0}m'.format(42)
 *         YELLOW       ='\033[{0}m'.format(43)
 *         BLUE         ='\033[{0}m'.format(44)             # <<<<<<<<<<<<<<
 *         MAGENTA      ='\033[{0}m'.format(45)
 *         CYAN         ='\033[{0}m'.format(46)
 */
  __Pyx_TraceLine(94,0,__PYX_ERR(0, 94, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_44) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_44);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_BLUE, __pyx_t_3) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":95
 *         YELLOW       ='\033[{0}m'.format(43)
 *         BLUE         ='\033[{0}m'.format(44)
 *         MAGENTA      ='\033[{0}m'.format(45)             # <<<<<<<<<<<<<<
 *         CYAN         ='\033[{0}m'.format(46)
 *         LIGHT_GRAY   ='\033[{0}m'.format(47)
 */
  __Pyx_TraceLine(95,0,__PYX_ERR(0, 95, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_45) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_45);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_MAGENTA, __pyx_t_3) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":96
 *         BLUE         ='\033[{0}m'.format(44)
 *         MAGENTA      ='\033[{0}m'.format(45)
 *         CYAN         ='\033[{0}m'.format(46)             # <<<<<<<<<<<<<<
 *         LIGHT_GRAY   ='\033[{0}m'.format(47)
 *         DARK_GRAY    ='\033[{0}m'.format(100)
 */
  __Pyx_TraceLine(96,0,__PYX_ERR(0, 96, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_46) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_46);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_CYAN, __pyx_t_3) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":97
 *         MAGENTA      ='\033[{0}m'.format(45)
 *         CYAN         ='\033[{0}m'.format(46)
 *         LIGHT_GRAY   ='\033[{0}m'.format(47)             # <<<<<<<<<<<<<<
 *         DARK_GRAY    ='\033[{0}m'.format(100)
 *         LIGHT_RED    ='\033[{0}m'.format(101)
 */
  __Pyx_TraceLine(97,0,__PYX_ERR(0, 97, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_47) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_47);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_GRAY_2, __pyx_t_3) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":98
 *         CYAN         ='\033[{0}m'.format(46)
 *         LIGHT_GRAY   ='\033[{0}m'.format(47)
 *         DARK_GRAY    ='\033[{0}m'.format(100)             # <<<<<<<<<<<<<<
 *         LIGHT_RED    ='\033[{0}m'.format(101)
 *         LIGHT_GREEN  ='\033[{0}m'.format(102)
 */
  __Pyx_TraceLine(98,0,__PYX_ERR(0, 98, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_100) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_100);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_DARK_GRAY_2, __pyx_t_3) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":99
 *         LIGHT_GRAY   ='\033[{0}m'.format(47)
 *         DARK_GRAY    ='\033[{0}m'.format(100)
 *         LIGHT_RED    ='\033[{0}m'.format(101)             # <<<<<<<<<<<<<<
 *         LIGHT_GREEN  ='\033[{0}m'.format(102)
 *         LIGHT_YELLOW ='\033[{0}m'.format(103)
 */
  __Pyx_TraceLine(99,0,__PYX_ERR(0, 99, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_101) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_101);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_RED_2, __pyx_t_3) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":100
 *         DARK_GRAY    ='\033[{0}m'.format(100)
 *         LIGHT_RED    ='\033[{0}m'.format(101)
 *         LIGHT_GREEN  ='\033[{0}m'.format(102)             # <<<<<<<<<<<<<<
 *         LIGHT_YELLOW ='\033[{0}m'.format(103)
 *         LIGHT_BLUE   ='\033[{0}m'.format(104)
 */
  __Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_102) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_102);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  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;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_GREEN_2, __pyx_t_3) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":101
 *         LIGHT_RED    ='\033[{0}m'.format(101)
 *         LIGHT_GREEN  ='\033[{0}m'.format(102)
 *         LIGHT_YELLOW ='\033[{0}m'.format(103)             # <<<<<<<<<<<<<<
 *         LIGHT_BLUE   ='\033[{0}m'.format(104)
 *         LIGHT_MAGENTA='\033[{0}m'.format(105)
 */
  __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_103) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_103);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_YELLOW_2, __pyx_t_3) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":102
 *         LIGHT_GREEN  ='\033[{0}m'.format(102)
 *         LIGHT_YELLOW ='\033[{0}m'.format(103)
 *         LIGHT_BLUE   ='\033[{0}m'.format(104)             # <<<<<<<<<<<<<<
 *         LIGHT_MAGENTA='\033[{0}m'.format(105)
 *         LIGHT_CYAN   ='\033[{0}m'.format(106)
 */
  __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_104) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_104);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_BLUE_2, __pyx_t_3) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":103
 *         LIGHT_YELLOW ='\033[{0}m'.format(103)
 *         LIGHT_BLUE   ='\033[{0}m'.format(104)
 *         LIGHT_MAGENTA='\033[{0}m'.format(105)             # <<<<<<<<<<<<<<
 *         LIGHT_CYAN   ='\033[{0}m'.format(106)
 *         WHITE        ='\033[{0}m'.format(107)
 */
  __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_105) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_105);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_MAGENTA_2, __pyx_t_3) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":104
 *         LIGHT_BLUE   ='\033[{0}m'.format(104)
 *         LIGHT_MAGENTA='\033[{0}m'.format(105)
 *         LIGHT_CYAN   ='\033[{0}m'.format(106)             # <<<<<<<<<<<<<<
 *         WHITE        ='\033[{0}m'.format(107)
 * 
 */
  __Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_106) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_106);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LIGHT_CYAN_2, __pyx_t_3) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":105
 *         LIGHT_MAGENTA='\033[{0}m'.format(105)
 *         LIGHT_CYAN   ='\033[{0}m'.format(106)
 *         WHITE        ='\033[{0}m'.format(107)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_TraceLine(105,0,__PYX_ERR(0, 105, __pyx_L1_error))
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_m, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_107) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_107);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_WHITE, __pyx_t_3) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":88
 *         WHITE        ='\033[{0}m'.format(97)
 * 
 *     class background:             # <<<<<<<<<<<<<<
 *         DEFAULT      ='\033[{0}m'.format(49)
 *         BLACK        ='\033[{0}m'.format(40)
 */
  __Pyx_TraceLine(88,0,__PYX_ERR(0, 88, __pyx_L1_error))
  __pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_background, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_background, __pyx_t_3) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":50
 * 
 * 
 * class tty_code:             # <<<<<<<<<<<<<<
 * 
 *     class attributes:
 */
  __Pyx_TraceLine(50,0,__PYX_ERR(0, 50, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_tty_code, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tty_code, __pyx_t_1) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":110
 * 
 * 
 * class flextable:             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_TraceLine(110,0,__PYX_ERR(0, 110, __pyx_L1_error))
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_flextable, __pyx_n_s_flextable, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "ddb/output/factory_term.py":113
 * 
 *     @staticmethod
 *     def colors(foreground,background,dim=None,bold=None):             # <<<<<<<<<<<<<<
 *         color=''
 *         if dim !=None:
 */
  __Pyx_TraceLine(113,0,__PYX_ERR(0, 113, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_9flextable_1colors, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_flextable_colors, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__73);

  /* "ddb/output/factory_term.py":112
 * class flextable:
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def colors(foreground,background,dim=None,bold=None):
 *         color=''
 */
  __Pyx_TraceLine(112,0,__PYX_ERR(0, 112, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_colors, __pyx_t_3) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":192
 *         return color
 * 
 *     class flextable_style:             # <<<<<<<<<<<<<<
 *         def __init__(self,style='rst'):
 *             self.whitespace=''
 */
  __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __pyx_L1_error))
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_flextable_style, __pyx_n_s_flextable_flextable_style, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "ddb/output/factory_term.py":193
 * 
 *     class flextable_style:
 *         def __init__(self,style='rst'):             # <<<<<<<<<<<<<<
 *             self.whitespace=''
 *             self.line_ending='LRCF'
 */
  __Pyx_TraceLine(193,0,__PYX_ERR(0, 193, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_15flextable_style_1__init__, 0, __pyx_n_s_flextable_flextable_style___init, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__75);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":192
 *         return color
 * 
 *     class flextable_style:             # <<<<<<<<<<<<<<
 *         def __init__(self,style='rst'):
 *             self.whitespace=''
 */
  __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_flextable_style, __pyx_empty_tuple, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_flextable_style, __pyx_t_1) < 0) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":200
 * 
 *         # Helper classes
 *     class color:             # <<<<<<<<<<<<<<
 *         def __init__(self,foreground=None,background=None,text=None,dim=None,bold=None,default=None):
 *             self.foreground=foreground
 */
  __Pyx_TraceLine(200,0,__PYX_ERR(0, 200, __pyx_L1_error))
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_color, __pyx_n_s_flextable_color, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "ddb/output/factory_term.py":201
 *         # Helper classes
 *     class color:
 *         def __init__(self,foreground=None,background=None,text=None,dim=None,bold=None,default=None):             # <<<<<<<<<<<<<<
 *             self.foreground=foreground
 *             self.background=background
 */
  __Pyx_TraceLine(201,0,__PYX_ERR(0, 201, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_5color_1__init__, 0, __pyx_n_s_flextable_color___init, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__77);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":226
 * 
 * 
 *         def render(self,text=None, length=None,fill_character=' ',override=None,use_color=True):             # <<<<<<<<<<<<<<
 *             if text==None:
 *                 text=self.text
 */
  __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_5color_3render, 0, __pyx_n_s_flextable_color_render, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__79);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_render, __pyx_t_1) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":200
 * 
 *         # Helper classes
 *     class color:             # <<<<<<<<<<<<<<
 *         def __init__(self,foreground=None,background=None,text=None,dim=None,bold=None,default=None):
 *             self.foreground=foreground
 */
  __Pyx_TraceLine(200,0,__PYX_ERR(0, 200, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_color, __pyx_empty_tuple, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_color, __pyx_t_1) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":264
 *             return u"{0}{1}{2}".format(self.color,text,self.reset)
 * 
 *     class modes:             # <<<<<<<<<<<<<<
 *         def __init__(self):
 *             self.default  =flextable.color('blue'      )
 */
  __Pyx_TraceLine(264,0,__PYX_ERR(0, 264, __pyx_L1_error))
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_modes, __pyx_n_s_flextable_modes, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "ddb/output/factory_term.py":265
 * 
 *     class modes:
 *         def __init__(self):             # <<<<<<<<<<<<<<
 *             self.default  =flextable.color('blue'      )
 *             self.error    =flextable.color('red'        ,bold=True,default=self.default)
 */
  __Pyx_TraceLine(265,0,__PYX_ERR(0, 265, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_5modes_1__init__, 0, __pyx_n_s_flextable_modes___init, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":264
 *             return u"{0}{1}{2}".format(self.color,text,self.reset)
 * 
 *     class modes:             # <<<<<<<<<<<<<<
 *         def __init__(self):
 *             self.default  =flextable.color('blue'      )
 */
  __Pyx_TraceLine(264,0,__PYX_ERR(0, 264, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_modes, __pyx_empty_tuple, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_modes, __pyx_t_1) < 0) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":275
 *             self.disabled =flextable.color('dark gray'  ,default=self.default)
 * 
 *     class characters:             # <<<<<<<<<<<<<<
 *         class char_walls:
 * 
 */
  __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L1_error))
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_characters, __pyx_n_s_flextable_characters, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "ddb/output/factory_term.py":276
 * 
 *     class characters:
 *         class char_walls:             # <<<<<<<<<<<<<<
 * 
 *             def __init__(self,default=None,style='rst'):
 */
  __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_char_walls, __pyx_n_s_flextable_characters_char_walls, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":278
 *         class char_walls:
 * 
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */
  __Pyx_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_10char_walls_1__init__, 0, __pyx_n_s_flextable_characters_char_walls_2, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__82);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":276
 * 
 *     class characters:
 *         class char_walls:             # <<<<<<<<<<<<<<
 * 
 *             def __init__(self,default=None,style='rst'):
 */
  __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_char_walls, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_char_walls, __pyx_t_4) < 0) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":304
 *                 self.top    =flextable.color(text=t,default=default)
 *                 self.bottom =flextable.color(text=b,default=default)
 *         class char_center:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':
 */
  __Pyx_TraceLine(304,0,__PYX_ERR(0, 304, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_char_center, __pyx_n_s_flextable_characters_char_center, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":305
 *                 self.bottom =flextable.color(text=b,default=default)
 *         class char_center:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */
  __Pyx_TraceLine(305,0,__PYX_ERR(0, 305, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_11char_center_1__init__, 0, __pyx_n_s_flextable_characters_char_center_2, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__84);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":304
 *                 self.top    =flextable.color(text=t,default=default)
 *                 self.bottom =flextable.color(text=b,default=default)
 *         class char_center:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':
 */
  __Pyx_TraceLine(304,0,__PYX_ERR(0, 304, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_char_center, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_char_center, __pyx_t_4) < 0) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":327
 *                 self.right  = flextable.color(text=r,default=default)
 * 
 *         class char_rst:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None):
 *                 self.edge   =flextable.color(text='+',default=default)
 */
  __Pyx_TraceLine(327,0,__PYX_ERR(0, 327, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_char_rst, __pyx_n_s_flextable_characters_char_rst, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":328
 * 
 *         class char_rst:
 *             def __init__(self,default=None):             # <<<<<<<<<<<<<<
 *                 self.edge   =flextable.color(text='+',default=default)
 *                 self.space  =flextable.color(text=' ',default=default)
 */
  __Pyx_TraceLine(328,0,__PYX_ERR(0, 328, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_8char_rst_1__init__, 0, __pyx_n_s_flextable_characters_char_rst_2, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__86);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":327
 *                 self.right  = flextable.color(text=r,default=default)
 * 
 *         class char_rst:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None):
 *                 self.edge   =flextable.color(text='+',default=default)
 */
  __Pyx_TraceLine(327,0,__PYX_ERR(0, 327, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_char_rst, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_char_rst, __pyx_t_4) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":334
 *                 self.row    =flextable.color(text='-',default=default)
 * 
 *         class char_bottom:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':
 */
  __Pyx_TraceLine(334,0,__PYX_ERR(0, 334, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_char_bottom, __pyx_n_s_flextable_characters_char_bottom, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":335
 * 
 *         class char_bottom:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */
  __Pyx_TraceLine(335,0,__PYX_ERR(0, 335, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_11char_bottom_1__init__, 0, __pyx_n_s_flextable_characters_char_bottom_2, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__88);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":334
 *                 self.row    =flextable.color(text='-',default=default)
 * 
 *         class char_bottom:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':
 */
  __Pyx_TraceLine(334,0,__PYX_ERR(0, 334, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_char_bottom, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_char_bottom, __pyx_t_4) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":356
 *                 self.center = flextable.color(text=c,default=default)
 *                 self.right  = flextable.color(text=r,default=default)
 *         class char_top:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 *                 if style == 'single':
 */
  __Pyx_TraceLine(356,0,__PYX_ERR(0, 356, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_char_top, __pyx_n_s_flextable_characters_char_top, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":357
 *                 self.right  = flextable.color(text=r,default=default)
 *         class char_top:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style == 'single':
 *                     l=u''
 */
  __Pyx_TraceLine(357,0,__PYX_ERR(0, 357, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_8char_top_1__init__, 0, __pyx_n_s_flextable_characters_char_top_2, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__90);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":356
 *                 self.center = flextable.color(text=c,default=default)
 *                 self.right  = flextable.color(text=r,default=default)
 *         class char_top:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 *                 if style == 'single':
 */
  __Pyx_TraceLine(356,0,__PYX_ERR(0, 356, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_char_top, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_char_top, __pyx_t_4) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":378
 *                 self.right  = flextable.color(text=r,default=default)
 *                 self.center = flextable.color(text=c,default=default)
 *         class char_header:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':
 */
  __Pyx_TraceLine(378,0,__PYX_ERR(0, 378, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_char_header, __pyx_n_s_flextable_characters_char_header, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":379
 *                 self.center = flextable.color(text=c,default=default)
 *         class char_header:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style=='single':
 *                     l=u''
 */
  __Pyx_TraceLine(379,0,__PYX_ERR(0, 379, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_11char_header_1__init__, 0, __pyx_n_s_flextable_characters_char_header_2, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__92);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":378
 *                 self.right  = flextable.color(text=r,default=default)
 *                 self.center = flextable.color(text=c,default=default)
 *         class char_header:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 *                 if style=='single':
 */
  __Pyx_TraceLine(378,0,__PYX_ERR(0, 378, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_char_header, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_char_header, __pyx_t_4) < 0) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":400
 *                 self.right  = flextable.color(text=r,default=default,foreground='White')
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_mid_header:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 *                 if style == 'single':
 */
  __Pyx_TraceLine(400,0,__PYX_ERR(0, 400, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_char_mid_header, __pyx_n_s_flextable_characters_char_mid_he, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":401
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_mid_header:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 *                 if style == 'single':
 *                     l=u'-'
 */
  __Pyx_TraceLine(401,0,__PYX_ERR(0, 401, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_15char_mid_header_1__init__, 0, __pyx_n_s_flextable_characters_char_mid_he_2, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__94);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":400
 *                 self.right  = flextable.color(text=r,default=default,foreground='White')
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_mid_header:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 *                 if style == 'single':
 */
  __Pyx_TraceLine(400,0,__PYX_ERR(0, 400, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_char_mid_header, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_char_mid_header, __pyx_t_4) < 0) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":422
 *                 self.right  = flextable.color(text=r,default=default,foreground='White')
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_footer:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 * 
 */
  __Pyx_TraceLine(422,0,__PYX_ERR(0, 422, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_char_footer, __pyx_n_s_flextable_characters_char_footer, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "ddb/output/factory_term.py":423
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_footer:
 *             def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 * 
 *                 if style=='single':
 */
  __Pyx_TraceLine(423,0,__PYX_ERR(0, 423, __pyx_L1_error))
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_11char_footer_1__init__, 0, __pyx_n_s_flextable_characters_char_footer_2, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__96);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "ddb/output/factory_term.py":422
 *                 self.right  = flextable.color(text=r,default=default,foreground='White')
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 *         class char_footer:             # <<<<<<<<<<<<<<
 *             def __init__(self,default=None,style='rst'):
 * 
 */
  __Pyx_TraceLine(422,0,__PYX_ERR(0, 422, __pyx_L1_error))
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_char_footer, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_char_footer, __pyx_t_4) < 0) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":445
 *                 self.center = flextable.color(text=c,default=default,foreground='green')
 * 
 *         def __init__(self,default=None,style='rst'):             # <<<<<<<<<<<<<<
 * 
 *             self.walls      =self.char_walls(default=default,style=style)
 */
  __Pyx_TraceLine(445,0,__PYX_ERR(0, 445, __pyx_L1_error))
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_10characters_1__init__, 0, __pyx_n_s_flextable_characters___init, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__98);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "ddb/output/factory_term.py":275
 *             self.disabled =flextable.color('dark gray'  ,default=self.default)
 * 
 *     class characters:             # <<<<<<<<<<<<<<
 *         class char_walls:
 * 
 */
  __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_characters, __pyx_empty_tuple, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_characters, __pyx_t_1) < 0) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":458
 * 
 * 
 *     class data_type:             # <<<<<<<<<<<<<<
 *         COMMENT=1
 *         ERROR=2
 */
  __Pyx_TraceLine(458,0,__PYX_ERR(0, 458, __pyx_L1_error))
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_data_type, __pyx_n_s_flextable_data_type, (PyObject *) NULL, __pyx_n_s_ddb_output_factory_term, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "ddb/output/factory_term.py":459
 * 
 *     class data_type:
 *         COMMENT=1             # <<<<<<<<<<<<<<
 *         ERROR=2
 *         DATA=3
 */
  __Pyx_TraceLine(459,0,__PYX_ERR(0, 459, __pyx_L1_error))
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_COMMENT, __pyx_int_1) < 0) __PYX_ERR(0, 459, __pyx_L1_error)

  /* "ddb/output/factory_term.py":460
 *     class data_type:
 *         COMMENT=1
 *         ERROR=2             # <<<<<<<<<<<<<<
 *         DATA=3
 *         WHITESPACE=4
 */
  __Pyx_TraceLine(460,0,__PYX_ERR(0, 460, __pyx_L1_error))
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ERROR, __pyx_int_2) < 0) __PYX_ERR(0, 460, __pyx_L1_error)

  /* "ddb/output/factory_term.py":461
 *         COMMENT=1
 *         ERROR=2
 *         DATA=3             # <<<<<<<<<<<<<<
 *         WHITESPACE=4
 * 
 */
  __Pyx_TraceLine(461,0,__PYX_ERR(0, 461, __pyx_L1_error))
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DATA, __pyx_int_3) < 0) __PYX_ERR(0, 461, __pyx_L1_error)

  /* "ddb/output/factory_term.py":462
 *         ERROR=2
 *         DATA=3
 *         WHITESPACE=4             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,      data,
 */
  __Pyx_TraceLine(462,0,__PYX_ERR(0, 462, __pyx_L1_error))
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WHITESPACE, __pyx_int_4) < 0) __PYX_ERR(0, 462, __pyx_L1_error)

  /* "ddb/output/factory_term.py":458
 * 
 * 
 *     class data_type:             # <<<<<<<<<<<<<<
 *         COMMENT=1
 *         ERROR=2
 */
  __Pyx_TraceLine(458,0,__PYX_ERR(0, 458, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_data_type, __pyx_empty_tuple, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_data_type, __pyx_t_1) < 0) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":464
 *         WHITESPACE=4
 * 
 *     def __init__(self,      data,             # <<<<<<<<<<<<<<
 *                             display_style='single',
 *                             column_count=0,
 */
  __Pyx_TraceLine(464,0,__PYX_ERR(0, 464, __pyx_L1_error))
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_9flextable_3__init__, 0, __pyx_n_s_flextable___init, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__100);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":549
 * 
 * 
 *     def calculate_limits(self):             # <<<<<<<<<<<<<<
 *         tty_min_column_width=1
 *         # doesnt work with pipes. ugh
 */
  __Pyx_TraceLine(549,0,__PYX_ERR(0, 549, __pyx_L1_error))
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_9flextable_5calculate_limits, 0, __pyx_n_s_flextable_calculate_limits, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_calculate_limits, __pyx_t_3) < 0) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":578
 *         self.total_width=self.column_character_width*data_column_count+data_column_count-1
 * 
 *     def build_header(self,footer=False,mid=False):             # <<<<<<<<<<<<<<
 *         # header
 * 
 */
  __Pyx_TraceLine(578,0,__PYX_ERR(0, 578, __pyx_L1_error))
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_9flextable_7build_header, 0, __pyx_n_s_flextable_build_header, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__103);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_build_header, __pyx_t_3) < 0) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":630
 *         return header
 * 
 *     def build_rows(self,buffer):             # <<<<<<<<<<<<<<
 *         rows=[]
 *         index=0
 */
  __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error))
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_9flextable_9build_rows, 0, __pyx_n_s_flextable_build_rows, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_build_rows, __pyx_t_3) < 0) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":684
 *         return rows
 * 
 *     def build_row_seperator(self,header=None):             # <<<<<<<<<<<<<<
 *         index=0
 *         if header:
 */
  __Pyx_TraceLine(684,0,__PYX_ERR(0, 684, __pyx_L1_error))
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_9flextable_11build_row_seperator, 0, __pyx_n_s_flextable_build_row_seperator, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__106);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_build_row_seperator, __pyx_t_3) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":701
 * 
 * 
 *     def print_errors(self,table):             # <<<<<<<<<<<<<<
 *         for e in table.errors:
 *             print(e.encode('utf-8'))
 */
  __Pyx_TraceLine(701,0,__PYX_ERR(0, 701, __pyx_L1_error))
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_9flextable_13print_errors, 0, __pyx_n_s_flextable_print_errors, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_print_errors, __pyx_t_3) < 0) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":706
 * 
 *     # with no columns, everything will be run on, not well formated
 *     def format(self):             # <<<<<<<<<<<<<<
 *         # now we have a file, from stdin or a file on the system that we can access
 *         # print buffer
 */
  __Pyx_TraceLine(706,0,__PYX_ERR(0, 706, __pyx_L1_error))
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ddb_6output_12factory_term_9flextable_15format, 0, __pyx_n_s_flextable_format, NULL, __pyx_n_s_ddb_output_factory_term, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "ddb/output/factory_term.py":110
 * 
 * 
 * class flextable:             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_TraceLine(110,0,__PYX_ERR(0, 110, __pyx_L1_error))
  __pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_flextable, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_flextable, __pyx_t_3) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "ddb/output/factory_term.py":1
 * # -*- coding: utf-8 -*-             # <<<<<<<<<<<<<<
 * # cython: linetrace=True
 * 
 */
  __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error))
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init ddb.output.factory_term", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init ddb.output.factory_term");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

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

/* Profile */
#if CYTHON_PROFILE
static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
                                   PyFrameObject** frame,
                                   PyThreadState* tstate,
                                   const char *funcname,
                                   const char *srcfile,
                                   int firstlineno) {
    PyObject *type, *value, *traceback;
    int retval;
    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
        if (*code == NULL) {
            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
            if (*code == NULL) return 0;
        }
        *frame = PyFrame_New(
            tstate,                          /*PyThreadState *tstate*/
            *code,                           /*PyCodeObject *code*/
            __pyx_d,                  /*PyObject *globals*/
            0                                /*PyObject *locals*/
        );
        if (*frame == NULL) return 0;
        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
            Py_INCREF(Py_None);
            (*frame)->f_trace = Py_None;
        }
#if PY_VERSION_HEX < 0x030400B1
    } else {
        (*frame)->f_tstate = tstate;
#endif
    }
      __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
    retval = 1;
    tstate->tracing++;
    tstate->use_tracing = 0;
    __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
    #if CYTHON_TRACE
    if (tstate->c_tracefunc)
        retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
    if (retval && tstate->c_profilefunc)
    #endif
        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
    tstate->use_tracing = (tstate->c_profilefunc ||
                           (CYTHON_TRACE && tstate->c_tracefunc));
    tstate->tracing--;
    if (retval) {
        __Pyx_ErrRestoreInState(tstate, type, value, traceback);
        return tstate->use_tracing && retval;
    } else {
        Py_XDECREF(type);
        Py_XDECREF(value);
        Py_XDECREF(traceback);
        return -1;
    }
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
    PyCodeObject *py_code = 0;
#if PY_MAJOR_VERSION >= 3
    py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
    if (likely(py_code)) {
        py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
    }
#else
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    py_funcname = PyString_FromString(funcname);
    if (unlikely(!py_funcname)) goto bad;
    py_srcfile = PyString_FromString(srcfile);
    if (unlikely(!py_srcfile)) goto bad;
    py_code = PyCode_New(
        0,
        0,
        0,
        CO_OPTIMIZED | CO_NEWLOCALS,
        __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,*/
        firstlineno,
        __pyx_empty_bytes      /*PyObject *lnotab*/
    );
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
#endif
    return py_code;
}
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* 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 = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

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

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

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

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

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

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_FALSE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_TRUE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_TRUE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

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

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

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunction */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    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);
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* Print */
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject((char *)"stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}
static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
    int i;
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
        PyObject* v;
        if (PyFile_SoftSpace(f, 1)) {
            if (PyFile_WriteString(" ", f) < 0)
                goto error;
        }
        v = PyTuple_GET_ITEM(arg_tuple, i);
        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
            goto error;
        if (PyString_Check(v)) {
            char *s = PyString_AsString(v);
            Py_ssize_t len = PyString_Size(v);
            if (len > 0) {
                switch (s[len-1]) {
                    case ' ': break;
                    case '\f': case '\r': case '\n': case '\t': case '\v':
                        PyFile_SoftSpace(f, 0);
                        break;
                    default:  break;
                }
            }
        }
    }
    if (newline) {
        if (PyFile_WriteString("\n", f) < 0)
            goto error;
        PyFile_SoftSpace(f, 0);
    }
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
}
#else
static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
    PyObject* kwargs = 0;
    PyObject* result = 0;
    PyObject* end_string;
    if (unlikely(!__pyx_print)) {
        __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
        if (!__pyx_print)
            return -1;
    }
    if (stream) {
        kwargs = PyDict_New();
        if (unlikely(!kwargs))
            return -1;
        if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))
            goto bad;
        if (!newline) {
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                goto bad;
            if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
                Py_DECREF(end_string);
                goto bad;
            }
            Py_DECREF(end_string);
        }
    } else if (!newline) {
        if (unlikely(!__pyx_print_kwargs)) {
            __pyx_print_kwargs = PyDict_New();
            if (unlikely(!__pyx_print_kwargs))
                return -1;
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                return -1;
            if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
                Py_DECREF(end_string);
                return -1;
            }
            Py_DECREF(end_string);
        }
        kwargs = __pyx_print_kwargs;
    }
    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
        Py_DECREF(kwargs);
    if (!result)
        return -1;
    Py_DECREF(result);
    return 0;
bad:
    if (kwargs != __pyx_print_kwargs)
        Py_XDECREF(kwargs);
    return -1;
}
#endif

/* PrintOne */
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    if (PyFile_SoftSpace(f, 0)) {
        if (PyFile_WriteString(" ", f) < 0)
            goto error;
    }
    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
        goto error;
    if (PyFile_WriteString("\n", f) < 0)
        goto error;
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
    /* the line below is just to avoid C compiler
     * warnings about unused functions */
    return __Pyx_Print(f, NULL, 0);
}
#else
static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
    int res;
    PyObject* arg_tuple = PyTuple_Pack(1, o);
    if (unlikely(!arg_tuple))
        return -1;
    res = __Pyx_Print(stream, arg_tuple, 1);
    Py_DECREF(arg_tuple);
    return res;
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
